AW: record H264 stream use multifilesink

Thornton, Keith keith.thornton at zeiss.com
Mon Nov 6 12:48:25 UTC 2017


Hi, you need to send an EOS event down the pipeline and wait till it is received by the sink. The sink then posts a message on the bus. The mov block is written to the end of the file when this EOS is received by the sink.

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] Im Auftrag von Michelle Guo
Gesendet: Montag, 6. November 2017 11:20
An: gstreamer-devel at lists.freedesktop.org
Betreff: Re: record H264 stream use multifilesink

Hi Nicolas

Thank you for your help before, I solved my problem successfully. In the record branch, I use the default muxer instead of matroskamux, and save the file as *.mp4 instead of *.mkv, then, these two branches can work both well without mosaic. 

The pipeline is like this:
    gst-launch-1.0 rtpbin name=rtpbin \
  udpsrc
caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264,payload=(int)96"
port=5000 ! queue ! rtpbin.recv_rtp_sink_0  rtpbin. ! rtph264depay ! tee  name=teevideo teevideo. ! queue ! vpudec ! overlaysink async=false \  teevideo. ! queue ! 
"video/x-h264,width=1024,height=768,framerate=(fraction)25/1" ! 
splitmuxsink location="/../data/save%d.mp4" max-files=300
max-size-time=10000000000 &

Recently, I find a new problem. The last mp4 file is unplayable, I think maybe because the splitmuxsink is not be closed. If I use C programe to explain this pipeline, I use  "gst_object_unref(GST_OBJECT(m_pipeline));" to close the pipeline, and I hope the splitmuxsink element can be closed by this way, however, the last
mp4 file is still unplayable.

I hope you can give me some advice to close splitmuxsink element and make the last mp4 file in the playable state. Thank you so much!


regsrds;
Michelle



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list