Skip to content

"port=" options of rtp stream output module is broken

I try to make multiple streams using duplicate and rtp modules. That is my VLC start script:

/usr/local/bin/vlc -vvv --color --ts-es-id-pid --sout-all dvb-s:// \
--dvb-adapter=1 --dvb-frequency=10995000 \
--dvb-srate=20000000 --dvb-voltage=13 --sout-standard-access=udp \
--sout-standard-mux=ts --sout '#duplicate{
   dst=rtp{dst=127.0.0.1,port=1240,sdp=file:///usr/local/movies/relay1.sdp},select="program=16",
   dst=rtp{dst=127.0.0.1,port=1250,sdp=file:///usr/local/movies/relay2.sdp},select="program=17",
   dst=rtp{dst=127.0.0.1,port=1260,sdp=file:///usr/local/movies/relay3.sdp},select="program=18"
}'

As a result vlc does not work.

I found that this is because rtp module uses wrong port numbers. I can see it from .sdp files:

relay1.sdp It uses port 1230 for audio and 1232 for video (when i set port=1240 in script)

v=0
o=- 1204797460417853 2 IN IP4 127.0.0.1
s=NONE
t=0 0
a=tool:vlc 0.8.6e
c=IN IP4 127.0.0.1
m=audio 1230 RTP/AVP 14
b=AS:128
a=rtpmap:14 MPA/90000
m=video 1232 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4d401e;sprop-parameter-sets=Z01AHqnYEQJNgggAAAMACAAAAwGUoA==,aP4BrJI=;

relay2.sdp It's uses 1230 and 1232 ports too

dv=0
o=- 1204797460422502 2 IN IP4 127.0.0.1
s=NONE
t=0 0
a=tool:vlc 0.8.6e
c=IN IP4 127.0.0.1
m=audio '''1230''' RTP/AVP 14
b=AS:128
a=rtpmap:14 MPA/90000
m=video '''1232''' RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4d401e;sprop-parameter-sets=Z01AHqnYEQJNgggAAAMACAAAAwGUoA==,aP4BrJI=;

relay3.sdp it uses 1230 for audio and 1260 for video

v=0
o=- 1204797460427058 3 IN IP4 127.0.0.1
s=NONE
t=0 0
a=tool:vlc 0.8.6e
c=IN IP4 127.0.0.1
m=audio 1230 RTP/AVP 14
b=AS:128
a=rtpmap:14 MPA/90000
m=audio '''1260''' RTP/AVP 14
b=AS:128
a=rtpmap:14 MPA/90000
m=video '''1232''' RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=4d401e;sprop-parameter-sets=Z01AHqnYEQJNgggAAAMACAAAAwGUoA==,aP4BrJI=;

I will attach a simple patch that fix this.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information