MJPG streaming

Tim Müller tim at centricular.com
Tue Feb 18 08:10:18 PST 2014


On Mon, 2014-02-17 at 05:56 -0800, M0rd0r wrote:

Hi,

> So I'd like to acquire the MJPG video (not the yuyv) from the webcam, save
> it on a file and stream it over UDP.
> 
> I successfully make the first part using:
> $ gst-launch -vvv -e v4l2src num-buffers=1000 device=/dev/video0 !
> image/jpeg,width=1280,height=720,framerate=30/1,rate=30 ! matroskamux !
> filesink location=video.mkv
> 
> I'm not able to add the UDP streaming in this command (like udpsink
> host=192.168.10.158 port=1234)

Maybe try something like this (completely untested):

 gst-launch -e v4l2src num-buffers=1000 device=/dev/video0 ! \
     imag/jpeg,width=1280,height=720,framerate=30/1 ! \
     tee name=t \
         t. ! queue ! matroskamux ! filesink location=video.mkv \
         t. ! queue ! rtpjpegpay ! udpsink

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



More information about the gstreamer-devel mailing list