MJPG streaming
Sebastian Dröge
sebastian at centricular.com
Mon Feb 17 11:53:05 PST 2014
On Mo, 2014-02-17 at 05:56 -0800, M0rd0r wrote:
> Hi all,
>
> I'm trying to acquire a video from my webcam and stream the video over UDP
> (also save the video in a file). My webcam supports these features:
>
> $ v4l2-ctl --list-formats
> ioctl: VIDIOC_ENUM_FMT
> Index : 0
> Type : Video Capture
> Pixel Format: 'YUYV'
> Name : YUV 4:2:2 (YUYV)
>
> Index : 1
> Type : Video Capture
> Pixel Format: 'MJPG' (compressed)
> Name : MJPEG
>
> 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)
That's not going to work well as a) you need to use the streamable
property on matroskamux, b) matroska is not streamable over a lossy
channel like UDP and c) you'll send too large buffers for an UDP packet
there.
You'll have to use a payloading mechanism like RTP for this to work
properly over UDP.
--
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/20140217/a3ca23f1/attachment.pgp>
More information about the gstreamer-devel
mailing list