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.

DM365 Hardware resizer



Hi everyone,

I would like to be able to resize and move a video that I am able to play with gstreamer.  For example, I have a working gstreamer pipeline:

gst-launch filesrc location=/usr/share/ti/data/vide
os/davincieffect.mpeg4 ! TIViddec2 codecName=mpeg4dec engineName=codecServer ! q
ueue max-size-buffers=2 max-size-time=0 max-size-bytes=0 ! TIDmaiVideoSink video
Std=720P_60 videoOutput=component sync=false hideOSD=true useUserptrBufs=TRUE nu
mBufs=3 -v

which plays a 720p video through the component output on my dev board. 

When I try and add the TI hardware resizer to the pipeline, I get errors.  My pipeline is:

gst-launch filesrc location=/usr/share/ti/data/vide
os/davincieffect.mpeg4 ! TIViddec2 codecName=mpeg4dec engineName=codecServer ! q
ueue max-size-buffers=2 max-size-time=0 max-size-bytes=0 ! TIVidResize contiguou
sInputFrame=TRUE ! 'video/x-raw-yuv,width=640,height=480' ! TIDmaiVideoSink vide
oStd=720P_60 videoOutput=component sync=false hideOSD=true useUserptrBufs=TRUE n
umBufs=3 -v

and the error I get is:

** (gst-launch-0.10:1606): WARNING **: tividresize0: size 1479936 is not a multiple of unit size 1382400

Using the TI gstreamer plugins, is it possible to resize a video and move it to a certain location on the screen?  Is it relatively easy to do or am I better off writing my application using the DMAI API instead?

Any help would be greatly appreciated!

Marlon

  • Hi  marlon,

    I also want to use TIVidResize element to resize video to display to lcd , And I also encountered the same problem as your, Did you solve this problem?

  • Same problem here. It seems that to even try and use TIVidresize, IPipe must be in single-shot mode by setting dm365_lmp.oper_mode=1 in the kernel bootargs.

    Now I can set up the pipeline with videotestsrc; something like:

      videotestsrc ! ffmpegcolorspace ! TIVidResize ! capsfilter ! videobox ! TIDmaiVideoSink

    and that works fine.

    When I then replace videotestsrc with filesrc I get the above mentioned 'not a multiple' warning, and gstreamer exits immediately.

    Also, it looks like TIVidresize doesn't like NV12 colorspace. Hence the ffmpegcolorspace to convert to UYVY.

    Anybody here with any ideas?

  • Hello All Developers,

    I also have the similar problem while using "TIVideoResize" element,

    Here is the pipeline implemented:

    # " gst-launch -v filesrc location=Jeans_h264_hinted.mp4   ! qtdemux name=demux demux.audio_00 ! queue max-size-buffers=8000 max-size-time=0 max-size-bytes=0 ! TIAuddec1 ! alsasink demux.video_00 ! queue ! TIViddec2 ! TIVidResize ! video/x-raw-yuv,width=640,height=480 ! TIDmaiVideoSink resizer=true "

    /GstPipeline:pipeline0/GstTIViddec2:tividdec20.GstPad:sink: caps = video/x-h264, codec_data=(buffer)0142c014ffe1001b6742c0149a760c8fdff800800078800000030080000018078a157001000468ca8cb2, width=(int)400, height=(int)240, framerate=(fraction)24/1, pixel-aspect-ratio=(fraction)213/200
    Dm365 format
    Input Buf size:1382912
    circular buffer Not changed
    framerateDen:1 framerate:24/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2

    /GstPipeline:pipeline0/GstTIAuddec1:tiauddec10.GstPad:sink: caps = audio/mpeg, mpegversion=(int)4, framed=(boolean)true, codec_data=(buffer)1210, rate=(int)44100, channels=(int)2
    /GstPipeline:pipeline0/GstTIAuddec1:tiauddec10.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
    /GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
    /GstPipeline:pipeline0/GstTIViddec2:tividdec20.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)24/1, width=(int)400, height=(int)240
    /GstPipeline:pipeline0/GstTIVidResize:tividresize0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)UYVY, framerate=(fraction)24/1, width=(int)640, height=(int)480
    /GstPipeline:pipeline0/GstTIVidResize:tividresize0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)24/1, width=(int)400, height=(int)240

     " ** (gst-launch-0.10:2214): WARNING **: tividresize0: size 225792 is not a multiple of unit size 144000 "

    NOTE:  Also, tried  IPipe as single-shot mode by setting dm365_lmp.oper_mode=1 in the kernel bootargs with the refrence of above post by Mr.Moller  but, ended with      the same result


    Can anyone suggest me in this regard!!!


    Thanks & Regards

    Ranjan.D

    Bangalore

  • It turns out that this error does not mean what it says.  As far I can figure, the DM365 simply cannot do this kind of resize.  The resizer, which is also a colorspace convertor, is located in the VPFE, and as such can only resize video coming in through the video frontend.  Decoded video cannot be piped into the TIVidResize filter. Also the NV12 colorspace used by TI is different from the the normal NV12 colorspace used by other gstreamer components, like ffmpegcolorspace . Gstreamer tries to connect these seemingly compatible colorspaces, with the resulting 'not a multiple' error.

    If there is a way of resizing decoded video with these chips, I have not been able to find it. The closest I got was through a loopback interface, but this occupies the video output, so it's more of academic interest - unless, perhaps if you use two chips: one decoding and feeding the next for resizing.