[FFmpeg-devel] Mpeg4 in matroska vs. WDTV

Pallai Roland pallair
Sat Dec 18 02:38:18 CET 2010


Hi,


I've a WDTV Live with WDLXTV-0.4.3.1 firmware. It cannot show
mpeg4/xvid video streams from matroska files which are created by
remuxing (-vcodec copy) or re-encoding (-vcodec libxvid) via ffmpeg.
The ffplay, vlc, gstreamer plays those mkv files well. Muxed videos by
mkvmerge are working on the WDLXTV too!

So I compared mkv files created by ffmpeg and mkvmerge and I found
mkvmerge doesn't subtract codec private data (42 bytes) from the video
stream. The videos created by ffmpeg are also playable if I patch
ffmpeg to prepend the video stream with the codec private data (patch
attached). The vlc, mplayer, ffplay also plays those newly created
files without any warning or problem.
Seems like that WDTV can't handle the CodecPrivate data in matroska,
leastwise with mpeg4 (xvid) video streams.

Who does the right thing and who breaks the matroska specification here..?



Mkvinfo on a playable video created by patched ffmpeg (-vcodec copy):

+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ EBML maximum ID length: 4
|+ EBML maximum size length: 8
|+ Doc type: matroska
|+ Doc type version: 2
|+ Doc type read version: 2
+ Segment, size 7661961
|+ Seek head (subentries will be skipped)
|+ EbmlVoid (size: 147)
|+ Segment information
| + Timecode scale: 1000000
| + Muxing application: Lavf52.64.2
| + Writing application: Lavf52.64.2
| + Segment UID: 0x96 0x78 0xce 0x5d 0xd0 0xe5 0x4a 0x1a 0x14 0x45
0x92 0x9b 0x2e 0x43 0x92 0x99
| + Duration: 59.935s (00:00:59.935)
|+ Segment tracks
| + A track
|  + Track number: 1
|  + Track UID: 1
|  + Lacing flag: 0
|  + Language: und
|  + Codec ID: V_MPEG4/ISO/ASP
|  + Track type: video
|  + Default duration: 41.708ms (23.976 fps for a video track)
|  + Video track
|   + Pixel width: 624
|   + Pixel height: 352
|   + Display width: 624
|   + Display height: 352
|  + CodecPrivate, length 42
|+ Cluster


Mkvinfo on a playable video created by mkvmerge:

+ EBML head
|+ Doc type: matroska
|+ Doc type version: 2
|+ Doc type read version: 2
+ Segment, size 315264824
|+ Seek head (subentries will be skipped)
|+ EbmlVoid (size: 4027)
|+ Segment information
| + Timecode scale: 1000000
| + Muxing application: libebml v0.7.8 + libmatroska v0.8.1
| + Writing application: mkvmerge v3.3.0 ('Language') built on Mar 27
2010 16:37:54
| + Duration: 2501.124s (00:41:41.124)
| + Date: Sat Dec 18 01:29:13 2010 UTC
| + Segment UID: 0x0e 0xca 0xe8 0x67 0xf9 0x16 0x50 0x35 0x8b 0x0f
0x65 0x10 0x67 0x37 0xbe 0x06
|+ Segment tracks
| + A track
|  + Track number: 1
|  + Track UID: 3891030629
|  + Track type: video
|  + Enabled: 1
|  + Default flag: 1
|  + Forced flag: 0
|  + Lacing flag: 0
|  + MinCache: 1
|  + Timecode scale: 1
|  + Max BlockAddition ID: 0
|  + Codec ID: V_MS/VFW/FOURCC
|  + Codec decode all: 1
|  + CodecPrivate, length 40 (FourCC: XVID, 0x44495658)
|  + Default duration: 41.708ms (23.976 fps for a video track)
|  + Language: und
|  + Video track
|   + Pixel width: 624
|   + Pixel height: 352
|   + Interlaced: 0
|   + Display width: 624
|   + Display height: 352
|+ EbmlVoid (size: 1024)
|+ Cluster
-------------- next part --------------
A non-text attachment was scrubbed...
Name: matroskaenc.c.diff
Type: application/octet-stream
Size: 1247 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101218/3bde92f1/attachment.obj>



More information about the ffmpeg-devel mailing list