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.

Linux/AM5728: am5728 h264 encode quality problem

Other Parts Discussed in Thread: AM5728

Tool/software: Linux

Hi,

TI,

I use the am5728 to encode the video from pc: am5728 -- adv7611 -- pc,and I found if the video contains large amounts of text, after h264 encode, there is noise around the text, and the text is not clear.

What the reason it maybe? Are there any resolvent?

by the way. the resolution of video is 1920x1080.the encode command is :

gst-launch-1.0 -v v4l2src device=/dev/video1 num-buffers=-1 io-mode=4 ! "video/x-raw,format=(string)YUY2, width=(int)1920, height=(int)1080" ! vpe num-input-buffers=8 ! "video/x-raw,format=(string)NV12, width=(int)1920, height=(int)1080_h" ! ducatih264enc ! filesink location=`date +%Y%m%d-%H%M%S`.264

the original photo: 

h264 encode:

I can see the noise  around the text by enlarge picture.

BR,

vefone

  • the encode command is :
    gst-launch-1.0 -v v4l2src device=/dev/video1 num-buffers=-1 io-mode=4 ! "video/x-raw,format=(string)YUY2, width=(int)1920, height=(int)1080" ! vpe num-input-buffers=8 ! "video/x-raw,format=(string)NV12, width=(int)1920, height=(int)1080" ! ducatih264enc ! filesink location=`date +%Y%m%d-%H%M%S`.264
  • Hi,

    I've notified our GST expert. Feedback will be posted here.

    Best Regards,
    Yordan
  • Hi,

    Yordan,thank you! I waiting.

    Br,

    vefone

  • Hello,

    Could you set these properties to the encoder element in gstreamer:
    ! ducatih264enc level=level-51 profile=high bitrate=6000 !...
    I do not see the h264parse element also after the encoder in your pipeline.
    Could you add the parser between the encoder and filesink?

    BR
    Margarita
  • Hi,
    Margarita,
    Thank you very much.It works!

    vefone
  • Hello,

    I am glad that this issue is solved.

    BR
    Margarita
  • Hi,

    Margarita,

    After add the "ducatih264enc level=level-51 profile=high bitrate=6000",  when it runs for a long time(about 1 minute), the am5728 printf the log below ,then the process gst-launch-1.0 was killed!

    ** (gst-launch-1.0:1391): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1391): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed
    conn= 1

    ** (gst-launch-1.0:1391): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1391): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1391): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1391): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1391): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1391): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1391): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1391): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1391): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1391): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1391): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1391): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1391): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1391): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:1391): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
    Additional debug info:
    ../../../../gstreamer-1.6.3/libs/gst/base/gstbasesrc.c(2943): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    streaming task paused, reason error (-5)
    Execution ended after 0:01:40.939470972

    but when I set the  level to level-4 or  level-41, it will not happen!

    What the reason it may be?

  • Hello,

    Could you try to increase vpe's num-input-buffers?
    What is the latest pipeline that you are using?

    BR
    Margarita
  • Hi,
    Margarita,
    the h264 encode command is :
    gst-launch-1.0 -v v4l2src device=/dev/video1 num-buffers=-1 io-mode=4 ! "video/x-raw,format=(string)YUY2, width=(int)1920, height=(int)1080" ! vpe num-input-buffers=8 ! "video/x-raw,format=(string)NV12, width=(int)1920, height=(int)1080" ! ducatih264enc level=level-51 profile=high bitrate=6000 ! filesink location=`date +%Y%m%d-%H%M%S`.264

    root@am57xx-evm:~# gst-launch-1.0 --version
    gst-launch-1.0 version 1.6.3
    GStreamer 1.6.3
    Unknown package origin
    root@am57xx-evm:~#

    When I increase vpe's num-input-buffers to 16 or 24,the error still happen!

    Why the error happen?
    BR,
    vefone
  • Hello,

    I tried this pipeline:
    gst-launch-1.0 -v v4l2src device=/dev/video1 io-mode=4 ! "video/x-raw,format=(string)YUY2, width=(int)1920, height=(int)1080" ! vpe num-input-buffers=8 ! "video/x-raw,format=(string)NV12, width=(int)1920, height=(int)1080" ! ducatih264enc level=level-51 profile=high bitrate=6000 ! h264parse ! filesink location=test.264

    How much time I should wait?
    I stopped it after :
    Execution ended after 0:06:04.379587656

    BR
    Margarita
  • Hi,

    Margarita, I run the command that you provide,sometime the error happen.I doubt that it may be the input video cause the GstV4l2Src do not work fine.

    root@am57xx-evm:~# gst-launch-1.0 -v v4l2src device=/dev/video1 io-mode=4 ! "video/x-raw,format=(string)YUY2, width=(int)1920, height=(int)1080" ! vpe num-input-buffers=8 ! "video/x-raw,format=(string)NV12, width=(int)1920, height=(int)1080" ! ducatih264enc level=level-51 profile=high bitrate=6000 ! h264parse ! filesink location=test.264
    [ 3659.589044] adv7604_stdi.bl = 0xd3a adv7604_stdi.lcf = 0x464 adv7604_stdi.lcvs = 0x5
    Setting pipeline to PAUSED ...
    [ 3659.789020] adv7604_stdi.bl = 0xd3a adv7604_stdi.lcf = 0x464 adv7604_stdi.lcvs = 0x5
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    [ 3659.979002] adv7604_stdi.bl = 0xd3a adv7604_stdi.lcf = 0x464 adv7604_stdi.lcvs = 0x5
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstDucatiH264Enc:ducatih264enc0.GstPad:src: caps = "video/x-h264\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)byte-stream\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = "video/x-h264\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)byte-stream\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001\,\ parsed\=\(boolean\)true"
    /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = "video/x-h264\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)byte-stream\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001\,\ parsed\=\(boolean\)true"
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = "video/x-h264\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)byte-stream\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstDucatiH264Enc:ducatih264enc0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstDucatiH264Enc:ducatih264enc0.GstPad:src: caps = "video/x-h264\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ framerate\=\(fraction\)30000/1001\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ stream-format\=\(string\)byte-stream\,\ align\=\(string\)au\,\ num-reorder-frames\=\(int\)3\,\ profile\=\(string\)high\,\ level\=\(string\)5.1"
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = "video/x-h264\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ framerate\=\(fraction\)30000/1001\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ stream-format\=\(string\)byte-stream\,\ align\=\(string\)au\,\ num-reorder-frames\=\(int\)3\,\ profile\=\(string\)high\,\ level\=\(string\)5.1"
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = "video/x-h264\,\ width\=\(int\)1920\,\ height\=\(int\)1088\,\ framerate\=\(fraction\)30000/1001\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ stream-format\=\(string\)byte-stream\,\ align\=\(string\)au\,\ num-reorder-frames\=\(int\)3\,\ profile\=\(string\)high\,\ level\=\(string\)5.1\,\ parsed\=\(boolean\)true\,\ alignment\=\(string\)au"
    /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = "video/x-h264\,\ width\=\(int\)1920\,\ height\=\(int\)1088\,\ framerate\=\(fraction\)30000/1001\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ stream-format\=\(string\)byte-stream\,\ align\=\(string\)au\,\ num-reorder-frames\=\(int\)3\,\ profile\=\(string\)high\,\ level\=\(string\)5.1\,\ parsed\=\(boolean\)true\,\ alignment\=\(string\)au"

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
    Additional debug info:
    ../../../../gstreamer-1.6.3/libs/gst/base/gstbasesrc.c(2943): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    streaming task paused, reason error (-5)
    Execution ended after 0:02:09.231635954
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...
    root@am57xx-evm:~#

  • Hi,

    Margarita, I run the command that you provide,sometime the error happen.I doubt that it may be the input video cause the GstV4l2Src do not work fine.

    root@am57xx-evm:~# gst-launch-1.0 -v v4l2src device=/dev/video1 io-mode=4 ! "video/x-raw,format=(string)YUY2, width=(int)1920, height=(int)1080" ! vpe num-input-buffers=8 ! "video/x-raw,format=(string)NV12, width=(int)1920, height=(int)1080" ! ducatih264enc level=level-51 profile=high bitrate=6000 ! h264parse ! filesink location=test.264
    [ 3659.589044] adv7604_stdi.bl = 0xd3a adv7604_stdi.lcf = 0x464 adv7604_stdi.lcvs = 0x5
    Setting pipeline to PAUSED ...
    [ 3659.789020] adv7604_stdi.bl = 0xd3a adv7604_stdi.lcf = 0x464 adv7604_stdi.lcvs = 0x5
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    [ 3659.979002] adv7604_stdi.bl = 0xd3a adv7604_stdi.lcf = 0x464 adv7604_stdi.lcvs = 0x5
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstDucatiH264Enc:ducatih264enc0.GstPad:src: caps = "video/x-h264\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)byte-stream\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = "video/x-h264\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)byte-stream\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001\,\ parsed\=\(boolean\)true"
    /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = "video/x-h264\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)byte-stream\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001\,\ parsed\=\(boolean\)true"
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = "video/x-h264\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)byte-stream\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstDucatiH264Enc:ducatih264enc0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"
    /GstPipeline:pipeline0/GstDucatiH264Enc:ducatih264enc0.GstPad:src: caps = "video/x-h264\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ framerate\=\(fraction\)30000/1001\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ stream-format\=\(string\)byte-stream\,\ align\=\(string\)au\,\ num-reorder-frames\=\(int\)3\,\ profile\=\(string\)high\,\ level\=\(string\)5.1"
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = "video/x-h264\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ framerate\=\(fraction\)30000/1001\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ stream-format\=\(string\)byte-stream\,\ align\=\(string\)au\,\ num-reorder-frames\=\(int\)3\,\ profile\=\(string\)high\,\ level\=\(string\)5.1"
    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = "video/x-h264\,\ width\=\(int\)1920\,\ height\=\(int\)1088\,\ framerate\=\(fraction\)30000/1001\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ stream-format\=\(string\)byte-stream\,\ align\=\(string\)au\,\ num-reorder-frames\=\(int\)3\,\ profile\=\(string\)high\,\ level\=\(string\)5.1\,\ parsed\=\(boolean\)true\,\ alignment\=\(string\)au"
    /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = "video/x-h264\,\ width\=\(int\)1920\,\ height\=\(int\)1088\,\ framerate\=\(fraction\)30000/1001\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ stream-format\=\(string\)byte-stream\,\ align\=\(string\)au\,\ num-reorder-frames\=\(int\)3\,\ profile\=\(string\)high\,\ level\=\(string\)5.1\,\ parsed\=\(boolean\)true\,\ alignment\=\(string\)au"

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
    Additional debug info:
    ../../../../gstreamer-1.6.3/libs/gst/base/gstbasesrc.c(2943): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    streaming task paused, reason error (-5)
    Execution ended after 0:02:09.231635954
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    Setting pipeline to NULL ...
    Freeing pipeline ...
    root@am57xx-evm:~#

    BR,
    vefone
  • Hi,

    Margarita, I run the command that you provide,sometime the error happen.I doubt that it may be the input video cause the GstV4l2Src do not work fine.

    root@am57xx-evm:~# gst-launch-1.0 -v v4l2src device=/dev/video1 io-mode=4 ! "video/x-raw,format=(string)YUY2, width=(int)1920, height=(int)1080" ! vpe num-input-buffers=8 ! "video/x-raw,format=(string)NV12, width=(int)1920, height=(int)1080" ! ducatih264enc level=level-51 profile=high bitrate=6000 ! h264parse ! filesink location=test.264

    [ 3659.589044] adv7604_stdi.bl = 0xd3a adv7604_stdi.lcf = 0x464 adv7604_stdi.lcvs = 0x5

    Setting pipeline to PAUSED ...

    [ 3659.789020] adv7604_stdi.bl = 0xd3a adv7604_stdi.lcf = 0x464 adv7604_stdi.lcvs = 0x5

    Pipeline is live and does not need PREROLL ...

    Setting pipeline to PLAYING ...

    New clock: GstSystemClock

    [ 3659.979002] adv7604_stdi.bl = 0xd3a adv7604_stdi.lcf = 0x464 adv7604_stdi.lcvs = 0x5

    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"

    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"

    /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"

    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"

    /GstPipeline:pipeline0/GstDucatiH264Enc:ducatih264enc0.GstPad:src: caps = "video/x-h264\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)byte-stream\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"

    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = "video/x-h264\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)byte-stream\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001\,\ parsed\=\(boolean\)true"

    /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = "video/x-h264\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)byte-stream\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001\,\ parsed\=\(boolean\)true"

    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = "video/x-h264\,\ alignment\=\(string\)au\,\ stream-format\=\(string\)byte-stream\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"

    /GstPipeline:pipeline0/GstDucatiH264Enc:ducatih264enc0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"

    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"

    /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"

    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)YUY2\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\ framerate\=\(fraction\)30000/1001"

    /GstPipeline:pipeline0/GstVpe:vpe0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"

    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)NV12\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30000/1001"

    /GstPipeline:pipeline0/GstDucatiH264Enc:ducatih264enc0.GstPad:src: caps = "video/x-h264\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ framerate\=\(fraction\)30000/1001\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ stream-format\=\(string\)byte-stream\,\ align\=\(string\)au\,\ num-reorder-frames\=\(int\)3\,\ profile\=\(string\)high\,\ level\=\(string\)5.1"

    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = "video/x-h264\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\ framerate\=\(fraction\)30000/1001\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ stream-format\=\(string\)byte-stream\,\ align\=\(string\)au\,\ num-reorder-frames\=\(int\)3\,\ profile\=\(string\)high\,\ level\=\(string\)5.1"

    /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = "video/x-h264\,\ width\=\(int\)1920\,\ height\=\(int\)1088\,\ framerate\=\(fraction\)30000/1001\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ stream-format\=\(string\)byte-stream\,\ align\=\(string\)au\,\ num-reorder-frames\=\(int\)3\,\ profile\=\(string\)high\,\ level\=\(string\)5.1\,\ parsed\=\(boolean\)true\,\ alignment\=\(string\)au"

    /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = "video/x-h264\,\ width\=\(int\)1920\,\ height\=\(int\)1088\,\ framerate\=\(fraction\)30000/1001\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ stream-format\=\(string\)byte-stream\,\ align\=\(string\)au\,\ num-reorder-frames\=\(int\)3\,\ profile\=\(string\)high\,\ level\=\(string\)5.1\,\ parsed\=\(boolean\)true\,\ alignment\=\(string\)au"

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ** (gst-launch-1.0:8728): CRITICAL **: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.

    Additional debug info:

    ../../../../gstreamer-1.6.3/libs/gst/base/gstbasesrc.c(2943): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:

    streaming task paused, reason error (-5)

    Execution ended after 0:02:09.231635954

    Setting pipeline to PAUSED ...

    Setting pipeline to READY ...

    Setting pipeline to NULL ...

    Freeing pipeline ...

    root@am57xx-evm:~#

    vefone

  • Hello,

    The PSDK that I am using is 4 with gstreamer 1.8.

    BR
    Margarita
  • Hello,

    If the level is 4.1 do you see the error?

    BR
    Margarita
  • Hi,

    Margarita,

    yes, when the level is 4.1, I can see the error sometime. Now I change kernel configuration CONFIG_CMA_SIZE_MBYTES from 80 to 240, the probability of error becomes smaller, I do not know why.So let it go.

    Thank you!