You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, the performance of the video display in arv-viewer is really lacking, not only on ARM platform like AGX Xavier. It is mostly an issue in gtksink gstreamer element. You should be able to obtain better performances using a gstreamer pipeline with autovideosink or ximagesink.
I would be interested in the performance figures of the data streaming (buffer read without any display or processing). What is the CPU use of arv-camera-test with the maximum FPS ?
On a desktop hardware the same camera was able to support around 73fps at the same full resolution, and thus the test:
$ ./arv-camera-test -f 75
Looking for the first available camera
vendor name = JAI Corporation
model name = GO-5100M-USB
device id = (null)
image width = 2464
image height = 2056
horizontal binning = 1
vertical binning = 1
payload = 5065984 bytes
exposure = 1286 µs
gain = 10 dB
uv bandwidth limit = 0 [0..-1]
Frame rate = 43 Hz
Frame rate = 37 Hz
Frame rate = 32 Hz
Frame rate = 34 Hz
^CFrame rate = 30 Hz
Completed buffers = 176
Failures = 0
Underruns = 0
$ ./gst/gst-aravis-launch aravissrc ! videoconvert ! ximagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstAravis:aravis0.GstPad:src: caps = video/x-raw, format=(string)GRAY8, width=(int)2464, height=(int)2056, framerate=(fraction)74/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, width=(int)2464, height=(int)2056, framerate=(fraction)74/1, pixel-aspect-ratio=(fraction)1/1, format=(string)BGRx
/GstPipeline:pipeline0/GstXImageSink:ximagesink0.GstPad:sink: caps = video/x-raw, width=(int)2464, height=(int)2056, framerate=(fraction)74/1, pixel-aspect-ratio=(fraction)1/1, format=(string)BGRx
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw, format=(string)GRAY8, width=(int)2464, height=(int)2056, framerate=(fraction)74/1, pixel-aspect-ratio=(fraction)1/1
WARNING: from element /GstPipeline:pipeline0/GstXImageSink:ximagesink0: A lot of buffers are being dropped.
Additional debug info:
gstbasesink.c(2902): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstXImageSink:ximagesink0:
There may be a timestamping problem, or this computer is too slow.
/GstPipeline:pipeline0/GstAravis:aravis0.GstPad:src: caps = video/x-raw, format=(string)GRAY8, width=(int)2145, height=(int)1578, framerate=(fraction)74/1, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, width=(int)2145, height=(int)1578, framerate=(fraction)74/1, pixel-aspect-ratio=(fraction)1/1, format=(string)BGRx
/GstPipeline:pipeline0/GstXImageSink:ximagesink0.GstPad:sink: caps = video/x-raw, width=(int)2145, height=(int)1578, framerate=(fraction)74/1, pixel-aspect-ratio=(fraction)1/1, format=(string)BGRx
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw, format=(string)GRAY8, width=(int)2145, height=(int)1578, framerate=(fraction)74/1, pixel-aspect-ratio=(fraction)1/1
WARNING: from element /GstPipeline:pipeline0/GstXImageSink:ximagesink0: A lot of buffers are being dropped.
Additional debug info:
gstbasesink.c(2902): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstXImageSink:ximagesink0:
There may be a timestamping problem, or this computer is too slow.
WARNING: from element /GstPipeline:pipeline0/GstXImageSink:ximagesink0: A lot of buffers are being dropped.
Additional debug info:
gstbasesink.c(2902): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstXImageSink:ximagesink0:
There may be a timestamping problem, or this computer is too slow.
WARNING: from element /GstPipeline:pipeline0/GstXImageSink:ximagesink0: A lot of buffers are being dropped.
Additional debug info:
gstbasesink.c(2902): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstXImageSink:ximagesink0:
There may be a timestamping problem, or this computer is too slow.
ERROR: from element /GstPipeline:pipeline0/GstXImageSink:ximagesink0: Output window was closed
Additional debug info:
ximagesink.c(697): gst_x_image_sink_handle_xevents (): /GstPipeline:pipeline0/GstXImageSink:ximagesink0
Execution ended after 0:00:39.192048720
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Not sure if the computer is actually too slow as the warning above says?
@mikekml could you try with arv-camera-test -f 200 ?
Hi Emanuel,
we found in one of the older versions of aravis implementation of asynchronous bulk request handling which, in our case, worked better than the latest version synchronous implementation.
when we traced libusb during pylon execution - we noticed asynchronous bulk request handling as well.
once we ran the older version, we got maximal frame rate from our camera ( 227 FPS ), but the throughput that we saw ( using usbtop ) on respective usb end point was significantly lower than when running with pylon.
we managed to get to the throughput similar to pylon after changing the following constants
#define ARV_UV_STREAM_MAXIMUM_TRANSFER_SIZE (65536) // similar to pylon
#define ARV_UV_STREAM_MAXIMUM_SUBMIT_TOTAL (1555200) // similar to pylon
after the above changes + async bulk, arv-camera-test behaves exactly as pylon.
however, when we run arv-viewer, built from the same source, the frame-rate/ usb throughput drop x3 ..
additional observation: after the above changes there is no latency in real-time video in arv-viewer.
i haven't check the source code yet, but my assumption is that it somehow drops frames, but it is showing latest frames such that there is no visual latency in video. ( by visual latency i mean an effect when you wave your hand quickly in front of the camera and it appears tens of milliseconds after the actual waving - this is what happening with latest versions with synchronous bulk handling ).
so far so good.
the question is whether it will be possible to bring async bulk request handling to upstream versions ? it looks like it may be very useful for high speed cameras, like the one that we have.
Im new to gstreamer and Aravis. can you please provide more info on how to use gstreamer pipeline with autovideosink or ximagesink and Aravis viewer
@mikekml from the meson build directory, try: ./gst/gst-aravis-launch aravissrc ! videoconvert ! ximagesink
works only in latest ( meson ) versions. tried to run it - it looks like it works faster than arvplayer, but it does not support window resize, etc and in general is not as robust as viewer app.
also, observed that it is way less cpu hungry than the viewer.
from my perspective it will be interesting to test it with async bulk handling.
the throughput that we saw ( using usbtop ) on respective usb end point was significantly lower than when running with pylon.
Hi @mikekml, I think I've encountered similar behaviour and it turned out to be a bug in a libpcap (used by usbtop). Due to this bug packet lengths on the usbmon binary interface were delivered incorrectly, see this issue for more information about this bug.
In my case actual throughput was the same for both pylon and aravis (I've verified that via usbmon text interface), even though reported transmission via usbtop was 16 times less for aravis.
Ultimately I wouldn't rely on the usbtop readings that much.
the throughput that we saw ( using usbtop ) on respective usb end point was significantly lower than when running with pylon.
Hi @mikekml, I think I've encountered similar behaviour and it turned out to be a bug in a libpcap (used by usbtop). Due to this bug packet lengths on the usbmon binary interface were delivered incorrectly, see this issue for more information about this bug.
In my case actual throughput was the same for both pylon and aravis (I've verified that via usbmon text interface), even though reported transmission via usbtop was 16 times less for aravis.
Ultimately I wouldn't rely on the usbtop readings that much.
we noticed that too, but it is till useful to see relative changes between different runs
the main problem as i see it is in async bulk request vs sync bulk request handling. it looks like async works better
Activity
EmmanuelP commentedon Dec 15, 2019
Yes, the performance of the video display in arv-viewer is really lacking, not only on ARM platform like AGX Xavier. It is mostly an issue in gtksink gstreamer element. You should be able to obtain better performances using a gstreamer pipeline with autovideosink or ximagesink.
I would be interested in the performance figures of the data streaming (buffer read without any display or processing). What is the CPU use of arv-camera-test with the maximum FPS ?
[-]Basler USB3V performance with arv-viewer-0.8 [/-][+]Bad video output performance of the arv-viewer [/+][-]Bad video output performance of the arv-viewer [/-][+]Bad video output performance of arv-viewer [/+]mikekml commentedon Dec 16, 2019
Hi Emanuel,
here is the log of arv-camera-test
Looking for the first available camera
vendor name = Basler
model name = acA1440-220um
device id = (null)
image width = 1440
image height = 1024
horizontal binning = 1
vertical binning = 1
payload = 1474560 bytes
exposure = 1000 µs
gain = 11 dB
uv bandwidth limit = -1 [524288..419430400]
Frame rate = 110 Hz
Frame rate = 125 Hz
Frame rate = 124 Hz
Frame rate = 124 Hz
^CFrame rate = 124 Hz
Completed buffers = 607
Failures = 0
Underruns = 0
It looks like the framerate is now better, but it is still around half of what PylonViewer can pull of the camera
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
24679 argos 20 0 199724 83444 6132 S 55.1 0.5 0:16.93 arv-camera-test
CPU usage is less, but kernel load is still way higher then in pylon case.
%Cpu(s): 1.7 us, 7.8 sy, 0.0 ni, 83.3 id, 0.0 wa, 7.1 hi, 0.1 si, 0.0 st
Im new to gstreamer and Aravis. can you please provide more info on how to use
gstreamer pipeline with autovideosink or ximagesink and Aravis viewer
thanks and regards,
-Mike
jajberni commentedon Dec 17, 2019
jajberni commentedon Dec 17, 2019
EmmanuelP commentedon Dec 17, 2019
@jajberni Please open another issue, GigEVision and USB3Vision aravis codes have nothing in common.
EmmanuelP commentedon Dec 17, 2019
@mikekml could you try with
arv-camera-test -f 200?EmmanuelP commentedon Dec 17, 2019
@mikekml from the meson build directory, try:
./gst/gst-aravis-launch aravissrc ! videoconvert ! ximagesinkto266 commentedon Dec 17, 2019
I have a similarly pool performance of the aravis-viewer on Nvidia Jetson TX2 with JAI GO-5100M via usb3.
Could post the
arv-camera-testa bit later, as currently the CPU is super loaded by other things, and it would bias..to266 commentedon Dec 17, 2019
On a desktop hardware the same camera was able to support around 73fps at the same full resolution, and thus the test:
Not sure if the computer is actually too slow as the warning above says?
mikekml commentedon Dec 17, 2019
Hi Emanuel,
we found in one of the older versions of aravis implementation of asynchronous bulk request handling which, in our case, worked better than the latest version synchronous implementation.
when we traced libusb during pylon execution - we noticed asynchronous bulk request handling as well.
once we ran the older version, we got maximal frame rate from our camera ( 227 FPS ), but the throughput that we saw ( using usbtop ) on respective usb end point was significantly lower than when running with pylon.
we managed to get to the throughput similar to pylon after changing the following constants
// #define ARV_UV_STREAM_MAXIMUM_TRANSFER_SIZE (102410241)
// #define ARV_UV_STREAM_MAXIMUM_SUBMIT_TOTAL (810241024)
to
#define ARV_UV_STREAM_MAXIMUM_TRANSFER_SIZE (65536) // similar to pylon
#define ARV_UV_STREAM_MAXIMUM_SUBMIT_TOTAL (1555200) // similar to pylon
after the above changes + async bulk, arv-camera-test behaves exactly as pylon.
however, when we run arv-viewer, built from the same source, the frame-rate/ usb throughput drop x3 ..
additional observation: after the above changes there is no latency in real-time video in arv-viewer.
i haven't check the source code yet, but my assumption is that it somehow drops frames, but it is showing latest frames such that there is no visual latency in video. ( by visual latency i mean an effect when you wave your hand quickly in front of the camera and it appears tens of milliseconds after the actual waving - this is what happening with latest versions with synchronous bulk handling ).
so far so good.
the question is whether it will be possible to bring async bulk request handling to upstream versions ? it looks like it may be very useful for high speed cameras, like the one that we have.
thanks and regards,
-mike
mikekml commentedon Dec 17, 2019
works only in latest ( meson ) versions. tried to run it - it looks like it works faster than arvplayer, but it does not support window resize, etc and in general is not as robust as viewer app.
also, observed that it is way less cpu hungry than the viewer.
from my perspective it will be interesting to test it with async bulk handling.
dmitryalferov commentedon Dec 17, 2019
Hi @mikekml, I think I've encountered similar behaviour and it turned out to be a bug in a libpcap (used by usbtop). Due to this bug packet lengths on the usbmon binary interface were delivered incorrectly, see this issue for more information about this bug.
In my case actual throughput was the same for both pylon and aravis (I've verified that via usbmon text interface), even though reported transmission via usbtop was 16 times less for aravis.
Ultimately I wouldn't rely on the usbtop readings that much.
mikekml commentedon Dec 18, 2019
we noticed that too, but it is till useful to see relative changes between different runs
the main problem as i see it is in async bulk request vs sync bulk request handling. it looks like async works better
EmmanuelP commentedon Dec 19, 2019
@mikekml , @crabsmaps Please comment on USB3Vision performance in #324