Hi All,
I am using a plugin along with a "tee" element to stream live capture as well as record the video. I would like to know how should I specify two different video frame sizes for the two tasks (i.e. streaming and recording). Lets say for example, the incoming video is 720p which I would want to record at that size, but I would want to stream it at only 640*480.
Any help? Thank you & Regards,
Maz _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
You'll want to use the videoscale element along with a caps element:
gst-launch videotestsrc is-live=TRUE num-buffers=90 ! tee name=t ! queue2 ! videoscale ! ffmpegcolorspace ! video/x-raw-rgb,width=640,height=480 ! ximagesink sync=false t. ! queue2 ! videoscale ! ffmpegcolorspace ! video/x-raw-yuv,width=320,height=240 ! theoraenc ! matroskamux ! filesink location=/tmp/test.mkv
Make sure to add queue elements on your tee so threads don't block. On Mon, Sep 24, 2012 at 1:40 AM, Mazahir Poonawalla <[hidden email]> wrote: Hi All, _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi Matt,
Thanks for the help, but this does not work. My pipeline is as follows: gst-launch
-v -e v4l2src always-copy=FALSE input-src=composite chain-ipipe=true !
video/x-raw-yuv,format=\(fourcc\)NV12, width=640, height=480 ! queue !
dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=2 intraframeinterval=23
idrinterval=46 targetbitrate=3000000 ! tee name=x ! queue ! rtph264pay !
udpsink port=3000 host=192.168.1.102 sync=false enable-last-buffer=false x. !
queue ! qtmux! filesink location=test1.mp4 sync=false enable-last-buffer=false So basically one thread is for streaming and other for recording on a file. The default composite input video is 640*480. What if I want to record the same size and stream at 320*240. Is it possible? I am running this on Leopardboard DM365.
Thanks,
Maz On 24 September 2012 18:41, Matt Pekar <[hidden email]> wrote: You'll want to use the videoscale element along with a caps element: Thank you & Regards, Mazahir Poonawalla ideaForge Technology Pvt. Ltd. | Board: +91 22 2767 0001; +91 22 2767 0707 | [hidden email] |www.ideaforge.co.in P Please consider the environment before printing this e-mail _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
For this case I think you'd need to encode it twice, once at 640x480 and again at 320x240. So you'd have to move your tee up the pipeline:
gst-launch v4l2src ! tee name=t. ! <encode@640x480> ! <udpsink> t. ! <encode@320x240> ! <filesink>
I have no clue if the DM365 can do that or not.
On Wed, Sep 26, 2012 at 4:51 AM, Mazahir Poonawalla <[hidden email]> wrote: Hi Matt, _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Thanks Matt,
What if I want to do the same thing with an RTSP stream? I am using the test-launch.c app and passing my plugin as argument i.e.: ./TEST
"( v4l2src always-copy=FALSE input-src=composite chain-ipipe=true !
video/x-raw-yuv,format=(fourcc)NV12, width=640, height=480 ! queue ! dmaiaccel
! dmaienc_h264 encodingpreset=2 ratecontrol=2 intraframeinterval=23
idrinterval=46 targetbitrate=3000000 ! rtph264pay name=pay0 pt=96 )" So the above plugin is for RTSP stream which can be viewed using vlc on on another machine. This works fine.
Now, neither I can tee with this plugin and record nor I can rescale. There is some video file being generated but it cannot be opened. The plugin I use to stream (RTSP) and record is as given below, but this does not work:
./TEST "( v4l2src always-copy=FALSE input-src=composite chain-ipipe=true ! video/x-raw-yuv,format=(fourcc)NV12, width=640, height=480 ! queue ! dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=2 intraframeinterval=23 idrinterval=46 targetbitrate=3000000 ! tee name=x ! queue ! rtph264pay name=pay0 pt=96 x. ! queue ! qtmux! filesink location=test1.mp4 sync=false enable-last-buffer=false )"
Any help as to how would I go about recording and rescaling with this plugin. The test-launch uses Gst RTSP server internally. Thanks,
Maz On 26 September 2012 19:05, Matt Pekar <[hidden email]> wrote: For this case I think you'd need to encode it twice, once at 640x480 and again at 320x240. So you'd have to move your tee up the pipeline: Thank you & Regards, Mazahir Poonawalla ideaForge Technology Pvt. Ltd. | Board: +91 22 2767 0001; +91 22 2767 0707 | [hidden email] |www.ideaforge.co.in P Please consider the environment before printing this e-mail _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Off the top of my head I don't see anything wrong with that pipeline. Is the file coming out zero length or does it have some content?
The only advice I can give with my limited "tee" experience is to break the parts down and test them individually before tee'ing them. You know the stream works, did you test the file stream individually also?
v4l2src always-copy=FALSE input-src=composite chain-ipipe=true ! video/x-raw-yuv,format=(fourcc)NV12, width=640, height=480 ! queue ! dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=2 intraframeinterval=23 idrinterval=46 targetbitrate=3000000 ! qtmux! filesink location=test1.mp4 sync=false enable-last-buffer=false
If both streams work individually, then it probably comes down to a sync issue, which is why I ask if the file is zero length. Also is there anything in the test-launch.c app that may be interfering with things?
On Thu, Sep 27, 2012 at 12:34 AM, Mazahir Poonawalla <[hidden email]> wrote: Thanks Matt, _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Well, individually the plugins work but they do not work together while streaming RTSP.
test-launch.c uses "Gst RTSP server" and its structures and APIs for streaming. Secondly, no the file size is not zero. It changes as per the recording. Only when I try to view it in vlc or any other player, it shows 00.00 in total time and nothing can be played.
On 27 September 2012 18:55, Matt Pekar <[hidden email]> wrote: Off the top of my head I don't see anything wrong with that pipeline. Is the file coming out zero length or does it have some content? Thank you & Regards, Mazahir Poonawalla ideaForge Technology Pvt. Ltd. | Board: +91 22 2767 0001; +91 22 2767 0707 | [hidden email] |www.ideaforge.co.in P Please consider the environment before printing this e-mail _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |