Missing framerate with pyav==10.0.0
Overview
The framerate cannot be read from the file since version 10. It worked with versions 8 and 9.
import av
with av.open("empty.mp4") as container:
fps = container.streams.video[0].codec_context.framerate
# fps is None with av==10.0.0
# fps is Fraction(25, 1) with av<10.0.0
Versions
- OS: Windows 10 x64
- PyAV runtime:
PyAV v10.0.0
library configuration: --disable-static --enable-shared --libdir=/c/cibw/vendor/lib --prefix=/c/cibw/vendor --disable-alsa --disable-doc --disable-mediafoundation --enable-fontconfig --enable-gmp --disable-gnutls --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --disable-libxcb --enable-libxml2 --enable-libxvid --enable-lzma --enable-version3 --enable-zlib
library license: GPL version 3 or later
libavcodec 59. 37.100
libavdevice 59. 7.100
libavfilter 8. 44.100
libavformat 59. 27.100
libavutil 57. 28.100
libswresample 4. 7.100
libswscale 6. 7.100
Research
I have done the following:
-
Checked the PyAV documentation -
Searched on Google -
Searched on Stack Overflow -
Looked through old GitHub issues -
Asked on PyAV Gitter -
... and waited 72 hours for a response.