[FFmpeg-user] multiple rtp stream recording
Ing. Jan Klapuch
klapuch.jan at gmail.com
Fri Dec 5 12:50:32 CET 2014
Hi,
I'm trying to use ffmpeg for recording multiple RTP streams simultaneously
on a single computer. It seems to me, however, that When I start to record
of the second stream, incoming packets begin to mix with the first stream.
I'm using DVBlast for the streaming, the problem occurs when streaming RTP,
UDP works well.
Recording RTP streams works well by Multicat. So, I think, the problem is
in a wrong using the ffmpeg (not DVBlast).
I have tried to configure these addresses:
224.0.2.1:5004
224.0.2.2:5004
224.0.2.1:5000
224.0.2.2:5001
Different ip addresses and various ports bring same result.
Recording only first stream:
Input #0, rtp, from 'rtp://224.0.2.1:5000':
Duration: N/A, start: 78954.822089, bitrate: 256 kb/s
Program 513
Metadata:
service_name : NOVA
service_provider: CESKE RADIOKOMUNIKACE
Stream #0:0: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p,
720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:2(cze): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo,
s16p, 192 kb/s
Stream #0:3(cze): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, mono,
s16p, 64 kb/s (visual impaired)
Stream #0:1(CZE): Audio: mp1 ([6][0][0][0] / 0x0006), 0 channels, s16p
Output #0, mpegts, to 'mpeg.ts':
Metadata:
encoder : Lavf54.59.106
Stream #0:0: Video: mpeg2video ([2][0][0][0] / 0x0002), yuv420p,
720x576 [SAR 64:45 DAR 16:9], q=2-31, 25 fps, 90k tbn, 25 tbc
Stream #0:1(cze): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo,
192 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:2 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 218 fps=0.0 q=-1.0 size= 2497kB time=00:00:09.18
bitrate=2226.5kbits/frame= 230 fps=224 q=-1.0 size= 2761kB
time=00:00:09.66 bitrate=2340.2kbits/frame= 247 fps=157 q=-1.0 size=
3007kB time=00:00:10.34 bitrate=2381.3kbits/frame= 259 fps=124 q=-1.0
size= 3235kB time=00:00:10.82 bitrate=2448.4kbits/frame= 275 fps=106
q=-1.0 size= 3501kB time=00:00:11.46 bitrate=2501.5kbits/frame= 287
fps= 91 q=-1.0 size= 3698kB time=00:00:11.94 bitrate=2536.4kbits/frame=
299 fps= 80 q=-1.0 size= 3957kB time=00:00:12.42
bitrate=2608.9kbits/frame= 313 fps= 73 q=-1.0 size= 4153kB
time=00:00:12.98 bitrate=2619.9kbits/frame= 324 fps= 68 q=-1.0 size=
4315kB time=00:00:13.42 bitrate=2632.8kbits/frame= 338 fps= 64 q=-1.0
size= 4587kB time=00:00:13.98 bitrate=2687.1kbits/frame= 350 fps= 60
q=-1.0 size= 4824kB time=00:00:14.46 bitrate=2732.2kbits/frame= 362
fps= 57 q=-1.0 size= 5069kB time=00:00:14.94 bitrate=2778.5kbits/frame=
376 fps= 55 q=-1.0 size= 5390kB time=00:00:15.50 bitrate=2848.0kbits/
When I turn on the recording of the second stream output changes to this:
...
RTP: dropping old packet received too late
Last message repeated 115 times
frame= 389 fps= 53 q=-1.0 size= 5611kB time=00:00:16.02
bitrate=2868.3kbits/RTP: dropping old packet received too late
Last message repeated 140 times
frame= 402 fps= 51 q=-1.0 size= 5862kB time=00:00:16.54
bitrate=2902.4kbits/RTP: dropping old packet received too late
Last message repeated 158 times
frame= 415 fps= 50 q=-1.0 size= 6065kB time=00:00:17.06
bitrate=2911.3kbits/RTP: dropping old packet received too late
Last message repeated 175 times
frame= 427 fps= 48 q=-1.0 size= 6323kB time=00:00:17.54
bitrate=2952.2kbits/RTP: dropping old packet received too late
Last message repeated 163 times
..
Do you know where the problem might be?
Command for recording first stream:
ffmpeg -i rtp://224.0.2.1:5000 -codec copy mpeg.ts -y
Command for recoding second stream:
ffmpeg -i rtp://224.0.2.2:5001 -codec copy mpeg2.ts -y
ffmpeg -version
ffmpeg version 1.1.5
built on Jun 5 2013 20:28:06 with gcc 4.4.7 (GCC) 20120313 (Red Hat
4.4.7-3)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64
--mandir=/usr/share/man --incdir=/usr/include --disable-debug
--enable-shared --enable-gpl --enable-version3 --disable-avisynth
--enable-swscale --enable-postproc --enable-avfilter --enable-avresample
--enable-pthreads --enable-x11grab --enable-vaapi --enable-vdpau
--enable-runtime-cpudetect --enable-bzlib --enable-fontconfig
--enable-frei0r --enable-libass --enable-libbluray --enable-libcelt
--enable-libcdio --enable-libfreetype --enable-libiec61883
--enable-libopencv --enable-libmodplug --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libdc1394 --enable-libfaac
--enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopus
--enable-libpulse --enable-librtmp --enable-libschroedinger
--enable-libspeex --disable-libsoxr --enable-libtheora --enable-libtwolame
--enable-libvpx --enable-libv4l2 --enable-libx264 --enable-gnutls
--enable-zlib --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic -fPIC'
libavutil 52. 13.100 / 52. 13.100
libavcodec 54. 86.100 / 54. 86.100
libavformat 54. 59.106 / 54. 59.106
libavdevice 54. 3.102 / 54. 3.102
libavfilter 3. 32.100 / 3. 32.100
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Thanks for help.
Honza
More information about the ffmpeg-user
mailing list