Encoded file is not playable while using mp4mux in gstreamer pipe ?

Tim Müller tim at centricular.com
Tue Nov 10 08:15:52 PST 2015


On Tue, 2015-11-10 at 07:40 -0800, ssshukla26 wrote:
> 
> But the problem is if I exit the pipe in middle (i.e. i press ctrl+c
> or close the display window) then the final.mp4 is not playable (i.e.
> it won't open with any video player). It is playable if I let it
> complete its operation and the pipe exits gracefully when it reaches
> EOS of my YUV file. 

That's because mp4mux needs to write headers and tables after all the
data has been processed. If you just control-C, the file will be closed
without mp4mux having an opportunity to finalise everything.

Pass -e to gst-launch-1.0, then it should finalise everything also on
Control-C. (If you write an application, do
gst_element_send_event(pipeline,gst_event_new_eos()) and then wait for
the EOS message on the bus before setting the pipeline to NULL state).

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com




More information about the gstreamer-devel mailing list