[FFmpeg-user] FFmpeg RTSP crash

Yu Ang Tan yuang86 at gmail.com
Tue Sep 13 08:27:05 EEST 2016


I am trying to rtsp stream between two consoles on my computer.

On console 1 I have:

    ffmpeg -rtbufsize 100M -re -f dshow -s 320x240 -i video="BisonCam, NB
Pro" -r 10 -an -f rtsp -rtsp_transport tcp rtsp://127.0.0.1:8554/demo

On console 2 I have:

    ffplay -rtsp_flags listen -i rtsp://127.0.0.1:8554/demo

When I run execute both commands, my webcam LED lights up. But then
immediately after ffmpeg crashes. Has anyone encountered the same thing? I
could really use some help here.


This is the ffmpeg configuration on my Windows 10 machine:

    ffmpeg version N-81391-g2a3720b Copyright (c) 2000-2016 the FFmpeg
developers
      built with gcc 5.4.0 (GCC)
      configuration: --disable-static --enable-shared --enable-gpl
--enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx
--enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128
--enable-fontconfig --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-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-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-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg
--enable-lzma --enable-decklink --enable-zlib
      libavutil      55. 29.100 / 55. 29.100
      libavcodec     57. 54.100 / 57. 54.100
      libavformat    57. 47.101 / 57. 47.101
      libavdevice    57.  0.102 / 57.  0.102
      libavfilter     6. 52.100 /  6. 52.100
      libswscale      4.  1.100 /  4.  1.100
      libswresample   2.  1.100 /  2.  1.100
      libpostproc    54.  0.100 / 54.  0.100
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile
options] outfile}...

    Use -h to get full help or, even better, run 'man ffmpeg'


I tried to stream from a video file, just to be sure that the issue is not
related to the webcam.

    #Console 1
ffmpeg -i out.mp4 -f rtsp -rtsp_transport tcp rtsp://localhost:8888/live.sdp

#Console 2
ffplay -rtsp_flags listen rtsp://localhost:8888/live.sdp?tcp

The output for both consoles are as follows:

Console 1:

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        encoder         : Lavf57.47.101
      Duration: 00:01:02.57, start: 0.000000, bitrate: 172 kb/s
        Stream #0:0(und): Video: h264 (High 4:2:2) (avc1 / 0x31637661),
yuv422p, 320x240, 169 kb/s, 30 fps, 30 tbr, 10000k tbn, 60 tbc (default)
        Metadata:
          handler_name    : VideoHandler
    [rtsp @ 00000000024c1700] Using AVStream.codec to pass codec parameters
to muxers is deprecated, use AVStream.codecpar instead.
    Output #0, rtsp, to 'rtsp://localhost:8888/live.sdp':
      Metadata:
        major_brand     : isom
        minor_version   : 512
        compatible_brands: isomiso2avc1mp41
        encoder         : Lavf57.47.101
        Stream #0:0(und): Video: mpeg4, yuv420p, 320x240, q=2-31, 200 kb/s,
30 fps, 90k tbn, 30 tbc (default)
        Metadata:
          handler_name    : VideoHandler
          encoder         : Lavc57.54.100 mpeg4
        Side data:
          cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    Stream mapping:
      Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
    Press [q] to stop, [?] for help

Console 2:
    [rtsp @ 00000000001ccde0] WARNING: Path /live.sdp differs from expected
/live.sdp?tcp
        Last message repeated 1 times
    [rtsp @ 00000000001ccde0] Updating control URI to
rtsp://localhost:8888/live.sdp
    [rtsp @ 00000000001ccde0] Could not find codec parameters for stream 0
(Video: mpeg4 (Simple Profile), none, 320x240 [SAR 1:1 DAR 4:3]):
unspecified pixel format
    Consider increasing the value for the 'analyzeduration' and 'probesize'
options
    Input #0, rtsp, from 'rtsp://localhost:8888/live.sdp?tcp':
      Metadata:
        title           : No Name
      Duration: N/A, bitrate: N/A
        Stream #0:0: Video: mpeg4 (Simple Profile), none, 320x240 [SAR 1:1
DAR 4:3], 30 tbr, 90k tbn, 30 tbc
        nan M-V:    nan fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0

The same crash happened with ffmpeg.exe, and ffplay continued waiting for
data. I tried the same commands on a Linux virtual machine, and it worked
fine.

Any ideas?


More information about the ffmpeg-user mailing list