This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Gstremer:taking photos and show v4l2src stream with different sizes

Hi,
On my embedded linux platform I have 320x240 lcd display and usb webcam. I can display my webcam view via "gst-launch -e v4l2src ! video/x-raw-yuv,width=320,height=240,framerate=30/1 ! ffmpegcolorspace ! fbdevsink device=/dev/fb0".
Also I can capture a frame using  of "gst-launch -e v4l2src num-buffers=1 ! video/x-raw-yuv,width=640,height=480,framerate=20/1 ! ffmpegcolorspace ! jpegenc !  filesink location=/tmp/test.jpg".
But I want to do above things at the same time (while my display is showing webcam view I want to get a jpg image which must be 640x480 at least). Is the any way to do this?
I have tried "gst-launch -e v4l2src num-buffers=100 ! tee name=t ! queue ! video/x-raw-yuv,width=640,height=480,framerate=30/1 ! ffmpegcolorspace ! jpegenc ! multifilesink location=/tmp/test%d.jpg t. ! queue ! video/x-raw-yuv,width=640,height=640,framerate=30/1 ! ffmpegcolorspace ! fbdevsink device=/dev/fb0 " but my lcd is 320x240 so I cant see full frame on my lcd.
Is there any way to do this?
please help me.
Regards
Emre

  • Hi,

    1) Put your streamer command in background & run capture,  im not sure it gonna work , let try

    (i) gst-launch -e v4l2src ! video/x-raw-yuv,width=320,height=240,framerate=30/1 ! ffmpegcolorspace ! fbdevsink device=/dev/fb0 &

    (ii) gst-launch -e v4l2src num-buffers=1 ! video/x-raw-yuv,width=640,height=480,framerate=20/1 ! ffmpegcolorspace ! jpegenc !  filesink location=/tmp/test.jpg

    2) cross compile mplayer app for streaming and capture through gstreamer command,

    http://processors.wiki.ti.com/index.php/Mplayer

    3) Write one script to run when you press [ctrl+c] or any event

    put your capture command into that script. (it looks like  take a screen shot)

     

     

  • (i) gst-launch -e v4l2src ! video/x-raw-yuv,width=320,height=240,framerate=30/1 ! ffmpegcolorspace ! fbdevsink device=/dev/fb0&

    (ii) gst-launch -e v4l2src num-buffers=1 ! video/x-raw-yuv,width=640,height=480,framerate=20/1 ! ffmpegcolorspace ! jpegenc !  filesink location=/tmp/test.jpg

     

    im pasting due to format pblm with previous reply,