Is "codec private" element required to extract "MPEG-4p10/AVC/H.264" with mkvextract?
Steps to reproduce
- Launch Chrome browser
- Record a
MediaStream
of video withnew MediaRecorder(stream, {mimeType:'video/x-matroska;codecs=h264'})
, save the file locally (see attached file "test.mkv") -
Run
mkvmerge -J test.mkv to verify the video is encoded with the codec set
{
"attachments": [],
"chapters": [],
"container": {
"properties": {
"container_type": 17,
"is_providing_timestamps": true,
"muxing_application": "Chrome",
"writing_application": "Chrome"
},
"recognized": true,
"supported": true,
"type": "Matroska"
},
"errors": [],
"file_name": "test.mkv",
"global_tags": [],
"identification_format_version": 12,
"track_tags": [],
"tracks": [
{
"codec": "MPEG-4p10/AVC/H.264",
"id": 0,
"properties": {
"codec_id": "V_MPEG4/ISO/AVC",
"codec_private_length": 0,
"default_track": true,
"display_dimensions": "1024x404",
"display_unit": 0,
"enabled_track": true,
"forced_track": false,
"language": "eng",
"minimum_timestamp": 0,
"number": 1,
"packetizer": "mpeg4_p10_video",
"pixel_dimensions": "1024x404",
"uid": 27149384911861647
},
"type": "video"
}
],
"warnings": []
}
- Try to extract the video track using the example printed at
mkvextract -h
mkvextract test.mkv tracks 0:video.h264 timestamps_v2 0:timestamps.video.txt chapters chapters.xml tags tags.xml
observe the error message
Error: Track 0 with the CodecID 'V_MPEG4/ISO/AVC' is missing the "codec private" element and cannot be extracted.
Does mkvextract
and, or, the Matroska specification require and expect "codec private" element to be encoded in the Matroska file (particularly when the "codec"
is "MPEG-4p10/AVC/H.264"
and the "codec_id"
is "V_MPEG4/ISO/AVC"
)?