OpenCV Set Properties

306 views
Skip to first unread message

osmant...@gmail.com

unread,
Oct 18, 2020, 7:04:46 AM10/18/20
to javacv

Hi,
I can use the ffmpeg command line and the javacv library to display a video stream in rfc 4175 format. I set the parameters below to open this stream, with ffmpeg;
- probesize 32
- protocol_whitelist file, rtp, udp
-strict -2
Likewise with Javacv;
FFMpegFrameGrabber.setOption ("probesize", "32");
FFMpegFrameGrabber.setOption ("strict", "- 2");
FFMpegFrameGrabber.setOption ("protocol_whitelist", "file, rtp, udp");

How can i set these parameters in OpenCV? I couldnt find the parameters in the list of propId.

Osman

Samuel Audet

unread,
Oct 18, 2020, 7:15:03 AM10/18/20
to jav...@googlegroups.com, osmant...@gmail.com
OpenCV doesn't support that. Please keep using FFmpeg.

Samuel Audet

unread,
Oct 18, 2020, 12:57:33 PM10/18/20
to javacv, Osman Toker
OPENCV_FFMPEG_CAPTURE_OPTIONS ? Sure, but that's still FFmpeg.

On 10/19/20 1:52 AM, Osman Toker wrote:
> Thank you Samuel. You mean that OpenCV doesn't support these parameters in
> Java I think. I'm not sure about strict and probe size but the "protocol
> whitelist" parameter is set as a system environment in C++ and Python if
> I'm not mistaken.
>
> Samuel Audet <samuel...@gmail.com>, 18 Eki 2020 Paz, 14:15 tarihinde
> şunu yazdı:

Osman Toker

unread,
Oct 18, 2020, 1:07:13 PM10/18/20
to Samuel Audet, javacv
Yes, it is. But strict and probe size are also FFmpeg parameters, aren't they?

Samuel Audet <samuel...@gmail.com>, 18 Eki 2020 Paz, 19:57 tarihinde şunu yazdı:

Samuel Audet

unread,
Oct 18, 2020, 9:55:09 PM10/18/20
to javacv, Osman Toker
Right, but OPENCV_FFMPEG_CAPTURE_OPTIONS only seems to be used for
avformat_open_input(), not for avcodec_open2():
https://github.com/opencv/opencv/blob/master/modules/videoio/src/cap_ffmpeg_impl.hpp

If you're concerned about this, please bring it up upstream. There's
nothing that can be done for that as part of JavaCV itself.

On 10/19/20 2:06 AM, Osman Toker wrote:
> Yes, it is. But *strict* and *probe size *are also FFmpeg parameters,

Osman Toker

unread,
Oct 19, 2020, 3:47:41 AM10/19/20
to Samuel Audet, javacv
Thanks, I'll check it out. 

Samuel Audet <samuel...@gmail.com>, 19 Eki 2020 Pzt, 04:55 tarihinde şunu yazdı:
Reply all
Reply to author
Forward
0 new messages