Copying an AV1 stream from an MKV container to an MP4 container changes the reported framerate
|Reported by:||veikk0||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
Summary of the bug: Copying some AV1 streams from an MKV container to an MP4 container changes the reported framerate and changes it from CFR to VFR.
How to reproduce:
Download the Sintel trailer, encode 10 seconds of it in AV1, print fps with ffprobe:
wget https://download.blender.org/durian/trailer/sintel_trailer-480p.mp4 && ffmpeg -i sintel_trailer-480p.mp4 -an -c:v libsvtav1 -t 10 -preset 8 sintel.mkv && ffprobe -v error -select_streams v:0 -show_entries stream=avg_frame_rate -of default=noprint_wrappers=1:nokey=1 sintel.mkv
Frame rate is the same as the source (24/1).
Now to copy the freshly encoded video stream from the Matroska container to an MP4 container, and check out the frame rate:
ffmpeg -i sintel.mkv -c:v copy sintel.mp4 && ffprobe -v error -select_streams v:0 -show_entries stream=avg_frame_rate -of default=noprint_wrappers=1:nokey=1 sintel.mp4
It has changed to 80000/3333. Furthermore, the mediainfo program will now report that the file is variable frame rate instead of constant (not sure how to check this with ffprobe).
ffmpeg version N-99352-gd8ce8e8 built with gcc 8 (Ubuntu 8.4.0-1ubuntu1~18.04)
If your FFmpeg isn't built with SVT-AV1 or libaom, I was also able to reproduce the issue by copying an existing AV1 file not authored with FFmpeg (as far as I know): http://download.opencontent.netflix.com.s3.amazonaws.com/AV1/Chimera/Old/Chimera-AV1-8bit-1920x1080-6736kbps.mp4. Copy video stream to an MKV, then copy that stream to an MP4. Same issue.
The issue doesn't seem to crop up when going from other containers to an MP4, or when encoding directly to an MP4. Seems like this is specific to Matroska.