Colibri iMX6 MJPEG Bitrate Problem

Hi Community,

I have a hardware with ADV7280. I am able to bind PAL video signal as a video source on Colibri iMX6

I am using 4.9.87-rt62-2.8.4 kernel

When i encoding the video with imxenc_h264 with bitrate=700 framerate=25 the video is really smooth but video quality normally bad because bitrate is equal 700. The video

But when i encode int with mjpeg and giving the bitrate parameter as 10000 then framerate=1 as if there is no change but bitrate is really different video

How can increase the video quality with low FPS?

Dear @erdemkahraman,

It’s not so clear to me what you’re trying to achieve in the second video. Are you willing to encode a video with 1 FPS and high quality? What do you mean exactly with video quality?

Best regards,

Hi @gclaudino.tx

Thanks for your reply.

  • I am using Angstrom v2017.12 - Kernel 4.9.87-rt62-2.8.4+g3bb6e32.I cannot update the kernel due to project-related requirements.
  • Image is kind of customized but based on
  1. Toradex Version : 2.8
  2. Status : LTS
  3. Distribution : Ångström v2017.12
  4. Yocto Project Release : 2.8

Project requirement: There is a communication device (a customized eth modem) connected to Colibri and this device supports input up to 1 megabit. Instead of streaming with this pipeline,

gst-launch-1.0 \
	imxv4l2videosrc device=/dev/video0 ! \
	imxipuvideotransform ! \
    video/x-raw, framerate=25/1 ! \
	imxvpuenc_h264 bitrate=900  ! \
	h264parse ! \
	queue ! \
	filesink location=test

I wanted to compress with MJPEG with a high bitrate and lower the communication bitrate by lowering the FPS.

gst-launch-1.0 \
    imxv4l2videosrc device=/dev/video0 ! \
    videorate ! \
    imxipuvideotransform ! \
    video/x-raw, framerate=1/1 ! \
    imxvpuenc_mjpeg bitrate=9000 ! \
    queue ! \
    avimux ! \
    filesink location=output.avi

So exactly what I want to do is this;
I want the size of the file compressed with imxvpuenc_h264 with 900k Bit rate and 25 FPS to be close or the same as the file compressed with imxvpuenc_mjpeg with 9M bit rate and 1FPS. So I want to record at low FPS with high bitrate. This will help me keep my communication bitrate constant.

It has worked but…

There is no noticeable difference between low FPS and high bitrate video recorded with MJPEG and high FPS low bitrate video recorded with imxvpuenc_h264. In other words, although the encoding bitrate increased substantially, it did not benefit the image quality.

If my problem will be solved by updating the kernel, I can do this.
I am waiting for a reply.
Have a nice day.

Dear @erdemkahraman,

Thanks for the great update. Now your application is clearer to me. So, I have a few things to ask:

  • Have you tried using h264 with the higher bitrate so that we could compare it better with the mjpeg?
  • Do you record the videos with the module, right? Which camera adapter are you using and carrier board?
  • Which Camera are you using to take the images?

Best regards,

  • Yes i tried the h264 and mjpeg with same bitrates h264 is better.
  • I recorded the videos with the module, I am using ADV7280 PAL Receiver
  • Standart car rear view pal camera for example link

Thank you…

Dear @erdemkahraman,

Would this be considered a solution for you already? If you still want to use MJPEG we’d suggest you to have a look on https://gstreamer.freedesktop.org/documentation/tools/gst-inspect.html?gi-language=c. It may show additional configuration options for the mjpeg encoding that could improve quality.

Have you considered using another camera? It may also be linked to a possible low quality.

Best regards,

Dear @erdemkahraman,

Do you have any news on this topic?

Best regards,

Hi @gclaudino.tx

Sorry for late reply.

These days, I don’t have much time to do the test we’re talking about. I’ll update the relevant thread when I run the test. Thank you for the answer.

Hi @erdemkahraman,

Thanks for the update. Please come back once you have more information, we’ll be glad to help :smiley: