[gst-devel] Using mkv (mjpeg) files with gnlcomposition/gnlfilesource
rmcouat at smartt.com
Fri Jul 2 18:06:00 CEST 2010
The camera is a live source so unless souphttpsrc detects a connection
close causing it to send EOS the pipeline carries on forever. What I did
is block the src pad of the queue2 (my_queue1) then injected the EOS in
the sink pad of the next element. I am not sure if this is required but
for my purposes I wanted to keep the src running. You have to wait for
the EOS in the message handler to be sure matroskamux has finished
writing the index at the end of file, sending EOS and immediately
shutting down won't do it. The message handler is where you do the final
Are you aware of mkvtools? You should be able to load them in from your
distribution (yum, synaptic) depending on your flavor of Linux. There is
also a GUI front end to these tools. The mkvinfo program will show the
detailed structure of the file. Make a known good file with something
like videotestsrc with a specific number of buffers so the EOS occurs
normally - you should only need gst-launch and look at the overall
structure of that file then compare to the ones you are building with
the webcam source.
On 10-07-02 6:57 AM, Wes Miller wrote:
> As you suggested, I tried playing the mkv through totem. It doesn't play.
> However, it will play using
> gst-launch filesrc location=1.mkv ! matroskademux ! jpegdec !
> ffmpegcolorspace ! autovideosink
> I suppose this tells me something about how i recorded the mkv in the first
> place. i used a gst_parse_launch()-ed pipe which I ended by sending an EOS
> to the pipeline.:
> "souphttpsrc name=my_src "
> "! multipartdemux name=my_demux "
> "! image/jpeg,width=640,height=480 "
> "! tee name=t t. "
> "! queue2 name=my_queue1 "
> "! matroskamux name=my_mux "
> "! filesink name=my_sink t. "
> "! queue2 name=my_queue2 "
> "! appsink name=my_appsink "
> (the appsink allows me to record the timestamp on each frame).
> What did I miss?
More information about the gstreamer-devel