[FFmpeg-user] bad performance when streaming udp from png image2pipe source

Jacobs jacobhameiri at gmail.com
Sun Nov 4 00:58:17 CET 2012


finally I have some progress by forcing the input frame rate to 1 and the
output frame rate to 20, this produces a much better frame rate in the
target machine. but still I have many problems ( occasional images smearing,
and lagging) in my destination ( udp receiver ).

I am getting many errors in ffplay, maybe you can help me understand what is
wrong with the stream.

ffmpeg command and output:
ffmpeg -an -y -r 1 -f image2pipe -vcodec png -i /sdcard/tempfifo   -r 20
-bsf:v h264_mp4toannexb  -b 300400 -f mpegts udp://192.168.1.23:1235 

ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
  built on Oct 29 2012 21:27:23 with gcc 4.6.x-google 20120106 (prerelease)
  configuration: --arch=arm --cpu=cortex-a8 --target-os=linux
--enable-runtime-cpudetect --prefix=/data/data/org.witness.sscvideoproto
--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-3/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-yasm --enable-decoders --enable-encoders --enable-muxers
--enable-demuxers --enable-parsers --enable-protocols --enable-filters
--enable-avresample --enable-libfreetype --disable-indevs
--enable-indev=lavfi --enable-indev=fbdev --enable-outdevs --enable-hwaccels
--enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver
--enable-network --enable-libx264 --enable-zlib --enable-postproc
  libavutil      51. 54.100 / 51. 54.100
  libavcodec     54. 23.100 / 54. 23.100
  libavformat    54.  6.100 / 54.  6.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     2. 77.100 /  2. 77.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[image2pipe @ 0x13114e0] Estimating duration from bitrate, this may be
inaccurate
Input #0, image2pipe, from '/sdcard/tempfifo':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: png, rgba, 800x1280, 1 tbr, 1 tbn, 1 tbc
Please use -b:a or -b:v, -b is ambiguous
[buffer @ 0x13342a0] w:800 h:1280 pixfmt:rgba tb:1/1 sar:0/1
sws_param:flags=2
[buffersink @ 0x1334510] No opaque field provided
[format @ 0x13346a0] auto-inserting filter 'auto-inserted scaler 0' between
the filter 'src' and the filter 'format'
[scale @ 0x1334df0] w:800 h:1280 fmt:rgba sar:0/1 -> w:800 h:1280
fmt:yuv420p sar:0/1 flags:0x4
[mpegts @ 0x1320240] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt
every 40 pkts
Output #0, mpegts, to 'udp://192.168.1.23:1235':
  Metadata:
    encoder         : Lavf54.6.100
    Stream #0:0: Video: mpeg2video, yuv420p, 800x1280, q=2-31, 300 kb/s, 90k
tbn, 23.98 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png -> mpeg2video)
Press [q] to stop, [?] for help
frame=   48 fps= 46 q=31.0 size=     623kB time=00:00:01.91
bitrate=2661.4kbits/s dup=45 drop=0    
frame=   72 fps= 37 q=31.0 size=     744kB time=00:00:02.91
bitrate=2087.4kbits/s dup=68 drop=0    
frame=   96 fps= 35 q=31.0 size=     865kB time=00:00:03.92
bitrate=1806.5kbits/s dup=91 drop=0    
frame=  120 fps= 33 q=31.0 size=     985kB time=00:00:04.92
bitrate=1639.8kbits/s dup=114 drop=0    
frame=  144 fps= 32 q=31.0 size=    1106kB time=00:00:05.92
bitrate=1529.5kbits/s dup=137 drop=0    
frame=  168 fps= 31 q=31.0 size=    1226kB time=00:00:06.92
bitrate=1451.1kbits/s dup=160 drop=0    
frame=  192 fps= 30 q=31.0 size=    1350kB time=00:00:07.92
bitrate=1395.1kbits/s dup=183 drop=0    
frame=  216 fps= 29 q=31.0 size=    1478kB time=00:00:08.92
bitrate=1357.0kbits/s dup=206 drop=0    
frame=  240 fps= 28 q=31.0 size=    1600kB time=00:00:09.92
bitrate=1320.3kbits/s dup=229 drop=0    
frame=  264 fps= 28 q=31.0 size=    1720kB time=00:00:10.92
bitrate=1289.8kbits/s dup=252 drop=0    
frame=  288 fps= 28 q=31.0 size=    1841kB time=00:00:11.92
bitrate=1264.4kbits/s dup=275 drop=0    
frame=  312 fps= 28 q=31.0 size=    1962kB time=00:00:12.92
bitrate=1242.9kbits/s dup=298 drop=0    
frame=  336 fps= 27 q=31.0 size=    2084kB time=00:00:13.93
bitrate=1225.6kbits/s dup=321 drop=0    
frame=  360 fps= 27 q=31.0 size=    2208kB time=00:00:14.93
bitrate=1211.2kbits/s dup=344 drop=0    
frame=  384 fps= 27 q=31.0 size=    2293kB time=00:00:15.93
bitrate=1179.2kbits/s dup=367 drop=0    
frame=  408 fps= 26 q=31.0 size=    2367kB time=00:00:16.93
bitrate=1145.0kbits/s dup=390 drop=0    
frame=  432 fps= 25 q=31.0 size=    2454kB time=00:00:17.93
bitrate=1120.7kbits/s dup=413 drop=0    
frame=  456 fps= 24 q=31.0 size=    2524kB time=00:00:18.93
bitrate=1091.8kbits/s dup=436 drop=0    
frame=  480 fps= 23 q=31.0 size=    2592kB time=00:00:19.93
bitrate=1065.1kbits/s dup=459 drop=0    
frame=  503 fps= 23 q=31.0 size=    2661kB time=00:00:20.89
bitrate=1043.4kbits/s dup=481 drop=0    
frame=  527 fps= 23 q=31.0 size=    2732kB time=00:00:21.89
bitrate=1021.9kbits/s dup=504 drop=0    
frame=  551 fps= 22 q=31.0 size=    2817kB time=00:00:22.89
bitrate=1007.8kbits/s dup=527 drop=0    
frame=  575 fps= 22 q=31.0 size=    2920kB time=00:00:23.89
bitrate=1000.9kbits/s dup=550 drop=0    
frame=  599 fps= 22 q=31.0 size=    3000kB time=00:00:24.89 bitrate=
987.0kbits/s dup=573 drop=0    
frame=  623 fps= 21 q=31.0 size=    3075kB time=00:00:25.90 bitrate=
972.6kbits/s dup=596 drop=0    
frame=  647 fps= 22 q=31.0 size=    3140kB time=00:00:26.90 bitrate=
956.2kbits/s dup=619 drop=0    
frame=  671 fps= 22 q=31.0 size=    3206kB time=00:00:27.90 bitrate=
941.1kbits/s dup=642 drop=0    
frame=  695 fps= 22 q=31.0 size=    3271kB time=00:00:28.90 bitrate=
927.0kbits/s dup=665 drop=0    
frame=  719 fps= 22 q=31.0 size=    3336kB time=00:00:29.90 bitrate=
913.9kbits/s dup=688 drop=0    
frame=  743 fps= 22 q=31.0 size=    3401kB time=00:00:30.90 bitrate=
901.6kbits/s dup=711 drop=0    
frame=  767 fps= 22 q=31.0 size=    3467kB time=00:00:31.90 bitrate=
890.1kbits/s dup=734 drop=0    
frame=  791 fps= 22 q=31.0 size=    3532kB time=00:00:32.90 bitrate=
879.2kbits/s dup=757 drop=0    
frame=  815 fps= 22 q=31.0 size=    3629kB time=00:00:33.90 bitrate=
876.8kbits/s dup=780 drop=0    
frame=  839 fps= 22 q=31.0 size=    3710kB time=00:00:34.90 bitrate=
870.6kbits/s dup=803 drop=0    
frame=  863 fps= 22 q=31.0 size=    3790kB time=00:00:35.91 bitrate=
864.6kbits/s dup=826 drop=0    
frame=  887 fps= 22 q=31.0 size=    3871kB time=00:00:36.91 bitrate=
859.1kbits/s dup=849 drop=0    
frame=  911 fps= 21 q=31.0 size=    3951kB time=00:00:37.91 bitrate=
853.7kbits/s dup=872 drop=0    
frame=  935 fps= 21 q=31.0 size=    4031kB time=00:00:38.91 bitrate=
848.5kbits/s dup=895 drop=0    
frame=  959 fps= 21 q=31.0 size=    4117kB time=00:00:39.91 bitrate=
844.9kbits/s dup=918 drop=0    
frame=  983 fps= 20 q=31.0 size=    4187kB time=00:00:40.91 bitrate=
838.3kbits/s dup=941 drop=0    
frame= 1007 fps= 21 q=31.0 size=    4255kB time=00:00:41.91 bitrate=
831.6kbits/s dup=964 drop=0    
frame= 1031 fps= 21 q=31.0 size=    4323kB time=00:00:42.91 bitrate=
825.2kbits/s dup=987 drop=0    
frame= 1055 fps= 21 q=31.0 size=    4392kB time=00:00:43.91 bitrate=
819.1kbits/s dup=1010 drop=0    
frame= 1079 fps= 21 q=31.0 size=    4460kB time=00:00:44.91 bitrate=
813.3kbits/s dup=1033 drop=0    
frame= 1103 fps= 21 q=31.0 size=    4528kB time=00:00:45.92 bitrate=
807.8kbits/s dup=1056 drop=0    
frame= 1127 fps= 21 q=31.0 size=    4596kB time=00:00:46.92 bitrate=
802.5kbits/s dup=1079 drop=0    
sh: j_waitj: tcsetpgrp(24, 19514) failed: Not a typewriter
Hangup 

ffplay command and output:

ffplay.exe udp://127.0.0.1:1235  -probesize 50000 -analyzeduration 50

ffplay version N-46146-g11d695d Copyright (c) 2003-2012 the FFmpeg
developers
  built on Oct 29 2012 18:10:27 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-pthreads
--enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r
--enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut
--enable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libschroedinger --enable-libspeex --enable-libtheora
--enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs
--enable-libxvid --enable-zlib
  libavutil      52.  1.100 / 52.  1.100
  libavcodec     54. 69.100 / 54. 69.100
  libavformat    54. 35.100 / 54. 35.100
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 20.109 /  3. 20.109
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 16.100 /  0. 16.100
  libpostproc    52.  1.100 / 52.  1.100
[mpegts @ 0000000001f11d80] Unable to seek back to the start
[mpeg2video @ 0000000001f3e7a0] mpeg_decode_postinit() failure
    Last message repeated 10 times
[mpegts @ 0000000001f11d80] Estimating duration from bitrate, this may be
inaccurate
Input #0, mpegts, from 'udp://127.0.0.1:1235':
  Duration: N/A, start: 1.942211, bitrate: 104857 kb/s
  Program 1 
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
yuv420p, 800x1280 [SAR 1:1 DAR 5:8], 104857 kb/s, 23.98 fps, 47.95 tbr, 90k
tbn, 47.95 tbc
Frame changed from size:0x0 to size:800x1280
[mpegts @ 0000000001f11d80] PES packet size mismatch
[mpeg2video @ 0000000001f3e7a0] skipped MB in I frame at 13 38
[mpeg2video @ 0000000001f3e7a0] skipped MB in I frame at 42 45
[mpeg2video @ 0000000001f3e7a0] skipped MB in I frame at 17 33
[mpeg2video @ 0000000001f3e7a0] Warning MVs not available
[mpeg2video @ 0000000001f3e7a0] concealing 450 DC, 450 AC, 450 MV errors in
I frame
[mpegts @ 0000000001f11d80] PES packet size mismatch
[mpeg2video @ 0000000001f3e7a0] mb incr damaged
[mpeg2video @ 0000000001f3e7a0] concealing 200 DC, 200 AC, 200 MV errors in
I frame
[mpegts @ 0000000001f11d80] PES packet size mismatch
[mpeg2video @ 0000000001f3e7a0] invalid mb type in I Frame at 5 67
[mpeg2video @ 0000000001f3e7a0] concealing 350 DC, 350 AC, 350 MV errors in
I frame
[mpegts @ 0000000001f11d80] PES packet size mismatch
[mpeg2video @ 0000000001f3e7a0] ac-tex damaged at 29 58
[mpeg2video @ 0000000001f3e7a0] concealing 400 DC, 400 AC, 400 MV errors in
I frame
[mpegts @ 0000000001f11d80] PES packet size mismatch
[mpeg2video @ 0000000001f3e7a0] invalid mb type in I Frame at 9 49
[mpeg2video @ 0000000001f3e7a0] concealing 298 DC, 298 AC, 298 MV errors in
I frame
[mpegts @ 0000000001f11d80] PES packet size mismatch
[mpeg2video @ 0000000001f3e7a0] invalid mb type in I Frame at 9 49
[mpeg2video @ 0000000001f3e7a0] ac-tex damaged at 2 53
[mpeg2video @ 0000000001f3e7a0] concealing 695 DC, 695 AC, 695 MV errors in
I frame
[mpegts @ 0000000001f11d80] PES packet size mismatch
[mpeg2video @ 0000000001f3e7a0] skipped MB in I frame at 43 40
[mpeg2video @ 0000000001f3e7a0] skipped MB in I frame at 10 43
[mpeg2video @ 0000000001f3e7a0] concealing 200 DC, 200 AC, 200 MV errors in
I frame
[mpegts @ 0000000001f11d80] PES packet size mismatch
[mpeg2video @ 0000000001f3e7a0] skipped MB in I frame at 37 29
[mpeg2video @ 0000000001f3e7a0] concealing 250 DC, 250 AC, 250 MV errors in
I frame
[mpegts @ 0000000001f11d80] PES packet size mismatch
[mpeg2video @ 0000000001f3e7a0] invalid mb type in I Frame at 49 10
[mpeg2video @ 0000000001f3e7a0] Warning MVs not available
[mpeg2video @ 0000000001f3e7a0] concealing 300 DC, 300 AC, 300 MV errors in
I frame




--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/bad-performance-when-streaming-udp-from-png-image2pipe-source-tp4654598p4654701.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list