I am trying to create a proof of concept demo that will resize either a live 720p video or a decoded 720p video file and add various static graphic files played out to the video output. I am using gstreamer and I get close but I run into problems.
The following pipe shows my incoming video at 1/4 size with a background of a blue box (box.jpg - 1280x720)
gst-launch -v v4l2src always-copy=FALSE ! 'video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)30/1, width=(int)640, height=(int)360' ! ffmpegcolorspace ! videomixer name=mix ! TIDmaiVideoSink contiguousInputFrame=TRUE videoStd=720P_60 videoOutput=component hideOSD=true numBufs=3 useUserptrBufs=TRUE filesrc location=box.jpg ! TIImgdec1 resolution=1280x720 engineName=codecServer ! imagefreeze ! mix.
The problem with this is that the frame rate is ~ 1 fps
So the next step was to use the hardware resizer in the TMS320DM365 like this:
gst-launch -v v4l2src always-copy=FALSE ! 'video/x-raw-yuv, format=(fourcc)NV12, framerate=(fraction)30/1, width=(int)1280, height=(int)720' ! TIVidResize contiguousInputFrame=TRUE ! 'video/x-raw-yuv,format=(fourcc)NV12,framerate=(fraction)30/1,width=320,height=240' ! ffmpegcolorspace ! videomixer name=mix ! 'video/x-raw-yuv,framerate=(fraction)30/1' ! TIDmaiVideoSink contiguousInputFrame=TRUE videoStd=720P_60 videoOutput=component hideOSD=true numBufs=3 useUserptrBufs=TRUE filesrc location=box.jpg ! TIImgdec1 resolution=1280x720 engineName=codecServer ! imagefreeze ! mix.
I get the following response:
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)NV12, width=(int)1280, height=(int)720, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)NV12, width=(int)1280, height=(int)720, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstTIVidResize:tividresizdavinci_resizer davinci_resizer.2:
mode doesn't allow multiple instances
e0.GstPad:src: caps = video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, format=(fourcc)NV12
/GstPipeline:pipeline0/GstTIVidResize:tividresize0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)NV12, width=(int)1280, height=(int)720, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1
ERROR: from element /GstPipeline:pipeline0/GstTIVidResize:tividresize0: failed to create resize handle
Additional debug info:
gsttividresize.c(500): gst_tividresize_transform (): /GstPipeline:pipeline0/GstTIVidResize:tividresize0
Execution ended after 715572792 ns.
While gstreamer seems great for the video, it is not well suited for graphics. I spent several days trying to get QT/e installed and gave it up for gst. I have not yet figured out how to place multiple graphics on the video output using gstreamer, but I think it is possible.
My ultimate design is go be able to use a DVI video input and a DVI and LCD output. Since this is not a typical application for the DM365 I am struggling to find examples, reference designs and documentation to help me. I have a short time to market, so I want to leverage the work that TI and the open source community have done which I why I chose gstreamer. If the is a more direct path to accomplishing this or if anyone has any assistance they can offer on hardware or software, I would appreciate it.
Thanks in advance,
Mike