Relax ffmpeg media source whitelist restrictions

tnj195

New Member
Hi

I wish to use OBS to stream services from our church. The video side is relatively straightforward however the audio will be forwarded from the existing sound system using a Barix instreamer outputting uncompressed audio at 48 kSps via UDP RTP packets. Although there is a predefined payload type for PCM audio at 44.1 kSps, 48 kSps isn't defined. Therefore, to receive my stream using VLC I have to use the following SDP file:
Code:
c=IN IP4 192.168.1.241
m=audio 5000 RTP/AVP 103
a=rtpmap:103 L16/48000/2

I can use the above SDP file with VLC standalone and with the VLC source in OBS however the latency is huge. I realise that the builtin media source in OBS uses FFMPEG so I wonder whether this might offer better performance. Unfortunately, when I try it, it chokes on the file because RTP is not on the 'whitelist':
Code:
:
20:02:51.748: [Media Source 'Media Source - RTP']: settings:
20:02:51.748:     input:                   C:\Other Work\rtp_audio_48khz.sdp
20:02:51.748:     input_format:            sdp
20:02:51.748:     speed:                   100
20:02:51.748:     is_looping:              no
20:02:51.748:     is_hw_decoding:          no
20:02:51.748:     is_clear_on_media_end:   yes
20:02:51.748:     restart_on_activate:     yes
20:02:51.748:     close_when_inactive:     yes
20:02:51.751: error:   Protocol 'rtp' not on whitelist 'file,crypto'!
20:02:51.751: MP: Failed to open media: 'C:\Other Work\rtp_audio_48khz.sdp'
:

As a test I tried simply using rtp://0.0.0.0:5000 as the input to the media source in OBS. Although it failed to decode properly it clearly has a go because the log makes it clear it is receiving the UDP packets but can't get any further without the SDP file:
Code:
:
19:45:20.881: [Media Source 'Media Source - RTP2']: settings:
19:45:20.881:     input:                   rtp://0.0.0.0:5000
19:45:20.881:     input_format:            rtp
19:45:20.881:     speed:                   100
19:45:20.881:     is_looping:              no
19:45:20.881:     is_hw_decoding:          yes
19:45:20.881:     is_clear_on_media_end:   yes
19:45:20.881:     restart_on_activate:     yes
19:45:20.881:     close_when_inactive:     yes
19:45:20.884: warning: 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
19:45:20.884: warning: 'circular_buffer_size' option was set but it is not supported on this build (pthread support is required)
19:45:20.891: error:   Unable to receive RTP payload type 103 without an SDP file describing it
19:45:20.891: MP: Could not initialize audio or video: 'rtp://0.0.0.0:5000'
:

My request then is whether it would be possible to enable all protocols to FFMPEG's whitelist so I can capture non-standard RTP streams using a suitable SDP file? Ideally it would be useful if there was a way to control/specify the latency applied by FFMPEG too but I am guessing that turns a minor change into a big one :-).

FYI, I am running 25.0.8 (64-bit) on Windows 10.

Kind regards
 
Top