Capture Easycap audio and video to MJPEG and raw sound on linux

Sérgio Agostinho sergio.r.agostinho at gmail.com
Sun Feb 8 23:11:44 PST 2015


Hey,

Are you sure your camera supports that format and resolution? Can you run
guvcview or something similar to list your dongle's accepted formats and
resolution?. Because I tested a pipeline similar to yours and I got no
errors.

gst-launch-1.0 -v avimux name=mux videotestsrc ! video/x-raw, format=YV12,
width=720, height=576 ! videorate ! video/x-raw, format=YV12,
framerate=25/1 ! videoconvert ! video/x-raw, format=YV12, width=720,
height=576 ! jpegenc ! queue ! mux. audiotestsrc ! audio/x-raw,
format=S16LE, rate=48000, channels=2 ! audiorate ! audioresample !
audio/x-raw,rate=44100 ! audioconvert ! audio/x-raw, channels=1 ! queue !
mux. mux. ! fakesink

Cheers

2015-02-08 12:13 GMT+01:00 greeny <qrld at wp.pl>:

> Thanks for your answer Sérgio Agostinho!
> I changed command to:
>
> gst-launch-1.0 -v avimux name=mux v4l2src device=/dev/video1
> do-timestamp=true !\
>
> 'video/x-raw,format=(string)YV12,width=(int)720,height=(int)576' !\
>                videorate ! 'video/x-raw,format=(string)YV12,framerate=25/1'
> ! videoconvert !
> 'video/x-raw,format=(string)YV12,width=(int)720,height=(int)576' !\
>                jpegenc  ! queue !\
>                mux. pulsesrc
> device='alsa_input.pci-0000_00_1b.0.analog-stereo' !
> 'audio/x-raw,format=(string)S16LE,rate=(int)48000,channels=(int)2' !\
>                audiorate ! audioresample ! 'audio/x-raw,rate=(int)44100' !
> audioconvert ! 'audio/x-raw,channels=(int)1' ! queue ! mux. mux. ! filesink
> location=test.avi
>
> then I got:
>
> Setting pipeline to PAUSED ...
> Pipeline is live and does not need PREROLL ...
> Setting pipeline to PLAYING ...
> ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal
> data flow error.
> Additional debug info:
> gstbasesrc.c(2933): gst_base_src_loop ():
> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
> streaming task paused, reason not-negotiated (-4)
> Execution ended after 0:00:00.000071814
> Setting pipeline to PAUSED ...
> /GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: source-output-index = 11
> Setting pipeline to READY ...
> Setting pipeline to NULL ...
> Freeing pipeline ...
>
> What could be wrong?
> Here is output of the same command with -gst-debug-level=4 :
> http://pastebin.com/2NupVLVn
>
>
>
> --
> View this message in context:
> http://gstreamer-devel.966125.n4.nabble.com/Capture-Easycap-audio-and-video-to-MJPEG-and-raw-sound-on-linux-tp4670613p4670645.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150209/683e419f/attachment.html>


More information about the gstreamer-devel mailing list