[FFmpeg-user] reduce laltency when streaming udp multicast

Jacobs jacobhameiri at gmail.com
Mon Apr 15 11:43:11 CEST 2013


I am streaming a raw rgb live video via multicast using mpegts, currently I
have a 1-2 seconds delay  what can I do to reduce this delay ? (I am willing
to lower the quality to gain less delay time)

this is my command and output:

ffmpeg started on 2013-04-15 at 12:37:59
Report written to "ffmpeg-20130415-123759.log"
Command line:
/bin/ffmpeg -an -f rawvideo -vcodec rawvideo -s 800x1280 -pix_fmt rgba -r 9
-i - -vcodec mpeg4 -preset ultrafast -tune zerolatency -r 9 -filter:v
"scale=400:-1" -sws_flags fast_bilinear -b 200000 -f mpegts
udp://224.1.1.1:1234 -report
ffmpeg version 1.0 Copyright (c) 2000-2012 the FFmpeg developers
  built on Nov 18 2012 21:53:10 with gcc 4.6.x-google (GCC) 20120106
(prerelease)
  configuration: --arch=arm --cpu=cortex-a8 --target-os=linux
--enable-runtime-cpudetect --prefix=/data/ --disable-shared --enable-static
--cross-prefix=/home/oz/android-ndk-r8b//toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-
--sysroot=/home/oz/android-ndk-r8b//platforms/android-8/arch-arm
--extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon -mfpu=vfpv3-d16'
--extra-ldflags='-L../x264 ' --enable-version3 --enable-gpl --disable-doc
--enable-libfreetype --enable-hwaccels --disable-ffprobe --enable-ffserver
--enable-pthreads --enable-libx264 --disable-fast-unaligned
  libavutil      51. 73.101 / 51. 73.101
  libavcodec     54. 59.100 / 54. 59.100
  libavformat    54. 29.104 / 54. 29.104
  libavdevice    54.  2.101 / 54.  2.101
  libavfilter     3. 17.100 /  3. 17.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[rawvideo @ 0x2ac0620] File position before avformat_find_stream_info() is 0
[rawvideo @ 0x2ac0620] All info found
[rawvideo @ 0x2ac0620] Estimating duration from bitrate, this may be
inaccurate
[rawvideo @ 0x2ac0620] File position after avformat_find_stream_info() is
4096000
Input #0, rawvideo, from 'pipe:':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0, 1, 1/9: Video: rawvideo (RGBA / 0x41424752), rgba,
800x1280, 9 tbr, 9 tbn, 9 tbc
Please use -b:a or -b:v, -b is ambiguous
[buffer @ 0x2acd6c0] Setting entry with key 'video_size' to value '800x1280'
[buffer @ 0x2acd6c0] Setting entry with key 'pix_fmt' to value '28'
[buffer @ 0x2acd6c0] Setting entry with key 'time_base' to value '1/9'
[buffer @ 0x2acd6c0] Setting entry with key 'pixel_aspect' to value '0/1'
[buffer @ 0x2acd6c0] Setting entry with key 'sws_param' to value 'flags=2'
[buffer @ 0x2acd6c0] Setting entry with key 'frame_rate' to value '9/1'
[graph 0 input from stream 0:0 @ 0x2acd670] w:800 h:1280 pixfmt:rgba tb:1/9
fr:9/1 sar:0/1 sws_param:flags=2
[graph 0 input from stream 0:0 @ 0x2acd670] TB:0.111111 FRAME_RATE:9.000000
SAMPLE_RATE:NaN
[Parsed_scale_0 @ 0x2ac05e0] w:800 h:1280 fmt:rgba sar:0/1 -> w:400 h:640
fmt:yuv420p sar:0/1 flags:0x1
[mpeg4 @ 0x2ac9970] detected 4 logical cores
[mpeg4 @ 0x2ac9970] intra_quant_bias = 0 inter_quant_bias = -64
[mpegts @ 0x2ac91f0] muxrate VBR, pcr every 1 pkts, sdt every 200, pat/pmt
every 40 pkts
Output #0, mpegts, to 'udp://224.1.1.1:1234':
  Metadata:
    encoder         : Lavf54.29.104
    Stream #0:0, 0, 1/90000: Video: mpeg4, yuv420p, 400x640, q=2-31, 200
kb/s, 90k tbn, 9 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
frame=    6 fps=0.0 q=2.0 size=      52kB time=00:00:00.66 bitrate=
638.4kbits/s    
frame=   12 fps= 11 q=2.0 size=      54kB time=00:00:01.33 bitrate=
332.8kbits/s    
frame=   17 fps= 10 q=2.0 size=     112kB time=00:00:01.88 bitrate=
484.9kbits/s    
frame=   23 fps= 10 q=2.0 size=     114kB time=00:00:02.55 bitrate=
365.5kbits/s    
frame=   28 fps= 10 q=2.0 size=     172kB time=00:00:03.11 bitrate=
452.5kbits/s    
frame=   34 fps= 10 q=2.0 size=     174kB time=00:00:03.77 bitrate=
377.4kbits/s    
frame=   39 fps= 10 q=2.0 size=     232kB time=00:00:04.33 bitrate=
438.0kbits/s    
frame=   45 fps= 10 q=2.0 size=     234kB time=00:00:05.00 bitrate=
383.5kbits/s    
frame=   50 fps=9.9 q=2.0 size=     294kB time=00:00:05.55 bitrate=
434.2kbits/s    
frame=   55 fps=9.7 q=2.0 size=     304kB time=00:00:06.11 bitrate=
408.0kbits/s    
frame=   59 fps=9.3 q=2.0 size=     307kB time=00:00:06.55 bitrate=
383.1kbits/s    
frame=   63 fps=9.1 q=2.0 size=     352kB time=00:00:07.00 bitrate=
412.5kbits/s    
frame=   67 fps=8.9 q=2.0 size=     360kB time=00:00:07.44 bitrate=
396.6kbits/s    
frame=   71 fps=8.8 q=2.0 size=     366kB time=00:00:07.88 bitrate=
380.2kbits/s    
frame=   76 fps=8.8 q=2.0 size=     411kB time=00:00:08.44 bitrate=
398.2kbits/s    
frame=   81 fps=8.8 q=2.0 size=     417kB time=00:00:09.00 bitrate=
379.3kbits/s    
frame=   86 fps=8.8 q=2.0 size=     477kB time=00:00:09.55 bitrate=
408.6kbits/s    
frame=   91 fps=8.8 q=2.0 size=     488kB time=00:00:10.11 bitrate=
395.1kbits/s    
frame=   96 fps=8.8 q=2.0 size=     500kB time=00:00:10.66 bitrate=
383.8kbits/s    
frame=  101 fps=8.8 q=2.1 size=     554kB time=00:00:11.22 bitrate=
404.2kbits/s    
frame=  106 fps=8.8 q=2.0 size=     563kB time=00:00:11.77 bitrate=
391.5kbits/s    
frame=  110 fps=8.7 q=2.3 size=     615kB time=00:00:12.22 bitrate=
412.0kbits/s    
frame=  115 fps=8.7 q=6.6 size=     646kB time=00:00:12.77 bitrate=
414.3kbits/s    
frame=  120 fps=8.7 q=5.2 size=     661kB time=00:00:13.33 bitrate=
406.2kbits/s    
frame=  125 fps=8.7 q=5.3 size=     704kB time=00:00:13.88 bitrate=
415.2kbits/s    
frame=  130 fps=8.7 q=6.0 size=     714kB time=00:00:14.44 bitrate=
405.0kbits/s    
frame=  135 fps=8.7 q=9.0 size=     754kB time=00:00:15.00 bitrate=
411.9kbits/s    
frame=  140 fps=8.7 q=11.1 size=     769kB time=00:00:15.55 bitrate=
404.8kbits/s    
frame=  145 fps=8.7 q=8.3 size=     801kB time=00:00:16.11 bitrate=
407.3kbits/s    
frame=  150 fps=8.7 q=11.5 size=     811kB time=00:00:16.66 bitrate=
398.7kbits/s    
frame=  155 fps=8.7 q=14.1 size=     823kB time=00:00:17.22 bitrate=
391.7kbits/s    
frame=  160 fps=8.7 q=16.9 size=     853kB time=00:00:17.77 bitrate=
393.1kbits/s    
frame=  164 fps=8.7 q=10.6 size=     857kB time=00:00:18.22 bitrate=
385.2kbits/s    
frame=  169 fps=8.7 q=7.6 size=     885kB time=00:00:18.77 bitrate=
385.9kbits/s    
frame=  174 fps=8.7 q=12.6 size=     892kB time=00:00:19.33 bitrate=
377.9kbits/s    
frame=  179 fps=8.7 q=12.9 size=     901kB time=00:00:19.88 bitrate=
371.3kbits/s    
frame=  184 fps=8.7 q=15.6 size=     931kB time=00:00:20.44 bitrate=
373.0kbits/s    
frame=  189 fps=8.7 q=16.9 size=     939kB time=00:00:21.00 bitrate=
366.5kbits/s    
frame=  194 fps=8.6 q=14.8 size=     963kB time=00:00:21.55 bitrate=
366.0kbits/s    
frame=  198 fps=8.6 q=18.5 size=     970kB time=00:00:22.00 bitrate=
361.3kbits/s    
frame=  203 fps=8.6 q=15.8 size=     978kB time=00:00:22.55 bitrate=
355.3kbits/s    
frame=  208 fps=8.6 q=18.0 size=    1004kB time=00:00:23.11 bitrate=
355.7kbits/s    
frame=  213 fps=8.6 q=19.3 size=    1013kB time=00:00:23.66 bitrate=
350.7kbits/s    




--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/reduce-laltency-when-streaming-udp-multicast-tp4658488.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list