[FFmpeg-user] udp multicast video stream frame loss

Jacobs jacobhameiri at gmail.com
Sun Nov 11 22:18:30 CET 2012


I need to stream video files over a wifi lan from an android tablet to other
tablets using ffmpeg.
when I stream directly to one device with udp unicast the stream is fine.
but if I stream over multicast I get a lot of frame loss in the output
video. the player is android mxplayer ( android player based on ffmpeg )

any idea how I can reduce the frame loss. this is the best command I have so
far:
ffmpeg -i /sdcard/m -vcodec mpeg4 -ab 32k -ar 22050 -tune film -b 600k -r 13
-async 1 -f mpegts udp://224.1.1.1:1234

ffmpeg version N-46525-gbc17a6f Copyright (c) 2000-2012 the FFmpeg
developers
  built on Nov  8 2012 12:27:23 with gcc 4.6.x-google (GCC) 20120106
(prerelease)
  configuration: --arch=arm --cpu=cortex-a8 --target-os=linux
--enable-runtime-cpudetect --prefix=/data/ --enable-pic --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-decoders --enable-encoders --enable-muxers --enable-demuxers
--enable-parsers --enable-protocols --enable-avresample --enable-libfreetype
--enable-indevs --disable-indev=lavfi --enable-indev=fbdev --enable-outdevs
--enable-hwaccels --enable-ffmpeg --enable-ffplay --disable-ffprobe
--disable-ffserver --enable-network --enable-pthreads --enable-libx264
--enable-zlib --enable-postproc --disable-libxvid --enable-avcodec
--enable-avformat --enable-swresample --enable-swscale --enable-postproc
--enable-avfilter --enable-avresample  libavutil      52.  5.100 / 52. 
5.100
  libavcodec     54. 71.100 / 54. 71.100
  libavformat    54. 36.100 / 54. 36.100
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 21.106 /  3. 21.106
  libswscale      2.  1.102 /  2.  1.102
  libswresample   0. 16.100 /  0. 16.100
  libpostproc    52.  1.100 / 52.  1.100
Input #0, avi, from '/sdcard/m':
  Metadata:
    encoder         : transcode-1.0.6
  Duration: 00:21:22.87, start: 0.000000, bitrate: 1144 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658),
yuv420p, 624x352 [SAR 1:1 DAR 39:22], 23.98 tbr, 23.98 tbn, 23.98 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16,
128 kb/s
Please use -b:a or -b:v, -b is ambiguous
-async is forwarded to lavfi similarly to -af
aresample=min_comp=0.001:min_hard_comp=0.100000.
Output #0, mpegts, to 'udp://225.1.1.1:3333':
  Metadata:
    encoder         : Lavf54.36.100
    Stream #0:0: Video: mpeg4, yuv420p, 624x352 [SAR 1:1 DAR 39:22], q=2-31,
600 kb/s, 90k tbn, 13 tbc
    Stream #0:1: Audio: mp2, 22050 Hz, stereo, s16, 32 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg4 -> mpeg4)
  Stream #0:1 -> #0:1 (mp3 -> mp2)
Press [q] to stop, [?] for help
frame=   28 fps=0.0 q=2.1 size=     263kB time=00:00:02.15 bitrate=
999.2kbits/s dup=1 drop=19    
frame=   52 fps= 52 q=6.9 size=     574kB time=00:00:04.00
bitrate=1174.6kbits/s dup=1 drop=39    
frame=   76 fps= 50 q=8.2 size=     731kB time=00:00:05.84
bitrate=1024.9kbits/s dup=1 drop=58    
frame=  102 fps= 51 q=6.7 size=     885kB time=00:00:07.84 bitrate=
924.3kbits/s dup=1 drop=80    
frame=  126 fps= 50 q=7.2 size=    1026kB time=00:00:09.69 bitrate=
867.0kbits/s dup=1 drop=100    
frame=  149 fps= 49 q=7.2 size=    1160kB time=00:00:11.46 bitrate=
828.9kbits/s dup=1 drop=120    
frame=  175 fps= 49 q=6.9 size=    1317kB time=00:00:13.46 bitrate=
801.2kbits/s dup=1 drop=143    
frame=  202 fps= 50 q=5.0 size=    1490kB time=00:00:15.53 bitrate=
785.4kbits/s dup=1 drop=165    
frame=  230 fps= 50 q=6.2 size=    1651kB time=00:00:17.69 bitrate=
764.4kbits/s dup=1 drop=188    
frame=  255 fps= 50 q=6.2 size=    1809kB time=00:00:19.61 bitrate=
755.3kbits/s dup=1 drop=209    
frame=  280 fps= 50 q=6.0 size=    1965kB time=00:00:21.53 bitrate=
747.5kbits/s dup=1 drop=231    
frame=  306 fps= 50 q=6.2 size=    2125kB time=00:00:23.53 bitrate=
739.5kbits/s dup=1 drop=252    
frame=  331 fps= 50 q=8.0 size=    2295kB time=00:00:25.46 bitrate=
738.5kbits/s dup=1 drop=274    
frame=  357 fps= 50 q=6.8 size=    2469kB time=00:00:27.46 bitrate=
736.5kbits/s dup=1 drop=295    
frame=  382 fps= 50 q=9.3 size=    2659kB time=00:00:29.38 bitrate=
741.2kbits/s dup=1 drop=317    
frame=  403 fps= 50 q=11.1 size=    2808kB time=00:00:31.00 bitrate=
742.2kbits/s dup=1 drop=334    
frame=  426 fps= 49 q=12.1 size=    2977kB time=00:00:32.76 bitrate=
744.3kbits/s dup=1 drop=354    
frame=  450 fps= 49 q=7.2 size=    3119kB time=00:00:34.61 bitrate=
738.1kbits/s dup=1 drop=374    
frame=  477 fps= 50 q=6.9 size=    3278kB time=00:00:36.69 bitrate=
731.9kbits/s dup=1 drop=398    
frame=  504 fps= 50 q=5.7 size=    3447kB time=00:00:38.76 bitrate=
728.4kbits/s dup=1 drop=420    
frame=  530 fps= 50 q=6.0 size=    3606kB time=00:00:40.76 bitrate=
724.6kbits/s dup=1 drop=442    
frame=  554 fps= 50 q=7.3 size=    3766kB time=00:00:42.61 bitrate=
723.9kbits/s dup=1 drop=463    
frame=  579 fps= 50 q=5.5 size=    3922kB time=00:00:44.53 bitrate=
721.3kbits/s dup=1 drop=483    
frame=  605 fps= 50 q=6.5 size=    4080kB time=00:00:46.53 bitrate=
718.1kbits/s dup=1 drop=505    
frame=  631 fps= 50 q=6.0 size=    4247kB time=00:00:48.53 bitrate=
716.7kbits/s dup=1 drop=528    
frame=  656 fps= 50 q=10.6 size=    4431kB time=00:00:50.46 bitrate=
719.3kbits/s dup=1 drop=548    
frame=  680 fps= 50 q=7.4 size=    4593kB time=00:00:52.30 bitrate=
719.4kbits/s dup=1 drop=568    
frame=  705 fps= 50 q=6.9 size=    4750kB time=00:00:54.23 bitrate=
717.5kbits/s dup=1 drop=589    
frame=  731 fps= 50 q=5.5 size=    4919kB time=00:00:56.23 bitrate=
716.6kbits/s dup=1 drop=611    
frame=  759 fps= 50 q=7.6 size=    5112kB time=00:00:58.38 bitrate=
717.3kbits/s dup=1 drop=635    
frame=  775 fps= 50 q=7.1 Lsize=    5226kB time=00:00:59.61 bitrate=
718.1kbits/s dup=1 drop=648    
video:4518kB audio:232kB subtitle:0 global headers:0kB muxing overhead
10.004192%
Received signal 2: terminating.




--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/udp-multicast-video-stream-frame-loss-tp4654928.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list