GNOME Bugzilla – Bug 532723
mpeg4videoparse should parse the codec data
Last modified: 2008-05-13 17:22:05 UTC
A pipeline like rtspsrc .. ! mpeg4videoparse ! matroskamux currently creates invalid matroska files. This is partly the fault of the matroskamuxer, but in the end it still needs at least width and height set. Thus something needs to parse the mpeg4 config data and set these caps appropriately. mpeg4videoparse seems to be the best candidate
Created attachment 110760 [details] [review] Add codec data parse capabilities Added a patch to make mpeg4videoparse a lot nicer.. features: * Parses the config data (either outbound or in the stream) to set width/height, apect ration, framerate in the caps if applicable. * Marks frames as GST_BUFFER_FLAG_DELTA_UNIT when they are not intra frames * Sets the timestamps of outgoing buffers to the buffer in which the VOP header was found. * Drops incoming data untill configuration is found (by default, configurable using a property). The only thing left is to set the latency on the element.. Which is a bit tricky as the framerate might be variable, suggestions on how to solve this welcome :)
Fixed the parsing of the framerate. Added a 1 frame latency which seems to make unjitterbuffered RTP playback smooth again. Patch by: Sjoerd Simons <sjoerd at luon dot net> * gst/mpeg4videoparse/mpeg4videoparse.c: (gst_mpeg4vparse_set_new_caps), (gst_mpeg4vparse_align), (get_bits), (next_start_code), (gst_mpeg4vparse_handle_vos), (gst_mpeg4vparse_push), (gst_mpeg4vparse_drain), (gst_mpeg4vparse_chain), (gst_mpeg4vparse_sink_setcaps), (gst_mpeg4vparse_sink_event), (gst_mpeg4vparse_src_query), (gst_mpeg4vparse_set_property), (gst_mpeg4vparse_get_property), (gst_mpeg4vparse_class_init), (gst_mpeg4vparse_init): * gst/mpeg4videoparse/mpeg4videoparse.h: Parse the config data (either outbound or in the stream) to set width/height, apect ration, framerate in the caps if applicable. Mark frames as GST_BUFFER_FLAG_DELTA_UNIT when they are not intra frames Set the timestamps of outgoing buffers to the buffer in which the VOP header was found. Drop incoming data untill configuration is found (by default, configurable using a property). Report a 1 frame latency. Fixes #532723.