Poor vid quality on VOXL2 voxl-streamer (hardware encoding)
-
Hi @hmlow. This should be addressed in the 4K streaming and encoding section of the voxl-camera-server documentation: https://docs.modalai.com/voxl-camera-server/
let me know if this doesn't answer your questions. As for the -s flag, that is an auto generate flag that will ignore the config and use default values from HAL3 so that is why you are getting wonky frame sizes.
-
@Zachary-Lowell-0 said in Poor vid quality on VOXL2 voxl-streamer (hardware encoding):
Hi @hmlow. This should be addressed in the 4K streaming and encoding section of the voxl-camera-server documentation: https://docs.modalai.com/voxl-camera-server/
let me know if this doesn't answer your questions. As for the -s flag, that is an auto generate flag that will ignore the config and use default values from HAL3 so that is why you are getting wonky frame sizes.
@Zachary-Lowell-0, no, not at all unfortunately.
The 4k streaming and encoding section is specific to 4k encoding (using "stream_width" and "stream_height" parameters), and i do not need to, and have never used it all along when i was on VOXL1. I experienced none of the issues below on VOXL1:
To summarize again:
With -s argument used with voxl-streamer-
On VOXL2, the RTSP video quality streamed out by voxl-streamer is very poor (akin to extremely low bitrate video)Without -s argument used with voxl-streamer-
On VOXL2, the RTSP video quality streamed out by voxl-streamer is ok (like the usual i see on VOXL1), but, the resolution/aspect ratio becomes incorrect and looks flattened.In both cases, the voxl-camera-server.conf and voxl-streamer config are as such:
}, { "name": "hires", "enabled": true, "frame_rate": 30, "type": "imx214", "camera_id": 2, "preview_width": 640, "preview_height": 480, "snapshot_width": 3840, "snapshot_height": 2160 }] }
{ "input-pipe": "hires", "bitrate": 1000000, "decimator": 1, "port": 8900, "rotation": 180 }
You also mentioned that the -s flag causes the frame sizes to get wonky. How do we prevent that?
Thanks
-
Also, do refer to this post on my other thread at:
https://forum.modalai.com/post/8882I thought they were unrelated but now im suspecting that these two issues are connected..
-
@Zachary-Lowell-0 would appreciate it if you could take a second look at this pls
-
I am not following - what are you trying to accomplish here? Just higher quality streaming via RTSP? There is also a stream_bitrate parameter as well that will allow for more throughput as well.
You need to enable the stream width and height parameters for encoding to happen for better frames since the encoding now happens in the voxl-camera-server pipe and not voxl-streamer.
Also how are you viewing the RTSP stream? I am trying to recreate the issue on my end to see if I can see what you are seeing. Lastly, which SDK are you using on both systems? @hmlow
-
@hmlow ok so I was unable to recreate your issue. I have the m0025-2 running on both the voxl1 and voxl2 and have very similar outpuputs in terms of the rtsp stream. I am viewing via VLC and QGC.
Here is my setup:
- VOXL2 connected to the hires camera (m0025-2).
- Run
voxl-camera-configure 8
(which is just hires for now) - Run
voxl-streamer-configure -i hires
- Ensure the output is what you are expecting via
voxl-inspect-cam hires
- Within VLC or QGC open the network stream at your
rtsp://YOURIP:8900/live
I did this on both the voxl1 and voxl2 and had the same result for the output. I did not stream in 4K as that is something you said you did not need. Please let me if this is the setup you have been using.
This is what the video looks like in QGC, same thing in VLC:
-
When you did your tests, did you take a good look at the quality of the video?
I'll let the screenshots below explain what i meant:
Output from voxl-camera-server are always 640x480.
Pic on left shows VOXL2 running voxl-streamer, bitrate 1Mbps, decimator 1. The video quality is actually quite bad. You can somewhat see the "patches" from the photo, but its much worse when its a moving video.
Exact same setup on the right, but with -s. The video quality is much better. This is the usual video quality i get when im using VOXL1. In addition, you would notice that the frame is incorrectly flattened/elongated horizontally.
To answer your earlier query of what i am trying to accomplish here:
I would like to achieve the same vid streaming quality that i used to see on VOXL1, without using software encoding (-s) on voxl-streamer because it adds more load on the CPU and generates more heat. Not that i could, since the use of software encoding messes up the frame.
Im running SDK0.9 on both VOXL1 and 2.
Hope you can help
-
@Zachary-Lowell-0 hi did you manage to investigate this further?
-
We have posted a tutorial on 720p and 4k here: https://docs.modalai.com/voxl-streamer/#streaming-in-720p-and-4k
We are working on a more streamlined hw encoding data path, it may take a few weeks to get it published.
-
Thank you for the guide.
Noted that the workaround to get decent video quality is to increase the bitrate - 3Mbps (h/w encoding) gives comparable quality to 1Mbps (s/w encoding).
Hope that the upcoming fix could overcome this problem (using encoded source from qmmf?). Looking forward to it.
Thanks