wrapping h264 into mp4 and display the video on the screen
Sebastian Dröge
sebastian at centricular.com
Wed Mar 12 01:31:10 PDT 2014
On Mi, 2014-03-12 at 01:16 -0700, Dudi.r wrote:
> I have h264 packet inside RTP stream, is there a way to wrap it with mp4
> container and display the video on the screen?
>
> the main goal is to perform seek on that video.
>
> I saw a post that save the video into file, but I need to display it in real
> time...
>
> so far I have-
>
> filesrc location=file.pcap ! pcapparse ! gstrtpjitterbuffer ! rtph264depay !
> video/x-h264 ! h264parse..........
> Im not sure about the h264parse,
>
> I tried putting after the h264parse the following:
>
> ...h264parser ! mp4mux ! decodebin2 ! autovideosink
> but I get this error:
>
> ...
> New clock: GstSystemClock
> ERROR: from element
> /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstQTDemux:
> qtdemux0: This file is invalid and cannot be played.
> Additional debug info:
> qtdemux.c(4132): gst_qtdemux_chain ():
> /GstPipeline:pipeline0/GstDecodeBin2:deco
> debin20/GstQTDemux:qtdemux0:
> Execution ended after 138458245 ns.
> ...
> I also tried without the decodebin2- and nothing happens..
MP4 is not a streamable format. The container has to be finalised before
you can start demuxing it.
If you want to write to a file and display at the same time consider
using the tee element, e.g.
... ! rtph264depay ! tee name=t
t. ! queue ! decodebin ! videoconvert ! autovideosink
t. ! queue ! h264parse ! mp4mux ! filesink location=whatever.mp4
You will have to shut down the pipeline properly with an EOS event sent
to it, and then waiting until you get the EOS message from the pipeline
before setting the pipeline to the NULL state. Otherwise the resulting
MP4 file will not be finalised and not usable.
--
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140312/ad65d3c7/attachment-0001.pgp>
More information about the gstreamer-devel
mailing list