mkvextract: wrong framerate for AV1 video #6120

Closed
opened 2025-06-20 00:18:41 +02:00 by replica9000 · 6 comments

When merging a new AV1 encoded file (.ivf), the video plays as expected.
mkvmerge -o file.mkv av1_video.ivf aac_audio.m4a

When extracting the video stream using mkvextract, and merging the video into a new file, the video plays at double speed, while still reporting to be the same framerate as the original. Other streams in the file still play correctly at normal speed.
mkvextract file.mkv tracks 0:av1_video_new.ivf
mkvmerge -o file_new.mkv av1_video_new.ivf aac_audio.m4a

Using the --default-duration option to specify the original framerate doesn't help.

When using ffmpeg to extract the video, the ivf file reports as 1000fps, but using the --default-duration option does correct the speed.

Edit: The videos play double speed in MPV and VLC on Linux. On MX Player for Android, the video is still. The behavior may be different depending on the player.

When merging a new AV1 encoded file (.ivf), the video plays as expected. `mkvmerge -o file.mkv av1_video.ivf aac_audio.m4a` When extracting the video stream using mkvextract, and merging the video into a new file, the video plays at double speed, while still reporting to be the same framerate as the original. Other streams in the file still play correctly at normal speed. `mkvextract file.mkv tracks 0:av1_video_new.ivf` `mkvmerge -o file_new.mkv av1_video_new.ivf aac_audio.m4a` Using the `--default-duration` option to specify the original framerate doesn't help. When using ffmpeg to extract the video, the ivf file reports as 1000fps, but using the `--default-duration` option does correct the speed. Edit: The videos play double speed in MPV and VLC on Linux. On MX Player for Android, the video is still. The behavior may be different depending on the player.
Owner

Thanks for reporting it here, too. As I wrote over on Discourse, it'd be helpful to have the original source file a1_video.ivf. Can you please upload it to my file server? Thanks.

Thanks for reporting it here, too. As I wrote over on Discourse, it'd be helpful to have the original source file `a1_video.ivf`. Can you please upload it to my [file server](https://codeberg.org/mbunkus/mkvtoolnix/wiki/FTP-server)? Thanks.
Author

I uploaded a sample under the folder "Issue #6120"

I uploaded a sample under the folder "Issue #6120"
Owner

Arg, I accidentally deleted your uploaded files while cleaning up other uploads. I'm so sorry. Can you please re-upload them? Thanks!

Arg, I accidentally deleted your uploaded files while cleaning up other uploads. I'm so sorry. Can you please re-upload them? Thanks!
Author

No problem. I re-uploaded the files.

No problem. I re-uploaded the files.
Owner

Thank you very much!

Thank you very much!

I think this issue is more serious than I thought it was. At first I thought this only happen to my own encode file, so I decide to grab some random video from youtube download with yt-dlp and the problem still exist. This mean that every av1 bitstream file extract with mkvextract is broken and cannot be fixed with just sepecifying fps at the containner level.

Clip I use to test: https://youtu.be/VHkrLMd5wmA?si=HvGVJ7rsSRMldFY4

ivf file extract with ffmpeg.

command use ffmpeg -i Clip1.mkv -c copy ffmpeg.ivf

  1. try playing ivf files directly (using mpv)
    Playback with correct fps.
  2. Mux back to mkv.
    2.1 using ffmpeg: Correct playback fps.
    2.2 using mkvmerge: 1000 fps sepcified (can be fixed with --default-duration option)

ivf file extract from mkvextract

command use: mkvextract Clip1.mkv tracks 0:mkvextract.ivf

  1. try playing ivf files directly (using mpv)
    Playback with wrong fps
  2. Mux back to mkv
    2.1 using ffmpeg: Wrong fps playback but correct specifed fps.
    2.2 using mkvmerge: Wrong fps playback(double fps of ffmpeg and ivf file) but correct specifed fps.

FFmpeg verrsion:

ffmpeg version 7.1.1-1ubuntu4 Copyright (c) 2000-2025 the FFmpeg developers
  built with gcc 15 (Ubuntu 15.2.0-2ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu4 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-libmfx --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libcaca --enable-libdvdnav --enable-libdvdread --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared
  libavutil      59. 39.100 / 59. 39.100
  libavcodec     61. 19.101 / 61. 19.101
  libavformat    61.  7.100 / 61.  7.100
  libavdevice    61.  3.100 / 61.  3.100
  libavfilter    10.  4.100 / 10.  4.100
  libswscale      8.  3.100 /  8.  3.100
  libswresample   5.  3.100 /  5.  3.100
  libpostproc    58.  3.100 / 58.  3.100

mkvtoolnix version:

mkvmerge v94.0 ('Initiate') 64-bit
mkvextract v94.0 ('Initiate') 64-bit
I think this issue is more serious than I thought it was. At first I thought this only happen to my own encode file, so I decide to grab some random video from youtube download with yt-dlp and the problem still exist. This mean that every av1 bitstream file extract with mkvextract is broken and cannot be fixed with just sepecifying fps at the containner level. Clip I use to test: https://youtu.be/VHkrLMd5wmA?si=HvGVJ7rsSRMldFY4 ## ivf file extract with ffmpeg. command use `ffmpeg -i Clip1.mkv -c copy ffmpeg.ivf` 1. try playing ivf files directly (using mpv) Playback with correct fps. 2. Mux back to mkv. 2.1 using ffmpeg: Correct playback fps. 2.2 using mkvmerge: 1000 fps sepcified (can be fixed with `--default-duration` option) ## ivf file extract from mkvextract command use: `mkvextract Clip1.mkv tracks 0:mkvextract.ivf` 1. try playing ivf files directly (using mpv) Playback with wrong fps 2. Mux back to mkv 2.1 using ffmpeg: Wrong fps playback but correct specifed fps. 2.2 using mkvmerge: Wrong fps playback(double fps of ffmpeg and ivf file) but correct specifed fps. FFmpeg verrsion: ``` ffmpeg version 7.1.1-1ubuntu4 Copyright (c) 2000-2025 the FFmpeg developers built with gcc 15 (Ubuntu 15.2.0-2ubuntu2) configuration: --prefix=/usr --extra-version=1ubuntu4 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --disable-libmfx --disable-omx --enable-gnutls --enable-libaom --enable-libass --enable-libbs2b --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libharfbuzz --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-openal --enable-opencl --enable-opengl --disable-sndio --enable-libvpl --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-ladspa --enable-libbluray --enable-libcaca --enable-libdvdnav --enable-libdvdread --enable-libjack --enable-libpulse --enable-librabbitmq --enable-librist --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libx264 --enable-libzmq --enable-libzvbi --enable-lv2 --enable-sdl2 --enable-libplacebo --enable-librav1e --enable-pocketsphinx --enable-librsvg --enable-libjxl --enable-shared libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.101 / 61. 19.101 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 ``` mkvtoolnix version: ``` mkvmerge v94.0 ('Initiate') 64-bit mkvextract v94.0 ('Initiate') 64-bit ```
Sign in to join this conversation.
No labels
app:build system & source
app:documentation
app:installer & packaging
app:mkvextract
app:mkvinfo
app:mkvmerge
app:mkvpropedit
app:MKVToolNix GUI:chapter editor
app:MKVToolNix GUI:general/other
app:MKVToolNix GUI:header editor
app:MKVToolNix GUI:info tool
app:MKVToolNix GUI:job output
app:MKVToolNix GUI:job queue
app:MKVToolNix GUI:multiplexer
app:translations
app:website
fixed-in-version
63.0.0
fixed-in-version
64.0.0
fixed-in-version
65.0.0
fixed-in-version
66.0.0
fixed-in-version
67.0.0
fixed-in-version
68.0.0
fixed-in-version
69.0.0
fixed-in-version
70.0.0
fixed-in-version
71.0.0
fixed-in-version
71.1.0
fixed-in-version
72.0.0
fixed-in-version
73.0
fixed-in-version
74.0
fixed-in-version
75.0.0
fixed-in-version
76.0
fixed-in-version
77.0
fixed-in-version
78.0
fixed-in-version
79.0
fixed-in-version
80.0
fixed-in-version
81.0
fixed-in-version
82.0
fixed-in-version
83.0
fixed-in-version
84.0
fixed-in-version
85.0
fixed-in-version
86.0
fixed-in-version
87.0
fixed-in-version
88.0
fixed-in-version
89.0
fixed-in-version
90.0
fixed-in-version
91.0
fixed-in-version
92.0
fixed-in-version
93.0
fixed-in-version
94.0
fixed-in-version
95.0
fixed-in-version
96.0
fixed-in-version
97.0
fixed-in-version
98.0
fixed-in-version
99.0
found-in-version
0.6.0
found-in-version
0.6.1
found-in-version
0.6.3
found-in-version
0.6.4
found-in-version
0.6.5
found-in-version
0.6.6
found-in-version
0.6.6.1
found-in-version
0.7.0
found-in-version
0.7.1
found-in-version
0.7.2
found-in-version
0.7.5
found-in-version
0.7.7
found-in-version
0.7.8
found-in-version
0.7.9
found-in-version
0.8.0
found-in-version
0.8.1
found-in-version
0.8.2
found-in-version
0.8.3
found-in-version
0.8.4
found-in-version
0.8.5
found-in-version
0.8.6
found-in-version
0.8.7
found-in-version
0.8.8
found-in-version
0.8.9
found-in-version
0.9.0
found-in-version
0.9.1
found-in-version
0.9.2
found-in-version
0.9.3
found-in-version
0.9.4
found-in-version
0.9.5
found-in-version
0.9.6
found-in-version
0.9.7
found-in-version
1.0
found-in-version
1.0.1
found-in-version
1.0.2
found-in-version
1.4.0
found-in-version
1.4.1
found-in-version
1.4.2
found-in-version
1.5.0
found-in-version
1.5.5
found-in-version
1.5.6
found-in-version
1.6.0
found-in-version
1.6.5
found-in-version
1.7.0
found-in-version
1.8.0
found-in-version
1.8.1
found-in-version
10.0.0
found-in-version
11.0.0
found-in-version
12.0.0
found-in-version
13.0.0
found-in-version
14.0.0
found-in-version
15.0.0
found-in-version
16.0.0
found-in-version
17.0.0
found-in-version
18.0.0
found-in-version
19.0.0
found-in-version
2.0.0
found-in-version
2.0.2
found-in-version
2.1.0
found-in-version
2.2.0
found-in-version
2.3.0
found-in-version
2.4.0
found-in-version
2.4.1
found-in-version
2.4.2
found-in-version
2.5.0
found-in-version
2.5.1
found-in-version
2.5.2
found-in-version
2.5.3
found-in-version
2.6.0
found-in-version
2.7.0
found-in-version
2.8.0
found-in-version
2.9.0
found-in-version
2.9.5
found-in-version
2.9.7
found-in-version
2.9.8
found-in-version
2.9.9
found-in-version
20.0.0
found-in-version
21.0.0
found-in-version
22.0.0
found-in-version
23.0.0
found-in-version
24.0.0
found-in-version
25.0.0
found-in-version
26.0.0
found-in-version
27.0.0
found-in-version
28.0.0
found-in-version
28.1.0
found-in-version
28.2.0
found-in-version
29.0.0
found-in-version
3.0.0
found-in-version
3.1.0
found-in-version
3.2.0
found-in-version
3.3.0
found-in-version
3.4.0
found-in-version
30.0.0
found-in-version
30.1.0
found-in-version
31.0.0
found-in-version
32.0.0
found-in-version
33.0.0
found-in-version
33.1.0
found-in-version
34.0.0
found-in-version
35.0.0
found-in-version
36.0.0
found-in-version
37.0.0
found-in-version
38.0.0
found-in-version
39.0.0
found-in-version
4.0.0
found-in-version
4.1.0
found-in-version
4.1.1
found-in-version
4.2.0
found-in-version
4.3.0
found-in-version
4.4.0
found-in-version
4.5.0
found-in-version
4.6.0
found-in-version
4.7.0
found-in-version
4.8.0
found-in-version
4.9.0
found-in-version
4.9.1
found-in-version
40.0.0
found-in-version
41.0.0
found-in-version
42.0.0
found-in-version
43.0.0
found-in-version
44.0.0
found-in-version
45.0.0
found-in-version
46.0.0
found-in-version
47.0.0
found-in-version
48.0.0
found-in-version
49.0.0
found-in-version
5.0.0
found-in-version
5.0.1
found-in-version
5.1.0
found-in-version
5.2.0
found-in-version
5.2.1
found-in-version
5.3.0
found-in-version
5.4.0
found-in-version
5.5.0
found-in-version
5.6.0
found-in-version
5.7.0
found-in-version
5.8.0
found-in-version
5.9.0
found-in-version
50.0.0
found-in-version
51.0.0
found-in-version
52.0.0
found-in-version
53.0.0
found-in-version
54.0.0
found-in-version
55.0.0
found-in-version
56.0.0
found-in-version
56.1.0
found-in-version
57.0.0
found-in-version
58.0.0
found-in-version
59.0.0
found-in-version
6.0.0
found-in-version
6.1.0
found-in-version
6.2.0
found-in-version
6.3.0
found-in-version
6.4.0
found-in-version
6.4.1
found-in-version
6.5.0
found-in-version
6.6.0
found-in-version
6.7.0
found-in-version
6.8.0
found-in-version
6.9.0
found-in-version
6.9.1
found-in-version
60.0.0
found-in-version
61.0.0
found-in-version
62.0.0
found-in-version
63.0.0
found-in-version
64.0.0
found-in-version
65.0.0
found-in-version
66.0.0
found-in-version
67.0.0
found-in-version
68.0.0
found-in-version
69.0.0
found-in-version
7.0.0
found-in-version
7.1.0
found-in-version
7.2.0
found-in-version
7.3.0
found-in-version
7.4.0
found-in-version
7.5.0
found-in-version
7.6.0
found-in-version
7.7.0
found-in-version
7.8.0
found-in-version
7.9.0
found-in-version
70.0.0
found-in-version
71.0.0
found-in-version
71.1.0
found-in-version
72.0
found-in-version
73.0
found-in-version
74.0.0
found-in-version
75.0
found-in-version
76.0
found-in-version
77.0
found-in-version
78.0
found-in-version
79.0
found-in-version
8.0.0
found-in-version
8.1.0
found-in-version
8.2.0
found-in-version
8.3.0
found-in-version
8.4.0
found-in-version
8.5.0
found-in-version
8.5.1
found-in-version
8.5.2
found-in-version
8.6.0
found-in-version
8.6.1
found-in-version
8.7.0
found-in-version
8.8.0
found-in-version
8.9.0
found-in-version
80.0
found-in-version
81.0
found-in-version
82.0
found-in-version
83.0
found-in-version
84.0
found-in-version
85.0
found-in-version
86.0
found-in-version
87.0
found-in-version
88.0
found-in-version
89.0
found-in-version
9.0.0
found-in-version
9.0.1
found-in-version
9.1.0
found-in-version
9.2.0
found-in-version
9.3.0
found-in-version
9.3.1
found-in-version
9.4.0
found-in-version
9.4.1
found-in-version
9.4.2
found-in-version
9.5.0
found-in-version
9.6.0
found-in-version
9.7.0
found-in-version
9.7.1
found-in-version
9.8.0
found-in-version
9.9.0
found-in-version
90.0
found-in-version
91.0
found-in-version
92.0
found-in-version
93.0
found-in-version
94.0
found-in-version
95.0
found-in-version
96.0
found-in-version
97.0
found-in-version
98.0
os:all
os:Linux
os:macOS
os:other
os:Windows
other:need-feedback
other:need-sample
res:answered
res:duplicate
res:fixed/implemented
res:not-a-bug
res:unresolved
res:wontfix
res:worksforme
type:bug
type:bug-in-external-component
type:enhancement
type:question
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mbunkus/mkvtoolnix#6120
No description provided.