Ask Your Question
0

How to set ffmpeg option '-protocol_whitelist file,udp,rtp' in VideoCapture?

asked 2018-05-23 12:15:14 -0500

zindarod gravatar image

I am trying to read an .sdp file with VideoCapture but ffmpeg throws error:

Protocol 'rtp' not on whitelist 'file,crypto'!.

I can set this flag in ffplay easily: ffplay -protocol_whitelist file,udp,rtp -i ./stream.sdp.

How do I set this in VideoCapture?

edit retag flag offensive close merge delete

Comments

true, udp is not supported, and it can't read sdp files either.

berak gravatar imageberak ( 2018-05-24 00:05:50 -0500 )edit

I am having the same issue, someone please answer

Samsonite gravatar imageSamsonite ( 2018-08-14 09:39:34 -0500 )edit

any answers?

Runeker gravatar imageRuneker ( 2018-08-28 07:10:44 -0500 )edit

1 answer

Sort by » oldest newest most voted
1

answered 2019-01-23 07:10:45 -0500

Stian Solbø gravatar image

Hi Zindarod,

this answer is probably too late for you, but I ran across this post was on my search for solution to the same problem.

The trick is to pass the -protocol_whitelist=file,rtp,udp to FFMPEG, which you can achieve through python and OpenCV by setting the following environment variable: os.environ['OPENCV_FFMPEG_CAPTURE_OPTIONS'] = 'protocol_whitelist;file,rtp,udp'

Best Regards,

Stian Solbø

edit flag offensive delete link more

Comments

hi Stian, How can i set this env in Java OpenCV?

otoker gravatar imageotoker ( 2020-03-30 14:23:36 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-05-23 12:15:14 -0500

Seen: 2,816 times

Last updated: May 23 '18