GNOME Bugzilla – Bug 348756
[typefinding] not working for a MAVIX mpeg2 stream
Last modified: 2006-08-17 07:30:49 UTC
Please describe the problem: when I try the typefind ele;ent on the mpeg2 stream from the mavix decoder the type of the stream is not found. because they seen to be using completely the standard. Steps to reproduce: Just try to typefind the stream with GStreamer Actual results: No type found Expected results: mpeg2 type found Does this happen every time? Yes Other information: If it is needed I can provide a capture of the stream. I made a patch that added the behavour of the mavix stream to the typefind element of mpeg, and it works for this element.
Created attachment 69651 [details] [review] Mavix mpeg2 patch This patch makes it possible to detect a mpeg2 stream from a mavix encoder.
Thanks for the report and the patch. Could you also provide a sample of such a file where typefinding fails? You can create one with $ head --bytes=500k foo.mpg > sample.mpg
Created attachment 69666 [details] 500k mavix sample This is a sample of the mavix mpeg2 stream. Gr,
On the face of it, the problem seems to be that there is about 600-700 bytes of junk at the start of the file. It looks like it was indiscriminately cut without respecting a the packet boundaries. It seems reasonable to me that the typefind function could search some of the start of the file to skip such garbage, although it should probably do it more efficiently than in this patch, because it knows it needs a buffer that starts with 0x00 0x00 0x01 to have any hope of it being an MPEG packet header.
This is a part of a MPEG2 stream (multicast) So indeed there is some junk at the beginning of the stream that is not of any use for new subscribers of the multicast. I will look at a more efficient way to solve this problem.
This is not a Bug in GStreamer but bad use of GStreamer. The RTP depayloader can strip of the first piece that is not in use. Closing this bug as NOTABUG