summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/posts/you-dont-need-mediainfo.svx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/posts/you-dont-need-mediainfo.svx b/src/posts/you-dont-need-mediainfo.svx
index 3f37365..9876cde 100644
--- a/src/posts/you-dont-need-mediainfo.svx
+++ b/src/posts/you-dont-need-mediainfo.svx
@@ -106,7 +106,7 @@ This does play out nicely until... You need a mobile application. You tell the m
That is pretty smart innit, just a simple `os.exec(ffprobe)` and some string parsing and voila, you have your metadata.
Not so fast. That requires your prod server to have ffprobe binary, launch a separate process, string match the output, just to get some information that is already available in the file.
Instead we can write our own parser, and only request specific bytes from the file server:
-```py
+```python
def main(url: str):
READ_RANGE = 131072 # 128 kib in bytes