Closed yoelk closed 5 years ago
Well, I solved it by comparing the two, but if there is a cleaner way to get only the right video formats from list_formats()
, I'd be happy to know about it.
And another small remark:
I have to use list_formats()
as only there I can get the numerator (N) and denominator (D) of the FPS values.
tcam-ctrl -c
only gives the quotient (FPS = N/D), but this is not enough.
When I try to set the FPS (for example, using the capsfilter), I need to specify N and D:
"video/x-raw,format=GRAY8,width=480,height=4,framerate=33/1"
.
Simply writing "framerate=33"
or "framerate=33.0"
doesn't work.
So to conclude, I need list_formats()
to get N and D, but it also gives additional wrong sizes.
So I read the right sizes from tcam-ctrl -c
and filter out the wrong sizes from the list_formats()
results.
Does that make sense?
You are right, the N/D stuff is known. What are "wrong sizes"?
By "wrong sizes" I refer to the reported sizes listed in my first comment.
For example, it is written that GRAY8 (480x4)
is one of the possible video formats but it isn't.
Trying to use this in a pipeline results in an error.
You can also see that this format is not listed in the tcam-ctrl -c
output for the same camera
The video formats are correct. Did you also set a frame rate of the list?
The camera has variable video formats, beginning at 480x4 ending at 1920x1200. There is a stepping in width and height, but the list of possible video formats has a few 100.000 entries. Therefore, the programs show only a few formats. I have to admit, I do not know, how these formats are handled by GStreamer, but using Aravis directly, you can set all of them.
Stefan
Well, I've tried running tiscamera/examples/python/live_video.py
, with my camera's serial (type: DMK Z12GX236
).
This worked:
pipeline_str = 'tcambin name=src ' \
'! queue max_size_buffers=2 ' \
'! videoconvert ' \
'! capsfilter caps="video/x-raw,format=GRAY8,width=544,height=480,framerate=20/1" ' \
'! videoconvert ' \
'! gtksink name=sink'
but this didn't:
pipeline_str = 'tcambin name=src ' \
'! queue max_size_buffers=2 ' \
'! videoconvert ' \
'! capsfilter caps="video/x-raw,format=GRAY8,width=480,height=4,framerate=20/1" ' \
'! videoconvert ' \
'! gtksink name=sink'
As for "using Aravis directly", what do you mean by that?
Hello
You are right, 480x4 does not work with Aravis. In Windows it works fine with our driver, that transfers GigEVision to DirectShow. But: NI MAX using GigEVision offers 480x4 but that does not work, while starting at 480x8 images are provided.
That is not intended.
Stefan
Some additional information: arv-viewer does not show 480x4, until you set the packet size:
arv-tool-0.6 control GevSCPSPacketSize=2984 -n TIS-<camera serial number>
Edit: The error is not in Aravis, it is in the tcamsrc/tcambin: However, that wont help with the tcambin, because it negotiates the packet size wrong therefore you wont get images. I will see, what can be done about that.
Stefan
And another addition regarding wrong list of formats.
There is no list of formats, there is a range only. You can (could) start at 480x4 and end at 1920x1200. The line stepping is 4, I guess, the column stepping is also 4 or 8. That means, you can set also a video format like 480x32 or 800x64.
The tools show only a small excerpt of possible video formats, otherwise you will have a list with 107.640 formats. ( (1920-480) (1200-4) 4).
I admit, I did not knew that too, I thought, even for GigE cameras this list is limited, like for V4L2 devices.
Stefan
Hello Stefan, I followed your answer from https://github.com/TheImagingSource/tiscamera/issues/193.
Comparing the results I get from
list_formats()
(from the examples folder) andtcam-ctrl -c
I see that they are not the same.list_formats()
gives a few extra results, which are not intcam-ctrl -c
.For my camera (DMK Z12GX236),
tcam-ctrl -c
gives:The results from
list_formats()
have two new sizes:When I try to set these new sizes to a pipeline I get an error, so I guess
list_formats()
gives wrong results. Is there a way to filter such wrong results? Any idea why they are there?Thanks again, Joel