ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Artefacts and poor image quality on high frame-rates using the hardware encoder

    VOXL 2
    voxl-streamer streaming h264 voxl-camera
    3
    4
    347
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Viorel BaicuV
      Viorel Baicu
      last edited by

      I'm trying to use the VOXL streamer to create an RTSP Stream that I can record and further streamer over the internet from my UAV. However, I'm not able to get a quality stream at an acceptable framerate. For my Application, 15 to 20 FPS would be enough.
      I have the following settings for the voxl-camera-server:

      voxl2:~$ cat /etc/modalai/voxl-camera-server.conf 
      {
      	"version":	0.1,
      	"cameras":	[{
      			"name":	"tracking",
      			"enabled":	true,
      			"frame_rate":	30,
      			"type":	"ov7251",
      			"camera_id":	0,
      			"ae_desired_msv":	60,
      			"ae_filter_alpha":	0.600000023841858,
      			"ae_ignore_fraction":	0.20000000298023224,
      			"ae_slope":	0.05000000074505806,
      			"ae_exposure_period":	1,
      			"ae_gain_period":	1
      		}, {
      			"name":	"hires",
      			"enabled":	true,
      			"frame_rate":	24,
      			"api":	"hal3",
      			"type":	"imx214",
      			"camera_id":	1,
      			"decimator":	2,
      			"preview_width":	1920,
      			"preview_height":	1080,
      			"snapshot_width":	3840,
      			"snapshot_height":	2160
      		}]
      }
      

      and the following config for the vxol-streamer

      voxl2:~$ cat /etc/modalai/voxl-streamer.conf 
      {
      	"input-pipe":	"hires",
      	"bitrate":	1000000,
      	"decimator":	1,
      	"port":	8900,
      	"rotation":	0
      }
      

      With this config, the stream indeed has 24 FPS,l but the image is full of artefacts and at a very low quality, resembling a low bitrate stream. Increasing or decreasing the bitrate has no effect on the stream quality
      If I put the decimator to 4, I get ~4FPS, but the image quality is perfect, crisp with no artefacts.
      If I try to use the software encoder, the image quality at 24FPS is much, better, but the image itself is distorted. This gives me the impression that there is some issue with the hardware encoder.

      The MJPEG stream provided within the VOXL portal has an overall acceptable image quality, but the MJPEG bandwidth requirements are too high for my application.
      Also, when a client connects to the MJPEG stream, the VOXL streamer RTSP streams dies, and requires a service restart. This is different issue and I believe you already knew about it.

      Any help in regards to increasing the quality of the image on the RTSP stream would be helpful.

      I could provide video recordings of the RTSP stream to observes the quality issues.

      I have raised a ticket on gitlab for support on this issue:

      https://gitlab.com/voxl-public/voxl-sdk/services/voxl-streamer/-/issues/5

      1 Reply Last reply Reply Quote 0
      • Chad SweetC
        Chad Sweet ModalAI Team
        last edited by

        This all points to your radio link not having enough bandwidth.

        Can you try using WiFi with good coverage to eliminate radio issues?

        Tuning the video pipeline to match your radio bandwidth is important. Can you measure the throughput of your radio link? Your bitrate settings should be about 90% of your radio capacity. If your bitrate settings are too high you will have issues

        1 Reply Last reply Reply Quote 0
        • Viorel BaicuV
          Viorel Baicu
          last edited by

          Hello,

          I recorded the RSTP stream locally, on the device, using the ffmpeg. The bandwidth cannot be an influence.

          ffmpeg -i rtsp://localhost:8900/live -c copy -f segment -strftime 1 -segment_time 300 -segment_format mpegts /var/lib/rdars/recording/saved_%Y-%m-%d_%H-%M-%S.ts
          

          The recording shows the bad quality of the stream.

          1 Reply Last reply Reply Quote 0
          • P
            PSI
            last edited by

            1,000,000 bps (1Mbps) seems low for a FHD stream. What bitrates did you try? Did you try increasing it to 10,000,000 or even 30,000,000 to see if that makes a difference? I'm running 1920x1080 @ 20 FPS with no major artifacts using this.

            The alternative would be either changing resolution or trying to switch to a different codec such as H265 or VP9 (which appear to be supported on the VOXL2 by just searching the gst-inspect-1.0 output), but that would require changes to the voxl-streamer source.

            1 Reply Last reply Reply Quote 1
            • First post
              Last post
            Powered by NodeBB | Contributors