Ask Your Question
0

RPI 3B Protocol 'rtp' not on whitelist 'file,crypto'! OPENCV 3.3.0

asked 2018-02-15 06:46:18 -0600

devdev gravatar image

updated 2018-02-15 06:53:15 -0600

Hello. I'm trying to capture udp stream in my raspberry pi 3 B , and i faced to problem, can someone suggest what to do?

This is error message Protocol 'rtp' not on whitelist 'file,crypto'! I've tried such thing, but no results:

  1. Install seperatly opencv 3.3.0/3.3.1/3.4.0/3.4.0-dev
  2. Rebuilt my ffmpeg to the latest version, then to the previous version 3.3.3, but again nothing changed.

In my ubuntu everything works fine. Don't know why raspbian sucks !!!

i am using a.sdp file c=IN IP4 239.1.1.1 m=video 5600 RTP/AVP 96 a=rtpmap:96 H264/90000

and in cv.py use this: cap=cv2.VideoCapture("./a.sdp")

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2019-10-18 03:04:09 -0600

sheep94lion gravatar image

I found a solution here. It use environment variable OPENCV_FFMPEG_CAPTURE_OPTIONS to pass the whitelist parameters to ffmpeg.

import os

os.environ["OPENCV_FFMPEG_CAPTURE_OPTIONS"] = "protocol_whitelist;file,rtp,udp"

edit flag offensive delete link more
-2

answered 2018-08-16 15:31:33 -0600

Solved, but it is very clunky. I am using pycharm so, i found the opencv ffmpeg dll "opencv_ffmpeg342_64.dll". Using a hex editor I searched for "file,crypto" and replaced it with "file,udp,rtp", everything worked after that.

edit flag offensive delete link more

Comments

This has really nothing to do with OpenCV and its functionality, rather with you hacking your way in available ffmpeg dlls. Seems a bit irrelevant to me ...

StevenPuttemans gravatar imageStevenPuttemans ( 2018-08-17 06:50:24 -0600 )edit

Usually when you're trying to play a video stream on openCV like OP is doing, openCV uses ffmpeg to read and encode that video(assuming you compiled openCV with ffmpeg support). The error he is getting is an ffmpeg error that says the RTP protocol isn't whitelisted, usually in ffmpeg you could just add an argument to whitelist the protocol. Unfortunately openCV doesn't support adding ffmpeg arguments anywhere. Which is why I found the ffmpeg dll in the openCV build and added it manually. Obviously like I mentioned in my first comment, this is very clunky, there are probably other better way of solving this but that doesn't mean that this solution is irrelevant to openCV.

Samsonite gravatar imageSamsonite ( 2018-08-17 07:20:53 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2018-02-15 06:46:18 -0600

Seen: 3,059 times

Last updated: Aug 16 '18