Closed snobu closed 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.
I'll push something to #288 @snobu
$ 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
Let me ask the ffmpeg developers maybe there's a sane way to get version without black magic.
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
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
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).