javacv icon indicating copy to clipboard operation
javacv copied to clipboard

setFrameRate() not working

Open MohammadFneish7 opened this issue 5 years ago • 6 comments

I'm using FFMpegFrameGrabber to consume an rtmp live stream, that streams at 30fps, i tried to set the grabber frame rate using setFrameRate(4) and setOption("framerate","4") but neither worked.

Any help please?! Thanks

MohammadFneish7 avatar Jan 17 '19 10:01 MohammadFneish7

I don't think that's a property supported by RTMP streams. There's nothing that appears in FFmpeg's documentation about that either: https://ffmpeg.org/ffmpeg-protocols.html

saudet avatar Jan 17 '19 10:01 saudet

Thanks @saudet so do you think it is supported with rtsp streams or it is not either?

MohammadFneish7 avatar Jan 17 '19 10:01 MohammadFneish7

I have an application that do frame grabbing directly on ffmpeg system command... I use this option in the command: "-vf fps=5". So maybe try grabber.setOption("vf", "fps=5"). Anyway the setFrameRate method works for me.

felipebutcher avatar May 14 '19 16:05 felipebutcher

@felipbutcher so what type of stream are you grabbing, or you are just playing a local video file?

MohammadFneish7 avatar May 14 '19 17:05 MohammadFneish7

@MohammadFneish7 is an RTSP stream from an IP camera.

felipebutcher avatar May 14 '19 17:05 felipebutcher

@felipbutcher yes that is right

MohammadFneish7 avatar Sep 28 '19 12:09 MohammadFneish7