GNOME Bugzilla – Bug 569305
[mgpegvideoparse] not all tags show up in gst.extend.discoverer
Last modified: 2011-09-14 14:22:47 UTC
running gst.extend.discoverer on some files, the video-codec tag does not show up. audio/video duration is also not constant i.e. this happens for: http://blip.tv/file/get/Aljazeeraasset-WarOnGazaDay18793.mpg
I think this problem is most likely due to the underlying elements and not due to gst-python. Could you confirm this happens with totem and either: * re-open this bug if totem shows the video-codec and the duration is constant, or * open a bug against the proper gstreamer module corresponding to the plugins if it fails with totem.
video codec is n/a in totem. can not properly check duration, the one displayed at the bottom left seams to be the same, it only displays seconds though.
The length is fluctuating in when discovering the stream. Once downloaded its fine. gst-discoverer-0.10 Aljazeeraasset-WarOnGazaDay18793.mpg\?brs\=5223\&bri\=54.0 Analyzing file:///home/ensonic/Desktop/Aljazeeraasset-WarOnGazaDay18793.mpg%3Fbrs=5223&bri=54.0 Done discovering file:///home/ensonic/Desktop/Aljazeeraasset-WarOnGazaDay18793.mpg%3Fbrs=5223&bri=54.0 Topology: container: MPEG-2 System Stream audio: MPEG-1 Layer 2 (MP2) video: MPEG-2 Video Properties: Duration: 0:14:07.744000000 Seekable: yes Tags: audio codec: MPEG 1 Audio, Layer 2 nominal bitrate: 224000 has crc: false channel mode: stereo bitrate: 6000000 layer: 2 mode: stereo emphasis: none gst-discoverer-0.10 http://blip.tv/file/get/Aljazeeraasset-WarOnGazaDay18793.mpg Analyzing http://blip.tv/file/get/Aljazeeraasset-WarOnGazaDay18793.mpg Done discovering http://blip.tv/file/get/Aljazeeraasset-WarOnGazaDay18793.mpg Topology: container: MPEG-2 System Stream audio: MPEG-1 Layer 2 (MP2) video: MPEG-2 Video Properties: Duration: 0:11:42.778655555 Seekable: yes Tags: bitrate: 6000000 audio codec: MPEG 1 Audio, Layer 2 nominal bitrate: 224000 has crc: false channel mode: stereo layer: 2 mode: stereo emphasis: none The missing video-tage seems to be a mpegvideoparse issue: gst-launch -t playbin2 uri=http://blip.tv/file/get/Aljazeeraasset-WarOnGazaDay18793.mpg Setting pipeline to PAUSED ... Pipeline is PREROLLING ... FOUND TAG : found by element "mpegvideoparse0". bitrate: 6000000 FOUND TAG : found by element "mpegaudioparse0". audio codec: MPEG 1 Audio, Layer 2 nominal bitrate: 224000 FOUND TAG : found by element "mpegaudioparse0". has crc: FALSE channel mode: stereo FOUND TAG : found by element "mad0". layer: 2 mode: stereo emphasis: none bitrate: 224000 FOUND TAG : found by element "mpegaudioparse0". minimum bitrate: 224000 bitrate: 224000 maximum bitrate: 224000
Created attachment 196415 [details] [review] mpegvideoparse: send a video-codec tag
This sets either "MPEG 1 video" or "MPEG 2 video". Not sure if there's any extra distinction to be made.
While this will (mostly) work, it is not entirely by the book. That is, the order of "events" should be: * src caps set * downstream element gets plugged in after parser * newsegment event sent * tag event(s) sent Some special care and handling is done in BaseParse to arrange for the above, and subclass should keep that in mind as well, which means performing _found_tags at the proper time/place (see e.g. mpegaudioparse). Will make a variation on this patch in line with above.
commit a31d541f0757e5a7446acec03c9d1eb20d409ad1 Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> Date: Wed Sep 14 16:14:24 2011 +0200 mpegvideoparse: send a video-codec tag https://bugzilla.gnome.org/show_bug.cgi?id=569305