Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More selective frame rate. #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HiroshiYAMA
Copy link
Contributor

In cases where the fastest frame rate is not always required, the processing time of discarded frames is wasteful.
In that case, it is better to be able to set a more suitable frame rate.
That's why I made it possible to specify the frame rate as a real number with a command line option.
If there is no matching value in the list of configurable frame rates, select the closest value.

@dusty-nv
Copy link
Owner

dusty-nv commented Sep 7, 2021

Thanks @HiroshiYAMA - I prefer to keep a single frameRate value in the videoOptions as opposed to nominator/denominator. Does it not work like that with just using float frameRate in the pipeline?

@HiroshiYAMA
Copy link
Contributor Author

@dusty-nv
Of course, I wanted to do that.
I tried float frameRate in the pipeline.
... ! video/x-raw, ... , framerate=29.97/1 ! ...

But, I got the following error.

[gstreamer] gstCamera failed to create pipeline
[gstreamer]    (could not link v4l2src0 to mysink, v4l2src0 can't handle caps video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(string)29.97/1)
[gstreamer] gstCamera -- failed to create device v4l2:///dev/video0

Therefore, I implemented a fraction(nominator/denominator) in the pipeline.
for example,
cmd-line option: --input-rate=29.97
--> pipeline, ... ! video/x-raw, ... , framerate=2997/100 ! ...
others, 59.94 --> 7013/117(not work 5994/100)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants