[FFmpeg-user] Problem with rtsp streaming using ffmpeg

Wiesmeyr Christoph Christoph.Wiesmeyr at ait.ac.at
Wed Apr 27 12:48:25 CEST 2016


> -----Ursprüngliche Nachricht-----
> Von: ffmpeg-user [mailto:ffmpeg-user-bounces at ffmpeg.org] Im Auftrag
> von Carl Eugen Hoyos
> Gesendet: Dienstag, 26. April 2016 14:09
> An: ffmpeg-user at ffmpeg.org
> Betreff: Re: [FFmpeg-user] Problem with rtsp streaming using ffmpeg
> 
> Wiesmeyr Christoph <Christoph.Wiesmeyr <at> ait.ac.at> writes:
> 
> > ffmpeg version N-73361-g03b2b40 Copyright (c) 2000-2015
> 
> This is old and unsupported, please test current FFmpeg git head.
> Please also show the command line and console output for the encoding of
> the rtsp stream.

I did download the latest available builds from ffmpeg now. Here is the full
output of the sending ffmpeg instance:

PS C:\Users > ffmpeg -re -f concat -i .\list.txt -vcodec libx264 -ar 48000 -acodec pcm_s16le -f rtsp rtsp://live:1234@172.25.54.1:1935/live/myStream.sdp
ffmpeg version N-79630-g9ac154d Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfi
g --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmfx --enable-libmp3l
ame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enabl
e-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-
libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx
264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 22.101 / 55. 22.101
  libavcodec     57. 38.100 / 57. 38.100
  libavformat    57. 34.103 / 57. 34.103
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 44.100 /  6. 44.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000000389fa0] Auto-inserting h264_mp4toannexb bitstream filter
Input #0, concat, from '.\list.txt':
  Duration: N/A, start: 0.000000, bitrate: 548 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 560x320, 465 kb/s, 30
fps, 30 tbr, 90k tbn
    Metadata:
      creation_time   : 2010-03-20 21:29:11
      encoder         : JVT/AVC Coding
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 83 kb/s
    Metadata:
      creation_time   : 2010-03-20 21:29:11
[libx264 @ 0000000002b64980] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0000000002b64980] profile High, level 3.0
[libx264 @ 0000000002b64980] 264 - core 148 r2694 3b70645 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.vid
eolan.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=6 lookah
ead_threads=1 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_lookahe
ad=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
[rtsp @ 0000000002d136e0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar i
nstead.
    Last message repeated 1 times
Output #0, rtsp, to 'rtsp://live:1234@172.25.54.1:1935/live/myStream.sdp':
  Metadata:
    encoder         : Lavf57.34.103
    Stream #0:0(und): Video: h264, yuv420p, 560x320, q=2-31, 30 fps, 90k tbn
    Metadata:
      creation_time   : 2010-03-20 21:29:11
      encoder         : Lavc57.38.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1(eng): Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
    Metadata:
      creation_time   : 2010-03-20 21:29:11
      encoder         : Lavc57.38.100 pcm_s16le
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000038a980] Auto-inserting h264_mp4toannexb bitstream filter
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000038a980] Auto-inserting h264_mp4toannexb bitstream filter
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000038a980] Auto-inserting h264_mp4toannexb bitstream filter
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000038a980] Auto-inserting h264_mp4toannexb bitstream filter
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000038a980] Auto-inserting h264_mp4toannexb bitstream filter
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000a0f4480] Auto-inserting h264_mp4toannexb bitstream filter
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000a0f4480] Auto-inserting h264_mp4toannexb bitstream filter
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000a0f4480] Auto-inserting h264_mp4toannexb bitstream filter
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000a0f4480] Auto-inserting h264_mp4toannexb bitstream filter
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000a0f4480] Auto-inserting h264_mp4toannexb bitstream filter
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000a0f4480] Auto-inserting h264_mp4toannexb bitstream filter
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000a0f4480] Auto-inserting h264_mp4toannexb bitstream filter
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000a0f4480] Auto-inserting h264_mp4toannexb bitstream filter
[mov,mp4,m4a,3gp,3g2,mj2 @ 000000000a0f4480] Auto-inserting h264_mp4toannexb bitstream filter
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000002b58800] Auto-inserting h264_mp4toannexb bitstream filter
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000000002b58800] Auto-inserting h264_mp4toannexb bitstream filter
frame= 2805 fps= 30 q=-1.0 Lsize=N/A time=00:01:33.56 bitrate=N/A dup=17 drop=0 speed=   1x
video:2458kB audio:8738kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[libx264 @ 0000000002b64980] frame I:12    Avg QP:19.51  size: 18837
[libx264 @ 0000000002b64980] frame P:824   Avg QP:21.55  size:  1984
[libx264 @ 0000000002b64980] frame B:1969  Avg QP:25.94  size:   333
[libx264 @ 0000000002b64980] consecutive B-frames:  3.1%  8.1%  5.7% 83.1%
[libx264 @ 0000000002b64980] mb I  I16..4: 46.1% 25.0% 28.9%
[libx264 @ 0000000002b64980] mb P  I16..4:  1.7%  0.4%  0.2%  P16..4: 41.4%  8.2%  5.8%  0.0%  0.0%    skip:42.3%
[libx264 @ 0000000002b64980] mb B  I16..4:  0.1%  0.1%  0.0%  B16..8: 22.8%  1.6%  0.3%  direct: 0.5%  skip:74.6%  L0:44
.9% L1:52.1% BI: 3.0%
[libx264 @ 0000000002b64980] 8x8 transform intra:23.1% inter:55.0%
[libx264 @ 0000000002b64980] coded y,uvDC,uvAC intra: 29.8% 70.1% 32.8% inter: 3.4% 10.9% 1.9%
[libx264 @ 0000000002b64980] i16 v,h,dc,p:  0% 27%  1% 71%
[libx264 @ 0000000002b64980] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  8% 36% 14%  4%  6%  4% 17%  4%  8%
[libx264 @ 0000000002b64980] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 29% 12%  5%  8%  7% 13%  4%  8%
[libx264 @ 0000000002b64980] i8c dc,h,v,p: 47% 38%  8%  7%
[libx264 @ 0000000002b64980] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0000000002b64980] ref P L0: 62.7%  4.1% 21.7% 11.6%
[libx264 @ 0000000002b64980] ref B L0: 83.0% 12.9%  4.0%
[libx264 @ 0000000002b64980] ref B L1: 94.4%  5.6%
[libx264 @ 0000000002b64980] kb/s:215.28


This is the full output of the receiving instance:

PS C:\Users > ffmpeg -i rtsp://172.25.54.1:1935/live/myStream.sdp -acodec copy -vcodec copy test.avi
ffmpeg version N-79630-g9ac154d Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfi
g --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmfx --enable-libmp3l
ame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enabl
e-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-
libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx
264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 22.101 / 55. 22.101
  libavcodec     57. 38.100 / 57. 38.100
  libavformat    57. 34.103 / 57. 34.103
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 44.100 /  6. 44.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, rtsp, from 'rtsp://172.25.54.1:1935/live/myStream.sdp':
  Metadata:
    title           : myStream.sdp
  Duration: N/A, start: 7.167000, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p, 560x320, 30 fps, 30 tbr, 90k tbn
[avi @ 0000000003173580] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar in
stead.
Output #0, avi, to 'test.avi':
  Metadata:
    INAM            : myStream.sdp
    ISFT            : Lavf57.34.103
    Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 560x320, q=2-31, 30 fps, 30 tbr, 120 tbn
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[avi @ 0000000003173580] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the
future. Fix your code to set the timestamps properly
[avi @ 0000000003173580] Non-monotonous DTS in output stream 0:0; previous: -8, current: -12; changing to -7. This may r
esult in incorrect timestamps in the output file.
[avi @ 0000000003173580] Non-monotonous DTS in output stream 0:0; previous: -7, current: -8; changing to -6. This may re
sult in incorrect timestamps in the output file.
frame= 1524 fps= 26 q=-1.0 Lsize=    1506kB time=00:00:50.57 bitrate= 244.0kbits/s speed=0.854x
video:1357kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 10.983418%
> 
> And please understand that not react to an answer you get here but claiming
> you get no answer does not make much sense;-)

Sorry, there was a misunderstanding. I did of course see the answer but I
was not sure how to reply to it so I started a new thread. To indicate that
the new thread is connected an older one I put the links to your answer.


Thanks and best regards, Christoph
> 
> Carl Eugen
> 
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user


More information about the ffmpeg-user mailing list