snobu / destreamer

Save Microsoft Stream videos for offline enjoyment.
MIT License
2.36k stars 441 forks source link

Warn on old ffmpeg binaries #294

Closed snobu closed 3 years ago

snobu commented 3 years ago

If we detect an older ffmpeg binary it will most likely not support encrypted HLS or a bunch of codecs so we should warn right before we start the download (so it's visible).

snobu commented 3 years ago
$ ffmpeg -version | grep 'ffmpeg version' | cut -d ' ' -f 3
4.3.1

I hope there's a better way to get the version number, since i'd like to avoid both regex and string parsing... but you know, one can dream.

lukaarma commented 3 years ago

I'll push something to #288 @snobu

lukaarma commented 3 years ago
$ ffmpeg -version | grep 'ffmpeg version' | cut -d ' ' -f 3
4.3.1

I hope there's a better way to get the version number, since i'd like to avoid both regex and string parsing... but you know, one can dream.

We get the command output in node, so we can do some magic there but we have to rely on regex since I didn't find any other method to get the version out of ffmpeg

snobu commented 3 years ago

Let me ask the ffmpeg developers maybe there's a sane way to get version without black magic.

lukaarma commented 3 years ago

Let me ask the ffmpeg developers maybe there's a sane way to get version without black magic.

Ok, in the meantime I'll prepare the update just in case

snobu commented 3 years ago

Not really getting the answers i was expecting so i believe we should just parse the version string and trigger on the Copyright year. 2019 and above should do. We can't really match the version number since instead of a number it may be a git commit id if someone pulls a nighly binary.

ffmpeg version N-100221-g18befac5da Copyright (c) 2000-2020 the FFmpeg developers