[FFmpeg-user] RTMP Input error (UDP output)

Matt Conway conwayxd at gmail.com
Wed Mar 18 15:56:44 CET 2015


Thanks for getting back to me Moritz

Have you tried following this hint? Taken from your output log:

> [avi @ 0000000002e8e8c0] H.264 bitstream malformed, no startcode 
> found, use the video bitstream filter 'h264_mp4toannexb' to fix it 
> ('-bsf:v h264_mp4toannexb' option with ffmpeg)

This seems to have fixed the output. I should probably learn to read the
output a bit more in depth! Here is the console output for the "working"
command from the ffmpeg side.


C:\Users\admin\Desktop>ffmpeg -re -i
rtmp://1.20006911.fme.ustream.tv/ustreamVideo/20006911/9gjxU2DxvaUJDQZ9Yc6eG
weKwV6Y2E7a -bsf:v h264_mp4toannexb -an -c:v copy -f avi
udp://239.0.1.23:1234
ffmpeg version N-69920-g8bc8001 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --
enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --ena
ble-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjp
eg --enable-libopus --enable-librtmp --enable-libschroedinger
--enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
--en
able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp
--enab
le-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma
--enable-decklink --enable-zlib
  libavutil      54. 18.100 / 54. 18.100
  libavcodec     56. 22.100 / 56. 22.100
  libavformat    56. 22.100 / 56. 22.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.100 /  5. 11.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, flv, from
'rtmp://1.20006911.fme.ustream.tv/ustreamVideo/20006911/9gjxU2DxvaUJDQZ9Yc6e
GweKwV6Y2E7a':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (Baseline), yuvj420p(pc, bt709), 800x450 [SAR
1:1 DAR 16:9], 30 tbr, 1k tbn, 2k tbc
Output #0, avi, to 'udp://239.0.1.23:1234':
  Metadata:
    ISFT            : Lavf56.22.100
    Stream #0:0: Video: h264 (H264 / 0x34363248), yuvj420p, 800x450 [SAR 1:1
DAR 16:9], q=2-31, 30 tbr, 1k tbn, 1k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
frame= 1666 fps= 30 q=-1.0 size=    1860kB time=00:00:55.81 bitrate=
272.9kbits/s







However, the Raspberry Pi that is looking for the output (listening with
pwomxplayer for a video wall) does not receive anything when using this
command, unless I specifically set the video codec to h264 (-c:v libx264),
this brings new problems with it, creating a lot of "Past duration
0.xxxxxxxx too large" errors or just flatout crashing. I understand if I now
need to go and look for answers from the pwomxplayer side of things, but the
Pi does actually pick up the output with this command, so just need to make
sure that ffmpeg can handle the transcoding I guess!

C:\Users\admin\Desktop>ffmpeg -re -i
rtmp://1.20006911.fme.ustream.tv/ustreamVideo/20006911/9gjxU2DxvaUJDQZ9Yc6eG
weKwV6Y2E7a -bsf:v h264_mp4
toannexb -an -c:v h264 -f avi udp://239.0.1.23:1234
ffmpeg version N-69920-g8bc8001 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --
enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --ena
ble-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjp
eg --enable-libopus --enable-librtmp --enable-libschroedinger
--enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
--en
able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp
--enab
le-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma
--enable-decklink --enable-zlib
  libavutil      54. 18.100 / 54. 18.100
  libavcodec     56. 22.100 / 56. 22.100
  libavformat    56. 22.100 / 56. 22.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.100 /  5. 11.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, flv, from
'rtmp://1.20006911.fme.ustream.tv/ustreamVideo/20006911/9gjxU2DxvaUJDQZ9Yc6e
GweKwV6Y2E7a':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (Baseline), yuvj420p(pc, bt709), 800x450 [SAR
1:1 DAR 16:9], 30 tbr, 1k tbn, 2k tbc
No pixel format specified, yuvj420p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0000000004aeb840] using SAR=1/1
[libx264 @ 0000000004aeb840] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX
[libx264 @ 0000000004aeb840] profile High, level 3.1
Output #0, avi, to 'udp://239.0.1.23:1234':
  Metadata:
    ISFT            : Lavf56.22.100
    Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuvj420p(pc),
800x450 [SAR 1:1 DAR 16:9], q=-1--1, 30 fps, 30 tbn, 30 tbc
    Metadata:
      encoder         : Lavc56.22.100 libx264
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame=  737 fps= 17 q=-1.0 Lsize=     372kB time=00:00:24.76 bitrate=
123.1kbits/s
video:365kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 2.078668%
[libx264 @ 0000000004aeb840] frame I:3     Avg QP:15.54  size: 22932
[libx264 @ 0000000004aeb840] frame P:185   Avg QP:18.08  size:  1372
[libx264 @ 0000000004aeb840] frame B:549   Avg QP:26.81  size:    92
[libx264 @ 0000000004aeb840] consecutive B-frames:  0.7%  0.0%  0.0% 99.3%
[libx264 @ 0000000004aeb840] mb I  I16..4: 19.1% 44.6% 36.3%
[libx264 @ 0000000004aeb840] mb P  I16..4:  1.0%  1.2%  0.5%  P16..4: 10.7%
3.2%  1.8%  0.0%  0.0%    skip:81.6%
[libx264 @ 0000000004aeb840] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  5.2%
0.0%  0.0%  direct: 0.0%  skip:94.8%  L0:28.9% L1:70.8% BI: 0.4
%
[libx264 @ 0000000004aeb840] 8x8 transform intra:43.7% inter:60.8%
[libx264 @ 0000000004aeb840] coded y,uvDC,uvAC intra: 49.2% 27.5% 6.8%
inter: 1.3% 1.4% 0.0%
[libx264 @ 0000000004aeb840] i16 v,h,dc,p:  7% 19%  7% 66%
[libx264 @ 0000000004aeb840] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 30% 26%  3%
2%  3%  4%  3%  5%
[libx264 @ 0000000004aeb840] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 34% 26% 20%  4%
3%  3%  3%  3%  3%
[libx264 @ 0000000004aeb840] i8c dc,h,v,p: 48% 30% 20%  1%
[libx264 @ 0000000004aeb840] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0000000004aeb840] ref P L0: 84.4%  4.7%  9.5%  1.4%
[libx264 @ 0000000004aeb840] ref B L0: 66.8% 32.2%  1.0%
[libx264 @ 0000000004aeb840] ref B L1: 93.3%  6.7%
[libx264 @ 0000000004aeb840] kb/s:120.26





More information about the ffmpeg-user mailing list