mkvpropedit corrupts a file
#some steps to recreate
#make an mkv file ffmpeg -f lavfi -i testsrc -t 1 test.mkv
#see mkv structure mkvinfo test.mkv
+ 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 8243
|+ Seek head (subentries will be skipped)
|+ EBML void: size 149
|+ Segment information
| + Timestamp scale: 1000000
| + Multiplexing application: Lavf58.18.104
| + Writing application: Lavf58.18.104
| + Segment UID: 0x0e 0xfe 0xe8 0xf9 0xd6 0x12 0xf0 0x1f 0x47 0xb1 0xcd 0x45 0xc5 0x8c 0xdd 0x24
| + Duration: 00:00:01.000000000
|+ Tracks
| + Track
| + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
| + Track UID: 1
| + Lacing flag: 0
| + Language: und
| + Codec ID: V_MPEG4/ISO/AVC
| + Track type: video
| + Default duration: 00:00:00.040000000 (25.000 frames/fields per second for a video track)
| + Video track
| + Pixel width: 320
| + Pixel height: 240
| + Codec's private data: size 41 (h.264 profile: High 4:4:4 Predictive @L1.3)
|+ Tags
| + Tag
| + Targets
| + Simple
| + Name: ENCODER
| + String: Lavf58.18.104
| + Tag
| + Targets
| + Track UID: 1
| + Simple
| + Name: ENCODER
| + String: Lavc58.32.100 libx264
| + Tag
| + Targets
| + Track UID: 1
| + Simple
| + Name: DURATION
| + String: 00:00:01.000000000
|+ Cluster
add a title
mkvpropedit test.mkv -s title="123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"
The file is being analyzed.
The changes are written to the file.
Done.
check mkv
mkvinfo test.mkv
+ 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 8243
|+ Seek head (subentries will be skipped)
|+ Segment information
| + Timestamp scale: 1000000
| + Multiplexing application: Lavf58.18.104
| + Writing application: Lavf58.18.104
| + Segment UID: 0x57 0xe9 0x46 0x3e 0x27 0xba 0xdd 0x41 0x54 0xdb 0x60 0x32 0xc5 0xe2 0x88 0xe2
| + Duration: 00:00:01.000000000
| + Title: 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
|+ EBML void: size 2
|+ Tracks
| + Track
| + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
| + Track UID: 1
| + Lacing flag: 0
| + Language: und
| + Codec ID: V_MPEG4/ISO/AVC
| + Track type: video
| + Default duration: 00:00:00.040000000 (25.000 frames/fields per second for a video track)
| + Video track
| + Pixel width: 320
| + Pixel height: 240
| + Codec's private data: size 41 (h.264 profile: High 4:4:4 Predictive @L1.3)
|+ Tags
| + Tag
| + Targets
| + Simple
| + Name: ENCODER
| + String: Lavf58.18.104
| + Tag
| + Targets
| + Track UID: 1
| + Simple
| + Name: ENCODER
| + String: Lavc58.32.100 libx264
| + Tag
| + Targets
| + Track UID: 1
| + Simple
| + Name: DURATION
| + String: 00:00:01.000000000
|+ Cluster
Add some interlacement data.
mkvpropedit test.mkv -e track:v1 -s interlaced=1
The file is being analyzed.
The changes are written to the file.
Done.
check again
mkvinfo test.mkv
+ 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 8243
|+ Seek head (subentries will be skipped)
|+ Segment information
| + Timestamp scale: 1000000
| + Multiplexing application: Lavf58.18.104
| + Writing application: Lavf58.18.104
| + Segment UID: 0x57 0xe9 0x46 0x3e 0x27 0xba 0xdd 0x41 0x54 0xdb 0x60 0x32 0xc5 0xe2 0x88 0xe2
| + Duration: 00:00:01.000000000
| + Title: 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
|+ Tracks
| + Track
| + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
| + Track UID: 1
| + Lacing flag: 0
| + Language: und
| + Codec ID: V_MPEG4/ISO/AVC
| + Track type: video
| + Default duration: 00:00:00.040000000 (25.000 frames/fields per second for a video track)
| + Video track
| + Pixel width: 320
| + Pixel height: 240
| + Interlaced: 1
| + Codec's private data: size 41 (h.264 profile: High 4:4:4 Predictive @L1.3)
Warning: test.mkv: Error in the Matroska file structure at position 506. Resyncing to the next level 1 element.
Warning: Resync failed: no valid Matroska level 1 element found.
:-/