[FFmpeg-user] sporadic rtmp live stream crashes
DopeLabs
dopelabs at dubstep.fm
Tue Apr 1 00:50:38 CEST 2014
im not entirely sure then..
im not sure how you have things setup but you can always just do the transcode and send it right back to wowza in a native format such as flv... this way you have wowza doing all the fun stuff...
but just off the top of my head...
ffmpeg -i rtmp://wowza/private/stream -c:a libfdk_aac -c:v h264 -g 50 -f flv rtmp://wowza/live/stream
then you can just use the native wowza HLS url
http://wowza:1935/live/stream/playlist.m3u8
on first run i noticed lots of dropped frames so i removed -r 25 so ffmpeg will use the input framerate.
i tested this against a flv h264 aac stream on my own wowza setup (as i really dont know much about spark/speex).... so im not 'entirely' sure the you will have the same results.. but this might help =]
here is my command output
$ ffmpeg -i rtmp://wowza/private/stream -c:a libfdk_aac -c:v h264 -g 50 -f flv rtmp://wowza/live/stream
ffmpeg version N-61744-g0dd4eff Copyright (c) 2000-2014 the FFmpeg developers
built on Mar 23 2014 19:59:06 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9)
configuration: --prefix=/usr/local --bindir=/usr/local/bin --datadir=/usr/local/share/ffmpeg --docdir=/usr/local/share/doc/ffmpeg --libdir=/usr/local/lib --shlibdir=/usr/local/lib --incdir=/usr/local/include --mandir=/usr/local/share/man --enable-version3 --enable-x11grab --enable-opengl --enable-opencl --enable-openal --enable-libxvid --enable-libx264 --enable-libwavpack --enable-libvpx --enable-libvorbis --enable-libvo-aacenc --enable-libtheora --enable-libssh --enable-librtmp --enable-libopenjpeg --enable-libmp3lame --enable-libfdk-aac --enable-libfaac --enable-libass --enable-vda --enable-avresample --enable-nonfree --enable-gpl
libavutil 52. 67.100 / 52. 67.100
libavcodec 55. 52.103 / 55. 52.103
libavformat 55. 34.101 / 55. 34.101
libavdevice 55. 11.100 / 55. 11.100
libavfilter 4. 3.100 / 4. 3.100
libavresample 1. 2. 0 / 1. 2. 0
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Metadata:
duration 0.00
width 1280.00
height 720.00
videodatarate 3023.44
framerate 34.45
videocodecid 7.00
audiodatarate 187.50
audiosamplerate 44100.00
audiosamplesize 16.00
stereo TRUE
audiocodecid 10.00
encoder Lavf55.25.100
filesize 0.00
Input #0, flv, from 'rtmp://wowza/private/stream':
Metadata:
StreamTitle : ARCHIVE
encoder : Lavf55.25.100
Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 3096 kb/s, 34.50 fps, 34.42 tbr, 1k tbn, 68.91 tbc
Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp, 192 kb/s
[libx264 @ 0x20571a0] using SAR=1/1
[libx264 @ 0x20571a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 0x20571a0] profile High, level 3.2
[libx264 @ 0x20571a0] 264 - core 123 r2189 35cf912 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=50 keyint_min=5 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, flv, to 'rtmp://wowza/live/stream':
Metadata:
StreamTitle : ARCHIVE
encoder : Lavf55.34.101
Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 1k tbn, 34.42 tbc
Stream #0:1: Audio: aac (libfdk_aac) ([10][0][0][0] / 0x000A), 44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (aac -> libfdk_aac)
Press [q] to stop, [?] for help
[flv @ 0x20567c0] Failed to update header with correct duration.ate=1703.4kbits/s
[flv @ 0x20567c0] Failed to update header with correct filesize.
frame= 316 fps=106 q=-1.0 Lsize= 2515kB time=00:00:09.38 bitrate=2196.0kbits/s
video:2353kB audio:148kB subtitle:0 data:0 global headers:0kB muxing overhead 0.535417%
[libx264 @ 0x20571a0] frame I:11 Avg QP:22.45 size: 9607
[libx264 @ 0x20571a0] frame P:305 Avg QP:30.15 size: 7552
[libx264 @ 0x20571a0] mb I I16..4: 73.3% 17.5% 9.1%
[libx264 @ 0x20571a0] mb P I16..4: 16.5% 0.8% 9.1% P16..4: 1.6% 0.3% 0.1% 0.0% 0.0% skip:71.6%
[libx264 @ 0x20571a0] 8x8 transform intra:4.6% inter:9.3%
[libx264 @ 0x20571a0] coded y,uvDC,uvAC intra: 31.0% 0.0% 0.0% inter: 0.9% 0.0% 0.0%
[libx264 @ 0x20571a0] i16 v,h,dc,p: 77% 16% 4% 2%
[libx264 @ 0x20571a0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 57% 7% 34% 1% 0% 0% 0% 0% 1%
[libx264 @ 0x20571a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 73% 9% 14% 1% 0% 1% 0% 1% 0%
[libx264 @ 0x20571a0] i8c dc,h,v,p: 100% 0% 0% 0%
[libx264 @ 0x20571a0] Weighted P-Frames: Y:0.7% UV:0.0%
[libx264 @ 0x20571a0] ref P L0: 53.4% 9.1% 24.1% 13.2% 0.2%
[libx264 @ 0x20571a0] kb/s:2099.07
More information about the ffmpeg-user
mailing list