[FFmpeg-user] ffserser RTSP configuration

Shalki Khajone shalki.khajone at gmail.com
Thu Jun 8 16:18:04 EEST 2017


​​Hello,



What are the options for RTSPOption in the ffserver configuration file ?

I am trying to stream my webcam video as a live RTSP stream. In my current
configuration, all [DESCRIBE] requests fail and server returns 404 Not
found.
​ What am I doing wrong ? ​



*Ffserver.conf:*



*​HTTPPort 9090*
*RTSPPort 5554*


*HTTPBindAddress 192.168.1.10*

*RTSPBindAddress 192.168.1.10*


*MaxHTTPConnections 2000*

*MaxClients 1000*

*MaxBandwidth 10000*
*​​*
*CustomLog /var/log/ffserver.log*

*#NoDefaults*


*##################################################################*

*# Definition of the live feeds. Each live feed contains one video*

*# and/or audio sequence coming from an ffmpeg encoder or another*

*# ffserver. This sequence may be encoded simultaneously with several*

*# codecs at several resolutions.*


*<Feed feed1.ffm>*


* File /tmp/feed1.ffm*

* FileMaxSize 500M*

*</Feed>*


*##################################################################*

*# RTSP examples*


*<Stream rtspfeed.h264> *

* Feed feed1.ffm*

* Format rtsp*

* RTSPOption rtsp_transport tcp*

* RTSPOption rtsp_flags listen*

* VideoCodec libx264*

* VideoFrameRate 30*

* VideoBitRate 800 *

* VideoSize 400x300*

* AVOptionVideo libx264:crf 30*

* AVOptionVideo libx264:preset fast*

* AVOptionVideo libx264:me_range 16*

* AVOptionVideo libx264:qdiff 4*

* AVOptionVideo libx264:qmin 10*

* AVOptionVideo libx264:qmax 51*

* AVOptionVideo libx264:flags +global_header*




*​    ​*
*NoAudio*

* StartSendonKey*

* PreRoll 1*

*</Stream>*



*##################################################################*

*# Special streams*


*# Server status*


*<Stream stat.html>*

*Format status*


*# Only allow local people to get the status*

*ACL allow localhost*

*ACL allow 192.168.0.0 192.168.255.255*


*#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
<http://pond1.gladstonefamily.net:8080/favicon.ico>*

*</Stream>*



*# Redirect index.html to the appropriate site*


*<Redirect index.html>*

*URL http://www.ffmpeg.org/ <http://www.ffmpeg.org/>*

*</Redirect>*


*​*




*FFSERVER Log:*



*​Thu Jun  8 14:53:26 2017 Codec bitrates do not match for stream 0*

*Thu Jun  8 14:53:26 2017 [ffm @ 0x55164180]Using AVStream.codec to pass
codec parameters to muxers is deprecated, use AVStream.codecpar instead.*

*Thu Jun  8 14:53:26 2017 FFserver started.*

*Thu Jun  8 14:53:40 2017 FFserver started.*

*Thu Jun  8 14:53:48 2017 [ffm @ 0x5609a870]Using AVStream.codec to pass
codec parameters to muxers is deprecated, use AVStream.codecpar instead.*

*Thu Jun  8 14:53:48 2017 192.168.1.10 - - [GET] "/feed1.ffm HTTP/1.1" 200
4175*

*Thu Jun  8 14:54:20 2017 192.168.1.10 - - [DESCRIBE]
"rtsp://192.168.1.10:5554/rtspfeed.h264
<http://192.168.1.10:5554/rtspfeed.h264> RTSP/1.0" 200 157*

*Thu Jun  8 14:55:09 2017 192.168.1.10 - - [DESCRIBE]
"rtsp://192.168.1.10:5554/rtspfeed.h264
<http://192.168.1.10:5554/rtspfeed.h264> RTSP/1.0" 200 157*
*​*








*FFMPEG Terminal:*



*​pi37 at pi37:~$ sudo ./start-video-streaming.sh *
*[sudo] password for pi37: *

*ffmpeg version 3.2-2+rpi1~xenial1.7 Copyright (c) 2000-2016 the FFmpeg
developers*

*  built with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 20160609*

*  configuration: --prefix=/usr --extra-version='2+rpi1~xenial1.7'
--toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf
--incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping
--enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
--enable-libcdio --enable-libebur128 --enable-libflite
--enable-libfontconfig --enable-libfreetype --enable-libfribidi
--enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame
--enable-libopenjpeg --enable-libopus --enable-libpulse
--enable-librubberband --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora
--enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq
--enable-libzvbi --enable-openal --enable-opengl --enable-sdl2
--enable-x11grab --arch=arm --disable-armv5te --disable-neon
--enable-hardcoded-tables --enable-mmal --enable-omx-rpi
--disable-decoder=mpeg_xvmc --disable-vaapi --disable-vdpau
--disable-runtime-cpudetect --disable-debug
--extra-cflags='-mno-apcs-stack-check -mstructure-size-boundary=32
-mno-sched-prolog' --enable-libdc1394 --enable-libiec61883
--enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264
--enable-shared*

*  libavutil      55. 34.100 / 55. 34.100*

*  libavcodec     57. 64.100 / 57. 64.100*

*  libavformat    57. 56.100 / 57. 56.100*

*  libavdevice    57.  1.100 / 57.  1.100*

*  libavfilter     6. 65.100 /  6. 65.100*

*  libavresample   3.  1.  0 /  3.  1.  0*

*  libswscale      4.  2.100 /  4.  2.100*

*  libswresample   2.  3.100 /  2.  3.100*

*  libpostproc    54.  1.100 / 54.  1.100*

*[video4linux2,v4l2 @ 0x55a6e870] The V4L2 driver changed the video from
400x300 to 352x288*

*Input #0, video4linux2,v4l2, from '/dev/video0':*

*  Duration: N/A, start: 20990.889092, bitrate: 40550 kb/s*

*    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 352x288,
40550 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc*

*No pixel format specified, yuv422p for H.264 encoding chosen.*

*Use -pix_fmt yuv420p for compatibility with outdated media players.*

*[libx264 @ 0x55a76c40] using cpu capabilities: ARMv6 NEON*

*[libx264 @ 0x55a76c40] profile High 4:2:2, level 2.1, 4:2:2 8-bit*

*[libx264 @ 0x55a76c40] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html
<http://www.videolan.org/x264.html> - options: cabac=1 ref=2 deblock=1:0:0
analyse=0x3:0x113 me=hex subme=6 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 lookahead_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=1 keyint=250 keyint_min=25 scenecut=40
intra_refresh=0 rc_lookahead=30 rc=crf mbtree=1 crf=30.0 qcomp=0.60
qpmin=10 qpmax=51 qpstep=4 vbv_maxrate=1600 vbv_bufsize=1600 crf_max=0.0
nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00*

*Output #0, ffm, to 'http://192.168.1.10:9090/feed1.ffm
<http://192.168.1.10:9090/feed1.ffm>':*

*  Metadata:*

*    creation_time   : now*

*    encoder         : Lavf57.56.100*

*    Stream #0:0: Video: h264 (libx264), yuv422p, 400x300, q=10-51, 800
kb/s, 25 fps, 1000k tbn, 30 tbc*

*    Metadata:*

*      encoder         : Lavc57.64.100 libx264*

*    Side data:*

*      cpb: bitrate max/min/avg: 1600000/0/800000 buffer size: 1600000
vbv_delay: -1*

*Stream mapping:*

*  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))*

*Press [q] to stop, [?] for help*

*frame=   17 fps=0.0 q=0.0 size=       4kB time=00:00:00.00 bitrate=N/A
dup=frame=   32 fps= 31 q=0.0 size=       4kB time=00:00:00.00 bitrate=N/A
dup=frame=   48 fps= 32 q=36.0 size=       8kB time=00:00:00.16 bitrate=
393.2kframe=   62 fps= 31 q=36.0 size=       8kB time=00:00:00.63 bitrate=
103.5kframe=   78 fps= 31 q=36.0 size=      12kB time=00:00:01.16 bitrate=
 84.3kframe=   92 fps= 30 q=36.0 size=      12kB time=00:00:01.63 bitrate=
 60.2kframe=  108 fps= 30 q=36.0 size=      12kB time=00:00:02.16 bitrate=
 45.4kframe=  123 fps= 30 q=36.0 size=      16kB time=00:00:02.66 bitrate=
 49.2kframe=  138 fps= 30 q=36.0 size=      16kB time=00:00:03.16 bitrate=
 41.4kframe=  153 fps= 30 q=36.0 size=      20kB time=00:00:03.66 bitrate=
 44.7kframe=  168 fps= 30 q=36.0 size=      20kB time=00:00:04.16 bitrate=
 39.3kframe=  183 fps= 30 q=36.0 size=      24kB time=00:00:04.66 bitrate=
 42.1kframe=  198 fps= 30 q=36.0 size=      28kB time=00:00:05.16 bitrate=
 44.4kframe=  212 fps= 30 q=36.0 size=      28kB time=00:00:05.63 bitrate=
 40.7kframe=  228 fps= 30 q=36.0 size=      32kB time=00:00:06.16 bitrate=
 42.5kframe=  243 fps= 30 q=36.0 size=      32kB time=00:00:06.66 bitrate=
 39.3kframe=  258 fps= 30 q=36.0 size=      36kB time=00:00:07.16 bitrate=
 41.2kframe=  273 fps= 30 q=36.0 size=      36kB time=00:00:07.66 bitrate=
 38.5kframe=  288 fps= 30 q=36.0 size=      36kB time=00:00:08.16 bitrate=
 36.1kframe=  303 fps= 30 q=36.0 size=      44kB time=00:00:08.66 bitrate=
 41.6kframe=  318 fps= 30 q=36.0 size=      48kB time=00:00:09.16 bitrate=
 42.9kframe=  333 fps= 30 q=36.0 size=      52kB time=00:00:09.66 bitrate=
 44.1kframe=  349 fps= 30 q=36.0 size=      52kB time=00:00:10.20 bitrate=
 41.8kframe=  363 fps= 30 q=36.0 size=      52kB time=00:00:10.66 bitrate=
 39.9kframe=  379 fps= 30 q=36.0 size=      56kB time=00:00:11.20 bitrate=
 41.0kframe=  395 fps= 30 q=36.0 size=      56kB time=00:00:11.73 bitrate=
 39.1k*

*...............*

*.................*

​​
goes on
​ as long as the ffserver is running​


*​*





*FFPLAY Terminal**:*

*​​*
*pi37 at pi37:~$ sudo ffplay rtsp://192.168.1.10:5554/rtspfeed.h264
<http://192.168.1.10:5554/rtspfeed.h264>*

*ffplay version 3.2-2+rpi1~xenial1.7 Copyright (c) 2003-2016 the FFmpeg
developers*

*  built with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 20160609*

*  configuration: --prefix=/usr --extra-version='2+rpi1~xenial1.7'
--toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf
--incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping
--enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
--enable-libcdio --enable-libebur128 --enable-libflite
--enable-libfontconfig --enable-libfreetype --enable-libfribidi
--enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame
--enable-libopenjpeg --enable-libopus --enable-libpulse
--enable-librubberband --enable-libshine --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora
--enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx265 --enable-libxvid --enable-libzmq
--enable-libzvbi --enable-openal --enable-opengl --enable-sdl2
--enable-x11grab --arch=arm --disable-armv5te --disable-neon
--enable-hardcoded-tables --enable-mmal --enable-omx-rpi
--disable-decoder=mpeg_xvmc --disable-vaapi --disable-vdpau
--disable-runtime-cpudetect --disable-debug
--extra-cflags='-mno-apcs-stack-check -mstructure-size-boundary=32
-mno-sched-prolog' --enable-libdc1394 --enable-libiec61883
--enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264
--enable-shared*

*  libavutil      55. 34.100 / 55. 34.100*

*  libavcodec     57. 64.100 / 57. 64.100*

*  libavformat    57. 56.100 / 57. 56.100*

*  libavdevice    57.  1.100 / 57.  1.100*

*  libavfilter     6. 65.100 /  6. 65.100*

*  libavresample   3.  1.  0 /  3.  1.  0*

*  libswscale      4.  2.100 /  4.  2.100*

*  libswresample   2.  3.100 /  2.  3.100*

*  libpostproc    54.  1.100 / 54.  1.100*

*[rtsp @ 0x65400490] method DESCRIBE failed: 404 Not Found*

*rtsp://192.168.1.10:5554/rtspfeed.h264
<http://192.168.1.10:5554/rtspfeed.h264>: Server returned 404 Not Found*

*    nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0  *
*​*
*​pi37 at pi37:~$​​*



Regards,

*Shalki Khajone*


More information about the ffmpeg-user mailing list