How to save h264 stream to a video file on Hard Disk?

Nicolas Dufresne nicolas at
Mon May 29 14:18:04 UTC 2017

Le samedi 27 mai 2017 à 04:28 -0700, GurpreetSingh a écrit :
> I have camera which outputs h.264 stream. 
> Now, I need to capture that stream and store it to playable video mp4
> file.
> I have gone through lot of blogs from internet, but all blogs talks
> about
> achieving it through command line. 
> I need a code which will get me playable file (in mp4 container).
> Also I don't need any type of decoding. The data sent from camera
> should not
> be decoded and should be stored to MP4 playable file in encoding
> format only
> (stream sent by camera till it is stored in a file should not be
> decoded)
> Can anyone help me on this?
> Please confirm if any other information is required.

You can always use the same syntax in your code. See gst_parse_launch()
function. For the rest, it's just programming a GStreamer app. The
following link is a documentation on how to turn your gst-launch-1.0
test into a proper application.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the gstreamer-devel mailing list