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.

dm36x h264 encoder: Changing target bitrate causes Segmentation fault when using interlace scan

Hi experts,

Have a gstreamer application with the following pipe description:

gst-app --seconds 10 --pipeline "v4l2src name=vsrc chain-ipipe=true ! capsfilter caps=\"video/x-raw, format=(string)NV12, width=1920, height=1080, framerate=25/1\" ! ce_h264enc name=encoder target-bitrate=2000000 interlace=true num-out-buffers=10 interlace-mode=1 bytestream=true idrinterval=30 ! queue ! udpsink port=3000 host=10.251.101.11 sync=false enable-last-sample=false"

The gst-app creates the pipe and changes the bitrate every ten seconds (e.g 6000000, 500000, 6000000, and so on). Here is some output:

Bitrate to 6000000
Bitrate to 500000
Bitrate to 6000000
Bitrate to 500000
Bitrate to 6000000
Bitrate to 500000
Bitrate to 6000000
Bitrate to 500000
Bitrate to 6000000Segmentation fault

Now if we use the progressive scan instead of interlaced:

gst-app --seconds 10 --pipeline "v4l2src name=vsrc chain-ipipe=true ! capsfilter caps=\"video/x-raw, format=(string)NV12, width=1920, height=1080, framerate=25/1\" ! ce_h264enc name=encoder target-bitrate=2000000 num-out-buffers=10 bytestream=true idrinterval=30 ! queue ! udpsink port=3000 host=10.251.101.11 sync=false enable-last-sample=false"

Bitrate to 6000000
Bitrate to 500000
Bitrate to 6000000
Bitrate to 500000
Bitrate to 6000000
Bitrate to 500000
Bitrate to 6000000
Bitrate to 500000
Bitrate to 6000000
Bitrate to 500000
Bitrate to 6000000
... (more than 30 minutes)

The problem disappears. Questions:

Am I missing something in the pipeline or in the h264encoder parameters, for this to work properly ?

Are there any restrictions when using interlaced scan and changing the target bitrate?

Here is my setup,

dm368

dvsdk-4_02_00_06/dvsdk/codecs-dm365_4_02_00_00/ (also tried dm365_h264enc_02_30_00_06)

Thanks

  • Hi Jose,

    I have tried with your configuration at my side, and did not reproduce the issue. Its running fine at my side for both Progressive & Interlaced case.

    Regards,

    Prashanth

  • Hi Veeranna Hachinal,

    Can you tell me how did you performed your tests? Was something similiar as the 10 seconds example I provided ?

    One of my guesses is that the h264 encoder needs some extra memory when performing the targetbitrate channge on the fly. Are there any observations you can share about the memory used by the encoder and this segmentation fault ? Came to my mind that the custom dm36x board I am using may have a config (either for Linux, CMEM, SRAM, etc) that makes the encoder to complain.

    Thanks!

  • Hi Jose Lopez,

    I tried with the standalone test application provided with the package, where you can change the target bitrate as per the requirement . I ran around 1000 frames, with IDR interval as 30. Progessive and Interlaced test cases worked fine.