Wrong timestamps when remuxing an AV1 stream from ivf source
Just remux the above files with mkvtoolnix to reproduce.
Here's the output i get:
AV1
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ Maximum EBML ID length: 4
|+ Maximum EBML size length: 8
|+ Document type: matroska
|+ Document type version: 4
|+ Document type read version: 2
+ Segment: size 328490
|+ Seek head (subentries will be skipped)
|+ EBML void: size 4029
|+ Segment information
| + Timestamp scale: 1000000
| + Multiplexing application: libebml v1.3.7 + libmatroska v1.5.0
| + Writing application: mkvmerge v33.1.0 ('Primrose') 64-bit
| + Duration: 00:00:00.920000000
| + Date: Fri May 17 22:21:58 2019 UTC
| + Segment UID: 0xff 0x0f 0x83 0x5d 0xcd 0xbe 0x9c 0xe7 0xd1 0x73 0xc0 0xbe 0x55 0x12 0xda 0xb8
|+ Tracks
| + Track
| + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
| + Track UID: 17981362856166563308
| + Track type: video
| + Codec ID: V_AV1
| + Default duration: 00:00:00.041708333 (23.976 frames/fields per second for a video track)
| + Language: und
| + Video track
| + Pixel width: 800
| + Pixel height: 800
| + Display width: 800
| + Display height: 800
| + Codec's private data: size 17
|+ EBML void: size 1046
|+ Cluster
| + Cluster timestamp: 00:00:00.000000000
| + Simple block: key, track number 1, 1 frame(s), timestamp 00:00:00.000000000
| + Frame with size 87493
| + Simple block: track number 1, 1 frame(s), timestamp 00:00:00.040000000
| + Frame with size 104121
| + Simple block: track number 1, 1 frame(s), timestamp 00:00:00.080000000
| + Frame with size 5243
| + Simple block: track number 1, 1 frame(s), timestamp 00:00:00.120000000
| + Frame with size 3445
Notice how DefaultDuration is 1/23.976 but timestamps look like how they should be if it was 1/25 instead. As there's no codec level timing information in the AV1 stream, this is supposedly based on information available in the ivf container.
VP9
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ Maximum EBML ID length: 4
|+ Maximum EBML size length: 8
|+ Document type: matroska
|+ Document type version: 4
|+ Document type read version: 2
+ Segment: size 280529
|+ Seek head (subentries will be skipped)
|+ EBML void: size 4029
|+ Segment information
| + Timestamp scale: 1000000
| + Multiplexing application: libebml v1.3.7 + libmatroska v1.5.0
| + Writing application: mkvmerge v33.1.0 ('Primrose') 64-bit
| + Duration: 00:00:00.959000000
| + Date: Fri May 17 22:21:51 2019 UTC
| + Segment UID: 0x06 0xa4 0x27 0x7a 0x52 0x8e 0xfc 0x87 0x7d 0xc9 0x59 0x26 0x59 0xe6 0x2d 0xd8
|+ Tracks
| + Track
| + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
| + Track UID: 8680265773849293756
| + Track type: video
| + Codec ID: V_VP9
| + Default duration: 00:00:00.041708333 (23.976 frames/fields per second for a video track)
| + Language: und
| + Video track
| + Pixel width: 800
| + Pixel height: 800
| + Display width: 800
| + Display height: 800
| + Codec's private data: size 9
|+ EBML void: size 1054
|+ Cluster
| + Cluster timestamp: 00:00:00.000000000
| + Simple block: key, track number 1, 1 frame(s), timestamp 00:00:00.000000000
| + Frame with size 95074
| + Simple block: track number 1, 1 frame(s), timestamp 00:00:00.042000000
| + Frame with size 17199
| + Simple block: track number 1, 1 frame(s), timestamp 00:00:00.083000000
| + Frame with size 6304
| + Simple block: track number 1, 1 frame(s), timestamp 00:00:00.125000000
| + Frame with size 7742
VP8
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ Maximum EBML ID length: 4
|+ Maximum EBML size length: 8
|+ Document type: matroska
|+ Document type version: 4
|+ Document type read version: 2
+ Segment: size 342934
|+ Seek head (subentries will be skipped)
|+ EBML void: size 4029
|+ Segment information
| + Timestamp scale: 1000000
| + Multiplexing application: libebml v1.3.7 + libmatroska v1.5.0
| + Writing application: mkvmerge v33.1.0 ('Primrose') 64-bit
| + Duration: 00:00:00.959000000
| + Date: Fri May 17 22:21:39 2019 UTC
| + Segment UID: 0x39 0x7c 0x50 0x7a 0x60 0x02 0xed 0xfc 0xa1 0xaa 0xa7 0xe8 0x25 0x50 0xf3 0x25
|+ Tracks
| + Track
| + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
| + Track UID: 16295183390356183792
| + Track type: video
| + Codec ID: V_VP8
| + Default duration: 00:00:00.041708333 (23.976 frames/fields per second for a video track)
| + Language: und
| + Video track
| + Pixel width: 800
| + Pixel height: 800
| + Display width: 800
| + Display height: 800
|+ EBML void: size 1066
|+ Cluster
| + Cluster timestamp: 00:00:00.000000000
| + Simple block: key, track number 1, 1 frame(s), timestamp 00:00:00.000000000
| + Frame with size 168834
| + Simple block: track number 1, 1 frame(s), timestamp 00:00:00.042000000
| + Frame with size 2787
| + Simple block: track number 1, 1 frame(s), timestamp 00:00:00.083000000
| + Frame with size 4831
| + Simple block: track number 1, 1 frame(s), timestamp 00:00:00.125000000
| + Frame with size 5616
Whereas both of these have correct timestamps.