Hello,
I am new to Gstreamer so please bear with me if this has been addressed. I am trying to record video from a webcam using the command line below and would like to specify the duration for which the video/audio needs to be recorded, i.e. the command below should terminate after say 30 sec of recording. What command options and where in the command line can the recording duration be included? If there is no option, what tools are available to achieve this? gst-launch v4l2src ! 'video/x-raw-yuv,width=640,height=480,framerate=30/1' ! \ tee name=t_vid ! queue ! videoflip method=horizontal-flip ! \ xvimagesink sync=false t_vid. ! queue ! \ videorate ! 'video/x-raw-yuv,framerate=30/1' ! queue ! mux. \ pulsesrc ! audio/x-raw-int,rate=22000,channels=1,width=16 ! queue ! \ audioconvert ! queue ! mux. avimux name=mux ! \ filesink location=/test.mpg TIA, Pavel ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Hi ,
you can set "num-buffers" in v4l2src element , and I think number of buffers will depend on the framerate (fps) and the time duration ( in seconds) .
Suppose fps is 30 frame/sec and the time duration is 30 secs then num-buffers will be 30*30 = 900 .
Try this out .
On Mon, Mar 8, 2010 at 4:32 AM, Pavel Johnson <[hidden email]> wrote: Hello, -- Regards, Sudarshan Bisht ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Thanks! The num-buffers parameter helps and the video stops recording, however, the command pipeline I have (included below) continues recording audio. Is there a parameter to specify audio-time as well? Ideally, a single parameter for specifying the time for both audio and video would be preferred by separate ones are OK as well.
Also, I would hope the pipeline would terminate automatically so that it can be scripted. gst-launch v4l2src ! 'video/x-raw-yuv,width=640, height=480,framerate=30/1'
! \ Thanks,tee name=t_vid ! queue ! videoflip method=horizontal-flip ! \ xvimagesink sync=false t_vid. ! queue ! \ videorate ! 'video/x-raw-yuv,framerate=30/1' ! queue ! mux. \ pulsesrc ! audio/x-raw-int,rate=22000,channels=1,width=16 ! queue ! \ audioconvert ! queue ! mux. avimux name=mux ! \ filesink location=/test.mpg ~Pavel On Sun, Mar 7, 2010 at 7:30 PM, sudarshan bisht <[hidden email]> wrote:
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
num-buffers also works for audio src, add it to pulsesrc
2010/3/9 Pavel Johnson <[hidden email]> Thanks! The num-buffers parameter helps and the video stops recording, however, the command pipeline I have (included below) continues recording audio. Is there a parameter to specify audio-time as well? Ideally, a single parameter for specifying the time for both audio and video would be preferred by separate ones are OK as well. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |