hello. How can I set the framerate through the API ?
should I instantiate a v4l2_fract? and then which is the ioctl?
faLUCE: VIDIOC_S_PARM
hverkuil: ioctl(fd, VIDIOC_S_PARM, ...?))
https://hverkuil.home.xs4all.nl/spec/uapi/v4l/vidioc-g-parm.html
hverkuil: ok thanks
hello. Given struct v4l2_fract framerate  it's not clear how to set its fields so that it corresponds to 25 frames per second
faLUCE: numerator: 25, denomenator: 1 ?
ntsc would have {30000, 1001} for instance
integer fps is less tricky
assuming it's fps, and not 1/fps (fractions of seconds per frame)
pbos: with numerator 25 and denomenator 1 I obtain a very slow fps
faLUCE: Try 1/25 then instead
instead of 25/1
I assume that's expressing time between frames instead of fps
faLUCE: Assuming you had something like 1 frame every 25 seconds. :)
pinchartl: Just so I know, when do you think you can take a look? I'm wondering if I should separately try landing this in our 3.14 branch (depends on review timeline), but I'd prefer an identical downstream cherry-pick if possible.
pbos: I tried 1/25 and the result is still bad
struct v4l2_fract framerate; ramerate.numerator = 1; framerate.denominator = 25; xioctl(fd, VIDIOC_S_PARM, &framerate)
this is what I did
If if set denominator to 1, 10, 15, or 25 the result is the same.  It's about 5 fps
faLUCE: And if you invert them it's still the same?
faLUCE: Also, if you use another app or browser, is it still 5fps?
Lighting conditions for webcams etc. can tank your framerate.
pbos: if I don't set it I obtain a 25 fps
pbos: are you sure it's the right param?
I see a streamparm.parm.capture.timeperframe too
http://ffmpeg.org/pipermail/ffmpeg-devel/2010-September/100907.html
this is a very obscure part of the API. Why the hell a timeperframe is in a fractional form?
faLUCE: Time per frame sounds like 1/25 should be it. Unless it's time per frame in ms, in which case 1000/25 would be reasonable.
Unless it's 90khz rtp in which case *tableflip*
pbos: tried 1000/25 too
1000/25 doesn't start the stream
faLUCE: Can't really help, common interpretetations would be 1/25 or 25/1, but neither seems applicable.
I don't know the side that reads it at all.
pbos: thanks anyway
faLUCE: Good luck