Different video size for streaming and recording

Mazahir Poonawalla mazahir.poonawalla at ideaforge.co.in
Wed Sep 26 22:34:55 PDT 2012


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 <mpekar at raineyelectronics.com> 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:
>
> gst-launch v4l2src ! tee name=t. ! <encode at 640x480> ! <udpsink> t. !
> <encode at 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 <
> mazahir.poonawalla at ideaforge.co.in> wrote:
>
>> 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 <mpekar at raineyelectronics.com>wrote:
>>
>>> 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.
>>>
>>>
>>> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-videoscale.html
>>>
>>>
>>> On Mon, Sep 24, 2012 at 1:40 AM, Mazahir Poonawalla <
>>> mazahir.poonawalla at ideaforge.co.in> wrote:
>>>
>>>> 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
>>>> gstreamer-devel at lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>>
>>>>
>>>
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>
>>>
>>
>>
>> --
>>
>> Thank you & Regards,****
>>
>> *Mazahir Poonawalla*****
>>
>> ideaForge Technology Pvt. Ltd. | Board: +91 22 2767 0001; +91 22 2767
>> 0707 | mazahir.poonawalla at ideaforge.co.in |www.ideaforge.co.in****
>>
>> *P** **Please consider the environment before printing this e-mail*
>>
>>
>


-- 

Thank you & Regards,****

*Mazahir Poonawalla*****

ideaForge Technology Pvt. Ltd. | Board: +91 22 2767 0001; +91 22 2767 0707
| mazahir.poonawalla at ideaforge.co.in |www.ideaforge.co.in****

*P** **Please consider the environment before printing this e-mail*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120927/2da24c45/attachment.html>


More information about the gstreamer-devel mailing list