alliedvision / gst-vimbasrc

Official vimbasrc element for use of Vimba with GStreamer
Other
11 stars 9 forks source link

Errors in rtsp stream with GT-2750 Camera #5

Open basitraza1214 opened 2 years ago

basitraza1214 commented 2 years ago

I am getting the following error with rtsp on the transmission end:

x264 [error]: baseline profile doesn't support 4:4:4

Whereas on the reception end:

[rtsp @ 0x19f5200] RTP: PT=60: bad cseq 9cf7 expected=8fcf [h264 @ 0x3794720] corrupted macroblock 144 125 (total_coeff=-1) [h264 @ 0x3794720] error while decoding MB 144 125

Moreover, I need help with camera lag issue. I am getting too much of latency. Also I want to make the rtsp stream with my own setting of the camera cofigs, kindly help on that.

NiklasKroeger-AlliedVision commented 2 years ago

x264 [error]: baseline profile doesn't support 4:4:4

This sounds like the x264enc element has problems with the input format it is receiving. Perhaps explicitly adding an appropriate capsfilter to the pipeline would help? This entry from the GStreamer mailing list suggests using video/x-raw,format=i420 between videoconvert and the x264enc elements.

Moreover, I need help with camera lag issue. I am getting too much of latency.

Some latency is of course expected, the format conversion and encoding will take some time, as well as the added network latency and some buffering on the receiving end. I am afraid I do not really have any good advice on how to minimize all of those. In our RTSP example I already attempt to make the x264enc element as fast as possible with the provided settings. But the other factors seem to be hard to control from the RTSP server itself. Does the receiver maybe have an option to not buffer the received network stream?

Also I want to make the rtsp stream with my own setting of the camera cofigs

If you only have some very simple configuration that you want to set take a look at the options that the vimbasrc element provides for you to change. You can list them for example by running gst-inspect-1.0 vimbasrc. Alternatively you can also configure your camera the way you need it, and then save that configuration as an XML file. The simplest way to do this would be by using the Vimba Viewer that is included in your Vimba installation and exporting the settings via "Camera -> Save Camera Settings". The XML file can be loaded with the vimbasrc element with the "settingsfile" option and the settings included in it will be applied to the camera. This will give you the most flexibility in your camera configuration.

basitraza1214 commented 2 years ago

I am trying to pass xml fille to the camera in the rtsp code.

config.txt

NiklasKroeger-AlliedVision commented 2 years ago

You have not added the settingsfile property to your GStreamer pipeline in the attached file. You would need to do something like (please adjust the path to the xml file to where it actually is located):

vimbasrc_factory.set_launch('vimbasrc camera=DEV_000F3103902C settingsfile=/home/basitraza1214/settings.xml ! videoconvert ! x264enc speed-preset=ultrafast tune=zerolatency ! rtph264pay name=pay0')