GNOME Bugzilla – Bug 682330
GstDiscoverer + matroska parser + mpeg streams: weird results
Last modified: 2016-02-22 08:05:52 UTC
Created attachment 221964 [details] Test file I've attached a test file (simple mpeg video and LOTS of Matroska tags). When gst-discoverer is run on it, the result is: Topology: container: video/x-matroska video: video/mpeg, systemstream=(boolean)false, mpegversion=(int)1, width=(int)320, height=(int)200, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)48000/1001, interlace-mode=(string)mixed Codec: video/mpeg, systemstream=(boolean)false, mpegversion=(int)1, width=(int)320, height=(int)200, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)48000/1001, interlace-mode=(string)mixed Additional info: None Width: 320 Height: 200 Depth: 0 Frame rate: 48000/1001 Pixel aspect ratio: 1/1 Interlaced: true Bitrate: 0 Max bitrate: 0 Tags: None video: video/mpeg, systemstream=(boolean)false, mpegversion=(int)1, width=(int)320, height=(int)200, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)24000/1001, interlace-mode=(string)mixed, parsed=(boolean)true, codec_data=(buffer)000001b31400c811ffffe0a4 Codec: video/mpeg, systemstream=(boolean)false, mpegversion=(int)1, width=(int)320, height=(int)200, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)24000/1001, interlace-mode=(string)mixed, parsed=(boolean)true, codec_data=(buffer)000001b31400c811ffffe0a4 Additional info: None Width: 320 Height: 200 Depth: 0 Frame rate: 24000/1001 Pixel aspect ratio: 1/1 Interlaced: false Bitrate: 0 Max bitrate: 0 Tags: taglist, title=(string){ filesegmenttitle, ALBUM/TITLE, TITLE }, artist=(string){ ALBUM/ARTIST, ARTIST }, copyright=(string)COPYRIGHT, composer=(string)COMPOSER, genre=(string)GENRE, encoder=(string)ENCODER, isrc=(string)ISRC, license=(string)TERMS_OF_USE, image=(GstSample)NULL, container-format=(string)Matroska, video-codec=(string)"MPEG\ 1\ Video", language-code=(string)de; Properties: Duration: 0:00:04.171000000 Seekable: yes Tags: title: filesegmenttitle, ALBUM/TITLE, TITLE artist: ALBUM/ARTIST, ARTIST copyright: COPYRIGHT composer: COMPOSER genre: GENRE encoder: ENCODER ISRC: ISRC license: TERMS_OF_USE image: (null) container format: Matroska video codec: MPEG 1 Video language code: de What's wrong with it: 1) Nested video streams with different framerate. 2) Matroska parser does not understand the concept of tags that depend on context (i.e. TargetType), and thus can't tell a difference between album title and track title. Same goes for track number. 3) Matroska parser simply misses some tags. ENCODED_BY, for example. Even if some tags were unknown, parser should have used EXTENDED_COMMENT tag type to present them as key=value pairs.
This now shows the expected result: Topology: container: video/x-matroska video: video/mpeg, systemstream=(boolean)false, mpegversion=(int)1, width=(int)320, height=(int)200, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)48000/1001, interlace-mode=(string)mixed, parsed=(boolean)true, codec_data=(buffer)000001b31400c811ffffe0a4 Tags: title: filesegmenttitle, TITLE, SUBTITLE, VIDEO/TITLE container format: Matroska album: ALBUM/TITLE album artist: ALBUM/ARTIST track count: 20 extended comment: PART_OFFSET=5 track number: 10 copyright: COPYRIGHT contact: COPYRIGHT/EMAIL, COPYRIGHT/ADDRESS date: 1999-01-01 comment: The purpose of this file is to hold as many examples of Matroska tags as possible. artist: ARTIST performer: ACCOMPANIMENT, CONDUCTOR composer: COMPOSER lyrics: LYRICS encoded by: ENCODED_BY genre: GENRE description: DESCRIPTION keywords: KEYWORDS geo location name: RECORDING_LOCATION encoder: ENCODER ISRC: ISRC license: LICENSE video codec: MPEG-1 video language code: de image: buffer of 207 bytes, type: image/png Codec: video/mpeg, systemstream=(boolean)false, mpegversion=(int)1, width=(int)320, height=(int)200, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)48000/1001, interlace-mode=(string)mixed, parsed=(boolean)true, codec_data=(buffer)000001b31400c811ffffe0a4 Additional info: None Stream ID: c14462593ebb27327ff7502a49e2b2b177425b48ccc521070aab90feb42ba29b/13860900183401287586 Width: 320 Height: 200 Depth: 24 Frame rate: 48000/1001 Pixel aspect ratio: 1/1 Interlaced: false Bitrate: 0 Max bitrate: 0 Properties: Duration: 0:00:04.171000000 Seekable: yes Tags: title: filesegmenttitle, TITLE, SUBTITLE, VIDEO/TITLE container format: Matroska album: ALBUM/TITLE album artist: ALBUM/ARTIST track count: 20 extended comment: PART_OFFSET=5 track number: 10 copyright: COPYRIGHT contact: COPYRIGHT/EMAIL, COPYRIGHT/ADDRESS date: 1999-01-01 comment: The purpose of this file is to hold as many examples of Matroska tags as possible. artist: ARTIST performer: ACCOMPANIMENT, CONDUCTOR composer: COMPOSER lyrics: LYRICS encoded by: ENCODED_BY genre: GENRE description: DESCRIPTION keywords: KEYWORDS geo location name: RECORDING_LOCATION encoder: ENCODER ISRC: ISRC license: LICENSE video codec: MPEG-1 video language code: de image: buffer of 207 bytes, type: image/png