RAW H264 to MP4

Tim Müller tim at centricular.com
Thu May 8 03:14:14 PDT 2014


On Thu, 2014-05-08 at 08:20 +0200, Robin Aproskie wrote:

Hi Robin,

> So how do you execute the  '-e' option in C ?

gst_element_send_event (pipeline, gst_event_new_eos());

... wait for EOS message on bus ...

Cheers
 -Tim
 
>  
>         On Tue, 2014-05-06 at 16:16 -0400, Luis de Bethencourt wrote:
>         
>         > Not sure if this is possible.
>         > Not sure if you can mux again the h264 considering
>         > timestamps/keyframes change very easily.
>         > Please somebody correct me if I am wrong.
>         
>         
>         Why would it not work? It should work just fine.
>         
>         This seems to work for me with 1.2.4:
>         
>          $ gst-launch-1.0 videotestsrc ! x264enc ! rtph264pay
>         config-interval=10
>         pt=96 ! udpsink host=127.0.0.1 port=5001 &
>         
>          $ gst-launch-1.0 -v -e udpsrc address=127.0.0.1 port=5001
>         caps='application/x-rtp, media=(string)video,
>         clock-rate=(int)90000,
>         encoding-name=(string)H264' ! rtpjitterbuffer ! rtph264depay !
>         h264parse ! mp4mux ! filesink location=/tmp/rtp.mp4
> 
> 
> I was wrong. That is very cool! 
> 
> 
> Thanks Tim.
> 
> 
> Luis
>  
>         
>         Might take a few seconds for things to start on the receiver
>         (lower
>         config-interval on the sender to make that faster).
>         
>         Important is the -e argument here, to make sure that the .mp4
>         file gets
>         finalized properly when you stop the receiver with Control-C.
>         
>         Cheers
>          -Tim
>         
>         > On 6 May 2014 06:07, digi <griesel at me.com> wrote:
>         >         Hey guys,
>         >
>         >         *tx:* gst-launch-1.0 filesrc location=input.h264 !
>         >         video/x-h264,width=640,height=480,framerate=30/1 !
>         h264parse !
>         >         rtph264pay
>         >         config-interval=10 pt=96 ! udpsink host=127.0.0.1
>         port=5001
>         >
>         >         *rx:* gst-launch-1.0 -v udpsrc port=5001
>         >         caps='application/x-rtp,
>         >         media=(string)video, clock-rate=(int)90000,
>         >         encoding-name=(string)H264' !
>         >         rtph264depay !
>         >         video/x-h264,width=640,height=480,framerate=30/1 !
>         h264parse
>         >         ! mp4mux ! filesink location=output.mp4
>         >
>         >         The rx command gave me:
>         >         0x7f908c0cda30 WARN qtmux
>         >         gstqtmux.c:2116:check_and_subtract_ts:<mp4mux0>
>         >         Subtraction would result in negative value, using 0
>         as result
>         >
>         >         What is the right way to convert raw h264 data into
>         mp4 files
>         >         without
>         >         re-encoding?
>         >
>         >         Thanks,
>         >         Digi
>         >
>         >
>         >
>         >         --
>         >         View this message in context:
>         >
>         http://gstreamer-devel.966125.n4.nabble.com/RAW-H264-to-MP4-tp4666761.html
>         >         Sent from the GStreamer-devel mailing list archive
>         at
>         >         Nabble.com.
>         >         _______________________________________________
>         >         gstreamer-devel mailing list
>         >         gstreamer-devel at lists.freedesktop.org
>         >
>         http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>         >
>         >
>         > _______________________________________________
>         > gstreamer-devel mailing list
>         > gstreamer-devel at lists.freedesktop.org
>         >
>         http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>         
>         
>         --
>         Tim Müller, Centricular Ltd - http://www.centricular.com
>         
>         _______________________________________________
>         gstreamer-devel mailing list
>         gstreamer-devel at lists.freedesktop.org
>         http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>         
> 
> 
> **********************************************************************
> Relevant company disclaimers are available at the following addresses:
>   Tellumat (Pty) Ltd e-mail:
> mailto:disclaimer at tellumat.com?Subject=Tellumat_Disclaimer
>   Web:  http://www.tellumat.com/email.aspx
> **********************************************************************
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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



More information about the gstreamer-devel mailing list