faroit / stempeg

Python I/O for STEM audio files
https://faroit.github.io/stempeg
MIT License
96 stars 13 forks source link

ffmpeg -version contains letter in version string #34

Closed Rhymen closed 3 years ago

Rhymen commented 3 years ago

Hey,

I don't know if this library is only supposed to work with certain ffmpeg versions and I didn't really dig to deep to be honest. Running ffmpeg -version shows me the following output:

ffmpeg version n4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.1.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
libavutil      56. 51.100 / 56. 51.100
libavcodec     58. 91.100 / 58. 91.100
libavformat    58. 45.100 / 58. 45.100
libavdevice    58. 10.100 / 58. 10.100
libavfilter     7. 85.100 /  7. 85.100
libswscale      5.  7.100 /  5.  7.100
libswresample   3.  7.100 /  3.  7.100
libpostproc    55.  7.100 / 55.  7.100

As you can see, the version string contains the letter 'n' which does not fit the regex in __init__.py line 68 re.findall(r'ffmpeg version (\d+\.)?(\d+\.)?(\*|\d+)', hay). After replacing the regex with ffmpeg version \w?(\d+\.)?(\d+\.)?(\*|\d+) everything started to work. Didn't encounter any errors so far, so you maybe want to consider changing the regex.

I'm working on a Linux 5.9.10-arch1-1 machine.

faroit commented 3 years ago

great. thanks. I will issue a new release once the docs are finished and up