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.

Problem with DM3730 video resize by gstreamer

Other Parts Discussed in Thread: TVP5150, DM3730

Hi all,

     My board is based beagle board, we have DM3730 + TVP5150 for video capture.

and I used dvsdk_dm3730-evm_04_03_00_06_setuplinux , My kernel is linux 2.6.37.

My video source is from a DV, which output is PAL format.

I set the video path by media-ctl.

media-ctl -r -l '"tvp5150 2-005d":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
media-ctl -v --set-format '"tvp5150 2-005d":0 [UYVY 720x576]'
media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY 720x576]'
media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY 720x576]'

and I can got 720x576 video normally with gstreamer by follow command:

gst-launch -v v4l2src device=/dev/video2 !\
ffmpegcolorspace ! videoscale! videorate ! \
video/x-raw-yuv,format=\(fourcc\)UYVY, width=720, height=576, framerate=25/1!\
TIVidenc1 rateControlPreset=3 codecName=h264enc engineName=codecServer !\
rtph264pay pt=96 ! udpsink host=192.168.2.25 port=9000 sync=false async=false

      But when I resized video resolution and I found there are some black or green lines in my video as follow:

Resize to VGA:

 gst-launch -v v4l2src device=/dev/video2 !\
ffmpegcolorspace ! videoscale! videorate ! \
video/x-raw-yuv,format=\(fourcc\)UYVY, width=640, height=480, framerate=25/1!\
TIVidenc1 rateControlPreset=3 codecName=h264enc engineName=codecServer !\
rtph264pay pt=96 ! udpsink host=192.168.2.25 port=9000 sync=false async=false

and resize to 720P there are some green lines in the bottom.

gst-launch -v v4l2src device=/dev/video2 !\
ffmpegcolorspace ! videoscale! videorate ! \
video/x-raw-yuv,format=\(fourcc\)UYVY, width=1280, height=720, framerate=25/1!\
TIVidenc1 rateControlPreset=3 codecName=h264enc engineName=codecServer !\
rtph264pay pt=96 ! udpsink host=192.168.2.25 port=9000 sync=false async=false

Is there anything wrong with my command? 

I  want to resize video to other format by gstreamer, could someone told me how to do.

Any help will be appreciate.

BR.


Paul  Chen

  • Hello,

    I am not familiar with your board and DVSDK.

    Berlin Chen said:
    My board is based beagle board, we have DM3730 + TVP5150 for video capture.

    Berlin Chen said:
    gst-launch -v v4l2src device=/dev/video2 !\
    ffmpegcolorspace ! videoscale! videorate ! \
    video/x-raw-yuv,format=\(fourcc\)UYVY, width=720, height=576, framerate=25/1!\
    TIVidenc1 rateControlPreset=3 codecName=h264enc engineName=codecServer !\
    rtph264pay pt=96 ! udpsink host=192.168.2.25 port=9000 sync=false async=false

    I did not understand why you has sync=false and async=false simultaneously . Could you try to play the encoded video playback on PC  to check are you still observing this problem. Also could you try to decoded it on the board. It is not clear where you are observing this problem but I see you has video streaming so my guess is you see it on PC. Also could you check what is the supported resolution by your tvp and the hw/sw restriction about the resolution.Could you try with 1280x800 and let me know the result.

    Best Regards,

    Margarita

  • Hi Margarita,

             Thanks for your response.

    Margarita Gashova said:
    I did not understand why you has sync=false and async=false simultaneously

    I found these commands make no difference to video, I don't know why, I just follow others command from network.

    Margarita Gashova said:
    Could you try to play the encoded video playback on PC  to check are you still observing this problem. Also could you try to decoded it on the board.

    I record a video and played on PC but the problem continue.

    Margarita Gashova said:
    Also could you check what is the supported resolution by your tvp and the hw/sw restriction about the resolution.

    The TVP5150 just supported  NTSC/PAL/SECAM video decoder, My video source is PAL format,and tvp5150 output resolution is 720x576.

    Margarita Gashova said:
    Could you try with 1280x800

    It can't encoder 1280x800 format video,there are part of logs:

    [DSP] @3,306,802tk: [+0 T:0x87c43214] ti.sdo.ce.video1.VIDENC1 - VIDENC1_create> Enter (engine=0x0, name='h264enc', params=0x859048c0)
    [DSP] @3,306,876tk: [+0 T:0x87c43214] CV - VISA_create(0x0, 'h264enc', 0x859048c0, 0x520, 'ti.sdo.ce.video1.IVIDENC1')
    [DSP] @3,306,942tk: [+0 T:0x87c43214] CV - VISA_create2(0x0, 'h264enc', 0x859048c0, 0x30, 0x520, 'ti.sdo.ce.video1.IVIDENC1')
    [DSP] @3,307,024tk: [+0 T:0x87c43214] CE - Engine_open> Enter('local', 0x87c46eec, 0x859048c0)
    [DSP] @3,307,078tk: [+0 T:0x87c43214] OM - Memory_alloc> Enter(size=0x34)
    [DSP] @3,307,115tk: [+0 T:0x87c43214] OM - Memory_alloc> return (0x87c47da0)
    [DSP] @3,307,173tk: [+4 T:0x87c43214] CE - Engine_open> engine->server = 0x0
    [DSP] @3,307,214tk: [+0 T:0x87c43214] CE - Engine_open> return(-2017165920)
    [DSP] @3,307,278tk: [+0 T:0x87c43214] OM - Memory_alloc> Enter(size=0x34)
    [DSP] @3,307,316tk: [+0 T:0x87c43214] OM - Memory_alloc> return (0x87c47dd8)
    [DSP] @3,307,361tk: [+0 T:0x87c43214] ti.sdo.ce.alg.Algorithm - Algorithm_create> Enter(fxns=0x87c798c0, idma3Fxns=0x87c798ec, iresFxns=0x0, params=0x859048c0, attrs=0x87c47008)
    [DSP] @3,307,449tk: [+0 T:0x87c43214] OM - Memory_alloc> Enter(size=0x10)
    [DSP] @3,307,489tk: [+0 T:0x87c43214] OM - Memory_alloc> return (0x87c47e10)
    [DSP] @3,307,983tk: [+7 T:0x87c43214] ti.sdo.ce.alg.Algorithm - Algorithm_create> Algorithm creation FAILED; make sure that 1) alg params are correct/appropriate, 2) there is enough internal and external algorithm memory available -- check DSKT2 settings for heap assignments and scratch allocation
    [DSP] @3,308,120tk: [+0 T:0x87c43214] ti.sdo.ce.alg.Algorithm - Algorithm_delete> Enter(alg=0x87c47e10)
    [DSP] @3,308,176tk: [+0 T:0x87c43214] OM - Memory_free> Enter(addr=0x87c47e10, size=16)
    [DSP] @3,308,228tk: [+0 T:0x87c43214] OM - Memory_free> return (0x1)
    [DSP] @3,308,265tk: [+0 T:0x87c43214] ti.sdo.ce.alg.Algorithm - Algorithm_delete> Exit
    [DSP] @3,308,309tk: [+0 T:0x87c43214] ti.sdo.ce.alg.Algorithm - Algorithm_create> return (0x0)
    [DSP] @3,308,356tk: [+6 T:0x87c43214] CV - VISA_create2> FAILED to create local codec.
    [DSP] @3,308,400tk: [+0 T:0x87c43214] CV - VISA_delete(0x87c47dd8)
    [DSP] @3,308,439tk: [+5 T:0x87c43214] CV - VISA_delete> deleting codec (localQueue=0xffff, remoteQueue=0xffff)
    [DSP] @3,308,495tk: [+0 T:0x87c43214] OM - Memory_free> Enter(addr=0x87c47dd8, size=52)
    [DSP] @3,308,541tk: [+0 T:0x87c43214] OM - Memory_free> return (0x1)
    [DSP] @3,308,580tk: [+0 T:0x87c43214] ti.sdo.ce.video1.VIDENC1 - VIDENC1_create> return (0x0)
    [DSP] @3,308,647tk: [+0 T:0x87c43214] OM - Memory_free> Enter(addr=0x87c47d30, size=36)
    [DSP] @3,308,693tk: [+0 T:0x87c43214] OM - Memory_free> return (0x1)
    [DSP] @3,308,727tk: [+0 T:0x87c43214] OM - Memory_free> Enter(addr=0x87c47d10, size=32)
    [DSP] @3,308,773tk: [+0 T:0x87c43214] OM - Memory_free> return (0x1)
    [DSP] @3,308,814tk: [+0 T:0x87c43214] OM - Memory_free> Enter(addr=0x87c47d00, size=10)
    [DSP] @3,308,860tk: [+0 T:0x87c43214] OM - Memory_free> return (0x1)
    [DSP] @3,308,894tk: [+0 T:0x87c43214] OM - Memory_free> Enter(addr=0x87c47ce8, size=24)
    [DSP] @3,308,940tk: [+0 T:0x87c43214] OM - Memory_free> return (0x1)
    @4,834,991us: [+0 T:0x41bb3490] CE - Engine_fwriteTrace> returning count [3748]
    @4,835,021us: [+2 T:0x41bb3490] CE - Engine_createNode> Returning 0x0
    @4,835,052us: [+6 T:0x41bb3490] CV - VISA_create2> FAILED to create remote codec (0x8).
    @4,835,052us: [+0 T:0x41bb3490] CV - VISA_delete(0x113970)
    @4,835,083us: [+5 T:0x41bb3490] CV - VISA_delete> deleting codec (localQueue=0xffff, remoteQueue=0xffff)
    @4,835,113us: [+0 T:0x41bb3490] ti.sdo.ce.video1.VIDENC1 - VIDENC1_create> return (0x0)
    @4,835,144us: [+7 T:0x41bb3490] ti.sdo.dmai - [Venc1] Failed to open video encode algorithm: h264enc (0x8)
    ERROR: from element /GstPipeline:pipeline0/GstTIVidenc1:tividenc10: failed to create video encoder

    Additional debug info:
    gsttividenc1.c(1272): gst_tividenc1_codec_start (): /GstPipeline:pipeline0/GstTIVidenc1:tividenc10
    Execution ended after 3174774169 ns.
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    @4,836,883us: [+0 T:0x41bb3490] CE - Engine_close(0x123f80)



    I found there is a resize engine in DM3730 ISP. Could it can change the video resolution?

    thanks.

    Best Regards,

    Paul