[FFmpeg-user] ffmpeg is slow to pick up udp

Thomas Seilund tps at netmaster.dk
Wed Apr 8 18:33:15 CEST 2015


Hi All

I have ffmpeg running in one instance streaming to udp on the local host

Ffmpeg is running in another instance, also on local host, and reads the  
stream from udp

Why does it take 5 - 10 sec for the second instance to pick up the udp  
stream ?

I seem to be getting a lot of "Current profile doesn't provide more RBSP  
data in PPS, skipping"


First instance - streaming to udp:

ffmpeg -loop 1 -re -i overlays/test.png -c libx264 -preset ultrafast -r 24  
- pix_fmt yuv420p -g 1 -f mpegts udp://t420.netmaster.dk:8001
ffmpeg version N-69238-g2699a37 Copyright (c) 2000-2015 the FFmpeg  
developers
   built on Feb 24 2015 18:13:15 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
   configuration: --enable-gpl --enable-libmp3lame --enable-libvpx --enable-  
libx264 --enable-version3 --enable-libvorbis --enable-libfreetype --enable-  
libv4l2 --enable-libfdk-aac --enable-nonfree --enable-libpulse
   libavutil      54. 17.100 / 54. 17.100
   libavcodec     56. 20.100 / 56. 20.100
   libavformat    56. 19.100 / 56. 19.100
   libavdevice    56.  4.100 / 56.  4.100
   libavfilter     5.  8.101 /  5.  8.101
   libswscale      3.  1.101 /  3.  1.101
   libswresample   1.  1.100 /  1.  1.100
   libpostproc    53.  3.100 / 53.  3.100
Input #0, png_pipe, from 'overlays/test.png':
   Duration: N/A, bitrate: N/A
     Stream #0:0: Video: png, rgb24, 86x106 [SAR 11811:11811 DAR 43:53], 25   
fps, 25 tbr, 25 tbn, 25 tbc
[libx264 @ 0x1ec90c0] using SAR=1/1
[libx264 @ 0x1ec90c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x1ec90c0] profile Constrained Baseline, level 1.0
Output #0, mpegts, to 'udp://t420.netmaster.dk:8001':
   Metadata:
     encoder         : Lavf56.19.100
     Stream #0:0: Video: h264 (libx264), yuv420p, 86x106 [SAR 1:1 DAR   
43:53], q=-1--1, 24 fps, 90k tbn, 24 tbc
     Metadata:
       encoder         : Lavc56.20.100 libx264
Stream mapping:
   Stream #0:0 -> #0:0 (png (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 10 fps=0.0 q=29.0 size= 7kB time=00:00:00.12 bitrate= 469.2kbits/s
Past duration 0.639992 too large
Past duration 0.679985 too large
Past duration 0.719994 too large
Past duration 0.759987 too large
Past duration 0.799995 too large
Past duration 0.839989 too large
Past duration 0.879997 too large
frame= 23 fps= 23 q=29.0 size= 27kB time=00:00:00.66 bitrate= 336.1kbits/s
Past duration 0.919991 too large
Past duration 0.959999 too large
Past duration 0.999992 too large
frame= 36 fps= 24 q=29.0 size= 48kB time=00:00:01.20 bitrate= 323.6kbits/s
frame= 48 fps= 24 q=29.0 size= 66kB time=00:00:01.70 bitrate= 316.9kbits/s
frame= 60 fps= 24 q=29.0 size= 85kB time=00:00:02.20 bitrate= 314.0kbits/s  
dup=0 drop=1
frame= 73 fps= 24 q=29.0 size= 105kB time=00:00:02.75 bitrate= 312.3kbits/s  
dup=0 drop=1

Second instance reading from udp:

ffmpeg -loglevel debug -i udp://t420.netmaster.dk:8001 -c copy test.ts
ffmpeg version N-69238-g2699a37 Copyright (c) 2000-2015 the FFmpeg  
developers
   built on Feb 24 2015 18:13:15 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
   configuration: --enable-gpl --enable-libmp3lame --enable-libvpx --enable-  
libx264 --enable-version3 --enable-libvorbis --enable-libfreetype --enable-  
libv4l2 --enable-libfdk-aac --enable-nonfree --enable-libpulse
   libavutil      54. 17.100 / 54. 17.100
   libavcodec     56. 20.100 / 56. 20.100
   libavformat    56. 19.100 / 56. 19.100
   libavdevice    56.  4.100 / 56.  4.100
   libavfilter     5.  8.101 /  5.  8.101
   libswscale      3.  1.101 /  3.  1.101
   libswresample   1.  1.100 /  1.  1.100
   libpostproc    53.  3.100 / 53.  3.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging  
level) with argument 'debug'.
Reading option '-i' ... matched as input file with argument  
'udp://t420.netmaster.dk:8001'.
Reading option '-c' ... matched as option 'c' (codec name) with argument  
'copy'.
Reading option 'test.ts' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file udp://t420.netmaster.dk:8001.
Successfully parsed a group of options.
Opening an input file: udp://t420.netmaster.dk:8001.
[udp @ 0x1bff8c0] end receive buffer size reported is 131072
[mpegts @ 0x1c001c0] Format mpegts probed with size=2048 and score=100
[mpegts @ 0x1c001c0] stream=0 stream_type=1b pid=100 prog_reg_desc=
[mpegts @ 0x1c001c0] Before avformat_find_stream_info() pos: 0 bytes read: 
9556 seeks:0
[h264 @ 0x1c25640] Current profile doesn't provide more RBSP data in PPS,  
skipping
     Last message repeated 122 times
[mpegts @ 0x1c001c0] max_analyze_duration 5000000 reached at 5000000  
microseconds
[mpegts @ 0x1c001c0] After avformat_find_stream_info() pos: 197024 bytes  
read:198308 seeks:0 frames:122
Input #0, mpegts, from 'udp://t420.netmaster.dk:8001':
   Duration: N/A, start: 47.150000, bitrate: N/A
   Program 1
     Metadata:
       service_name    : Service01
       service_provider: FFmpeg
     Stream #0:0[0x100], 122, 1/90000: Video: h264 (Constrained Baseline)   
([27][0][0][0] / 0x001B), yuv420p(left), 86x106 (96x112) [SAR 1:1 DAR   
43:53], 1/48, 24 fps, 24 tbr, 90k tbn, 48 tbc
Successfully opened the file.
Parsing a group of options: output file test.ts.
Applying option c (codec name) with argument copy.
Successfully parsed a group of options.
Opening an output file: test.ts.
Successfully opened the file.
[mpegts @ 0x1c294a0] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt  
every 40 pkts
Output #0, mpegts, to 'test.ts':
   Metadata:
     encoder         : Lavf56.19.100
     Stream #0:0, 0, 1/90000: Video: h264 ([27][0][0][0] / 0x001B),   
yuv420p(left), 86x106 (0x0) [SAR 1:1 DAR 43:53], 1/24, q=2-31, 24 fps, 24   
tbr, 90k tbn, 24 tbc
Stream mapping:
   Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[NULL @ 0x1c25640] Current profile doesn't provide more RBSP data in PPS,  
skipping
     Last message repeated 13 times
[NULL @ 0x1c25640] Current profile doesn't provide more RBSP data in PPS,  
skipping
     Last message repeated 11 times
[NULL @ 0x1c25640] Current profile doesn't provide more RBSP data in PPS,  
skipping
     Last message repeated 12 times
[NULL @ 0x1c25640] Current profile doesn't provide more RBSP data in PPS,  
skipping
     Last message repeated 11 times
[NULL @ 0x1c25640] Current profile doesn't provide more RBSP data in PPS,  
skipping
     Last message repeated 12 times
[NULL @ 0x1c25640] Current profile doesn't provide more RBSP data in PPS,  
skipping
     Last message repeated 11 times
[NULL @ 0x1c25640] Current profile doesn't provide more RBSP data in PPS,  
skipping
     Last message repeated 12 times
[NULL @ 0x1c25640] Current profile doesn't provide more RBSP data in PPS,  
skipping
     Last message repeated 11 times
[NULL @ 0x1c25640] Current profile doesn't provide more RBSP data in PPS,  
skipping
     Last message repeated 12 times
[NULL @ 0x1c25640] Current profile doesn't provide more RBSP data in PPS,  
skipping
     Last message repeated 11 times
[NULL @ 0x1c25640] Current profile doesn't provide more RBSP data in PPS,  
skipping
     Last message repeated 12 times
[NULL @ 0x1c25640] Current profile doesn't provide more RBSP data in PPS,  
skipping
     Last message repeated 11 times
[NULL @ 0x1c25640] Current profile doesn't provide more RBSP data in PPS,  
skipping
     Last message repeated 1 times
frame= 276 fps= 43 q=-1.0 Lsize= 428kB time=00:00:11.50 bitrate=  
305.0kbits/s
video:387kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB  
muxing overhead: 10.617254%
Input file #0 (udp://t420.netmaster.dk:8001):
   Input stream #0:0 (video): 276 packets read (396336 bytes);
   Total: 276 packets (396336 bytes) demuxed
Output file #0 (test.ts):
   Output stream #0:0 (video): 276 packets muxed (396336 bytes);
   Total: 276 packets (396336 bytes) muxed
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x1c46280] Statistics: 0 seeks, 276 writeouts
[AVIOContext @ 0x1c218c0] Statistics: 441392 bytes read, 0 seeks
Received signal 2: terminating.
tps at t420:~/video/test$ ^C
tps at t420:~/video/test$


Thanks

Thomas S


More information about the ffmpeg-user mailing list