[FFmpeg-user] rtmp restream gets stuck

Remo Rayamajhi kshatriya.remo at gmail.com
Thu Jan 11 15:22:55 EET 2018


yes ... while i played on vlc player thestreams works fine .

On Jan 11, 2018 5:35 PM, "José María Infanzón" <jocheinfa at gmail.com> wrote:

> Is the input stream stable? If you use for example vlc player to stream the
> input stream, will it work continuously?
>
> El 11 ene. 2018 8:05 AM, "Remo Rayamajhi" <kshatriya.remo at gmail.com>
> escribió:
>
> >  ffmpeg -i 'rtmp://192.168.2.168:1935/hls/hd-live' -r 25 -vf
> > "yadif,scale=1280x720" -c:v libx264 -b:v 2000k -c:a aac -aspect 16:9
> > -strict experimental -b:a 64000 -ar 44100 -ac 2 -f flv 'rtmp://
> > admin:admin at 192.168.1.100:1935/live/test.stream'
> > ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
> >   built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
> >   configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static
> > --extra-cflags=-I/root/ffmpeg_build/include
> > --extra-ldflags=-L/root/ffmpeg_build/lib --extra-libs='-lpthread -lm'
> > --bindir=/root/bin --enable-gpl --enable-libass --enable-libfdk-aac
> > --enable-libfreetype --enable-libmp3lame --enable-libopus
> > --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264
> > --enable-libx265 --enable-nonfree
> >   libavutil      55. 78.100 / 55. 78.100
> >   libavcodec     57.107.100 / 57.107.100
> >   libavformat    57. 83.100 / 57. 83.100
> >   libavdevice    57. 10.100 / 57. 10.100
> >   libavfilter     6.107.100 /  6.107.100
> >   libswscale      4.  8.100 /  4.  8.100
> >   libswresample   2.  9.100 /  2.  9.100
> >   libpostproc    54.  7.100 / 54.  7.100
> > Input #0, flv, from 'rtmp://192.168.2.168:1935/hls/hd-live':
> >   Metadata:
> >     encoder         : Lavf55.33.100
> >     server          : SRS/2.0.209(ZhouGuowen)
> >     srs_primary     : SRS/1.0release
> >     srs_authors     : winlin,wenjie.zhao
> >     server_version  : 2.0.209
> >   Duration: N/A, start: 0.010000, bitrate: 4128 kb/s
> >     Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
> >     Stream #0:1: Video: h264 (Main), yuvj420p(pc, bt709, progressive),
> > 1280x720, 4000 kb/s, 1k fps, 50 tbr, 1k tbn
> > [rtmp @ 0x3f8e020] Ignoring unsupported var reason
> > Stream mapping:
> >   Stream #0:1 -> #0:0 (h264 (native) -> h264 (libx264))
> >   Stream #0:0 -> #0:1 (aac (native) -> aac (native))
> > Press [q] to stop, [?] for help
> > [libx264 @ 0x3f8eb00] using SAR=1/1
> > [libx264 @ 0x3f8eb00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
> > AVX AVX2 FMA3 LZCNT BMI2
> > [libx264 @ 0x3f8eb00] profile High, level 3.1
> > [libx264 @ 0x3f8eb00] 264 - core 142 r2389 956c8d8 - H.264/MPEG-4 AVC
> codec
> > - Copyleft 2003-2014 - 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=72 lookahead_threads=5
> > 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=250 keyint_min=25 scenecut=40
> > intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=2000 ratetol=1.0
> > qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
> > Output #0, flv, to 'rtmp://admin:admin@192.168.1.
> 100:1935/live/test.stream
> > ':
> >   Metadata:
> >     server_version  : 2.0.209
> >     server          : SRS/2.0.209(ZhouGuowen)
> >     srs_primary     : SRS/1.0release
> >     srs_authors     : winlin,wenjie.zhao
> >     encoder         : Lavf57.83.100
> >     Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007),
> > yuvj420p(pc), 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 2000 kb/s, 25 fps, 1k
> > tbn, 25 tbc
> >     Metadata:
> >       encoder         : Lavc57.107.100 libx264
> >     Side data:
> >       cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 0 vbv_delay: -1
> >     Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz,
> > stereo, fltp, 64 kb/s
> >     Metadata:
> >       encoder         : Lavc57.107.100 aac
> > [flv @ 0x3fbaa20] Failed to update header with correct
> > duration.ate=1825.0kbits/s dup=0 drop=306 speed=1.15x
> > [flv @ 0x3fbaa20] Failed to update header with correct filesize.
> > frame=  312 fps= 25 q=-1.0 Lsize=    4084kB time=00:00:12.95
> > bitrate=2581.4kbits/s dup=0 drop=310 speed=1.03x
> > video:3966kB audio:102kB subtitle:0kB other streams:0kB global
> headers:0kB
> > muxing overhead: 0.391142%
> > [libx264 @ 0x3f8eb00] frame I:5     Avg QP:17.96  size: 35063
> > [libx264 @ 0x3f8eb00] frame P:138   Avg QP:21.18  size: 21744
> > [libx264 @ 0x3f8eb00] frame B:169   Avg QP:24.12  size:  5233
> > [libx264 @ 0x3f8eb00] consecutive B-frames: 16.7% 29.5% 11.5% 42.3%
> > [libx264 @ 0x3f8eb00] mb I  I16..4: 28.9% 52.3% 18.8%
> > [libx264 @ 0x3f8eb00] mb P  I16..4:  6.8% 11.2%  1.6%  P16..4: 29.3%
> 13.8%
> > 5.9%  0.0%  0.0%    skip:31.5%
> > [libx264 @ 0x3f8eb00] mb B  I16..4:  0.1%  0.3%  0.1%  B16..8: 27.3%
> 4.7%
> > 1.1%  direct: 4.1%  skip:62.4%  L0:38.4% L1:48.1% BI:13.5%
> > [libx264 @ 0x3f8eb00] final ratefactor: 21.93
> > [libx264 @ 0x3f8eb00] 8x8 transform intra:56.4% inter:64.2%
> > [libx264 @ 0x3f8eb00] coded y,uvDC,uvAC intra: 39.6% 63.8% 23.7% inter:
> > 15.0% 22.7% 1.4%
> > [libx264 @ 0x3f8eb00] i16 v,h,dc,p: 32% 21%  9% 37%
> > [libx264 @ 0x3f8eb00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 19% 22%  3%  5%
> > 7%  4%  6%  4%
> > [libx264 @ 0x3f8eb00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 23% 12%  4%  7%
> > 7%  5%  6%  4%
> > [libx264 @ 0x3f8eb00] i8c dc,h,v,p: 43% 21% 23% 12%
> > [libx264 @ 0x3f8eb00] Weighted P-Frames: Y:11.6% UV:10.9%
> > [libx264 @ 0x3f8eb00] ref P L0: 69.9% 15.6% 12.3%  2.1%  0.0%
> > [libx264 @ 0x3f8eb00] ref B L0: 94.6%  5.0%  0.5%
> > [libx264 @ 0x3f8eb00] ref B L1: 98.0%  2.0%
> > [libx264 @ 0x3f8eb00] kb/s:2602.81
> > [aac @ 0x3f969c0] Qavg: 231.183
> > Exiting normally, received signal 2.
> >
> >
> > On Thu, Jan 11, 2018 at 4:48 PM, Remo Rayamajhi <
> kshatriya.remo at gmail.com>
> > wrote:
> >
> > > Hello ,
> > >
> > > whenever i try to restream my incominng rtmp using ffmpeg to wowza or
> > > nimble , it will play  for a minute and gets stuck . Please help on it
> > >
> > >
> > > ffmpeg -i 'rtmp://192.168.2.168:1935/hls/hd-live' -r 25 -vf
> > > "yadif,scale=1280x720" -c:v libx264 -b:v 2000k -c:a aac -aspect 16:9
> > > -strict experimental -b:a 64000 -ar 44100 -ac 2 -f flv 'rtmp://
> > > admin:admin at 192.168.1.100:1935/live/test.stream'
> > > ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
> > >   built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
> > >   configuration: --prefix=/root/ffmpeg_build
> --pkg-config-flags=--static
> > > --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/
> > ffmpeg_build/lib
> > > --extra-libs='-lpthread -lm' --bindir=/root/bin --enable-gpl
> > > --enable-libass --enable-libfdk-aac --enable-libfreetype
> > > --enable-libmp3lame --enable-libopus --enable-libtheora
> > --enable-libvorbis
> > > --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
> > >   libavutil      55. 78.100 / 55. 78.100
> > >   libavcodec     57.107.100 / 57.107.100
> > >   libavformat    57. 83.100 / 57. 83.100
> > >   libavdevice    57. 10.100 / 57. 10.100
> > >   libavfilter     6.107.100 /  6.107.100
> > >   libswscale      4.  8.100 /  4.  8.100
> > >   libswresample   2.  9.100 /  2.  9.100
> > >   libpostproc    54.  7.100 / 54.  7.100
> > > Input #0, flv, from 'rtmp://192.168.2.168:1935/hls/hd-live':
> > >   Metadata:
> > >     encoder         : Lavf55.33.100
> > >     server          : SRS/2.0.209(ZhouGuowen)
> > >     srs_primary     : SRS/1.0release
> > >     srs_authors     : winlin,wenjie.zhao
> > >     server_version  : 2.0.209
> > >   Duration: N/A, start: 0.010000, bitrate: 4128 kb/s
> > >     Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
> > >     Stream #0:1: Video: h264 (Main), yuvj420p(pc, bt709, progressive),
> > > 1280x720, 4000 kb/s, 1k fps, 50 tbr, 1k tbn
> > > [rtmp @ 0x3f8e020] Ignoring unsupported var reason
> > > Stream mapping:
> > >   Stream #0:1 -> #0:0 (h264 (native) -> h264 (libx264))
> > >   Stream #0:0 -> #0:1 (aac (native) -> aac (native))
> > > Press [q] to stop, [?] for help
> > > [libx264 @ 0x3f8eb00] using SAR=1/1
> > > [libx264 @ 0x3f8eb00] using cpu capabilities: MMX2 SSE2Fast SSSE3
> SSE4.2
> > > AVX AVX2 FMA3 LZCNT BMI2
> > > [libx264 @ 0x3f8eb00] profile High, level 3.1
> > > [libx264 @ 0x3f8eb00] 264 - core 142 r2389 956c8d8 - H.264/MPEG-4 AVC
> > > codec - Copyleft 2003-2014 - 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=72
> > > lookahead_threads=5 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=250
> keyint_min=25
> > > scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1
> bitrate=2000
> > > ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40
> aq=1:1.00
> > > Output #0, flv, to 'rtmp://admin:netaccess@103.
> > > 213.31.44:1935/nettv/net11500.stream':
> > >   Metadata:
> > >     server_version  : 2.0.209
> > >     server          : SRS/2.0.209(ZhouGuowen)
> > >     srs_primary     : SRS/1.0release
> > >     srs_authors     : winlin,wenjie.zhao
> > >     encoder         : Lavf57.83.100
> > >     Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007),
> > > yuvj420p(pc), 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 2000 kb/s, 25 fps,
> 1k
> > > tbn, 25 tbc
> > >     Metadata:
> > >       encoder         : Lavc57.107.100 libx264
> > >     Side data:
> > >       cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 0 vbv_delay:
> -1
> > >     Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz,
> > > stereo, fltp, 64 kb/s
> > >     Metadata:
> > >       encoder         : Lavc57.107.100 aac
> > > [flv @ 0x3fbaa20] Failed to update header with correct
> > > duration.ate=1825.0kbits/s dup=0 drop=306 speed=1.15x
> > > [flv @ 0x3fbaa20] Failed to update header with correct filesize.
> > > frame=  312 fps= 25 q=-1.0 Lsize=    4084kB time=00:00:12.95
> > > bitrate=2581.4kbits/s dup=0 drop=310 speed=1.03x
> > > video:3966kB audio:102kB subtitle:0kB other streams:0kB global
> > headers:0kB
> > > muxing overhead: 0.391142%
> > > [libx264 @ 0x3f8eb00] frame I:5     Avg QP:17.96  size: 35063
> > > [libx264 @ 0x3f8eb00] frame P:138   Avg QP:21.18  size: 21744
> > > [libx264 @ 0x3f8eb00] frame B:169   Avg QP:24.12  size:  5233
> > > [libx264 @ 0x3f8eb00] consecutive B-frames: 16.7% 29.5% 11.5% 42.3%
> > > [libx264 @ 0x3f8eb00] mb I  I16..4: 28.9% 52.3% 18.8%
> > > [libx264 @ 0x3f8eb00] mb P  I16..4:  6.8% 11.2%  1.6%  P16..4: 29.3%
> > > 13.8%  5.9%  0.0%  0.0%    skip:31.5%
> > > [libx264 @ 0x3f8eb00] mb B  I16..4:  0.1%  0.3%  0.1%  B16..8: 27.3%
> > > 4.7%  1.1%  direct: 4.1%  skip:62.4%  L0:38.4% L1:48.1% BI:13.5%
> > > [libx264 @ 0x3f8eb00] final ratefactor: 21.93
> > > [libx264 @ 0x3f8eb00] 8x8 transform intra:56.4% inter:64.2%
> > > [libx264 @ 0x3f8eb00] coded y,uvDC,uvAC intra: 39.6% 63.8% 23.7% inter:
> > > 15.0% 22.7% 1.4%
> > > [libx264 @ 0x3f8eb00] i16 v,h,dc,p: 32% 21%  9% 37%
> > > [libx264 @ 0x3f8eb00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 19% 22%  3%
> 5%
> > > 7%  4%  6%  4%
> > > [libx264 @ 0x3f8eb00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 23% 12%  4%
> 7%
> > > 7%  5%  6%  4%
> > > [libx264 @ 0x3f8eb00] i8c dc,h,v,p: 43% 21% 23% 12%
> > > [libx264 @ 0x3f8eb00] Weighted P-Frames: Y:11.6% UV:10.9%
> > > [libx264 @ 0x3f8eb00] ref P L0: 69.9% 15.6% 12.3%  2.1%  0.0%
> > > [libx264 @ 0x3f8eb00] ref B L0: 94.6%  5.0%  0.5%
> > > [libx264 @ 0x3f8eb00] ref B L1: 98.0%  2.0%
> > > [libx264 @ 0x3f8eb00] kb/s:2602.81
> > > [aac @ 0x3f969c0] Qavg: 231.183
> > > Exiting normally, received signal 2.
> > >
> > _______________________________________________
> > ffmpeg-user mailing list
> > ffmpeg-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list