Home/News | About | Download | Documentation | Forum | Bug Reports | Contact | Donations | Consulting | Projects | Legal | Security | FATE


Converting RTSP to Webm and streaming to html5

Discussions about problems encountered using ffserver.
Forum rules
FFmpeg is in a state of perpetual development and we do not currently have the person power to backport fixes to official releases. As such, if you wish to query or report a bug, you must try with the latest development branch revision of FFmpeg to confirm the issue still exists. The latest FFmpeg can be downloaded from here: http://www.ffmpeg.org/download.html

Re: Converting RTSP to Webm and streaming to html5

Postby Wieselflink » Thu Dec 31, 2015 9:07 am

Hey,
I'm trying also to convert my RTSP Stream from my Hootoo IPCam to an webm-Stream but it doesn't work.
In web view (used the html Code above) and in VLC the screen is black.

note: Using ffmpeg on Raspberry PI 2 B+

May someone see what I did wrong.

ffserver.conf
Code: Select all
Port 8090                      # Port to bind the server to
BindAddress 0.0.0.0
MaxHTTPConnections 5
MaxClients 5
MaxBandwidth 10000             # Maximum bandwidth per client
                               # set this high enough to exceed stream bitrate
CustomLog -
#NoDaemon                       # Remove this if you want FFserver to daemonize after start

 <Feed feed1.ffm>
     File ./feed1.ffm
     FileMaxSize 1g
     ACL allow 127.0.0.1
</Feed>

<Stream feed1.webm>                     # Output stream URL definition
   Feed feed1.ffm              # Feed from which to receive video
   Format webm

   # Audio settings
   AudioCodec vorbis
   AudioBitRate 64             # Audio bitrate

   # Video settings
   VideoCodec libvpx
   VideoSize 720x576           # Video resolution
   VideoFrameRate 25           # Video FPS
   AVOptionVideo flags +global_header  # Parameters passed to encoder
                                       # (same as ffmpeg command-line parameters)
   AVOptionVideo cpu-used 0
   AVOptionVideo qmin 10
   AVOptionVideo qmax 42
   AVOptionVideo quality good
   AVOptionAudio flags +global_header
   PreRoll 15
   StartSendOnKey
   VideoBitRate 400            # Video bitrate
</Stream>

<Stream status.html>            # Server status URL
   Format status
   # Only allow local people to get the status
   ACL allow 192.168.0.0 192.168.255.255
</Stream>


ffmpeg command
Code: Select all
ffmpeg -i rtsp ://192.168.186.42:21837/11 http ://localhost:8090/feed1.ffm


Output from
Code: Select all
ffmpeg -i feed1.ffm -qscale 0 -c:v copy output.webm

Code: Select all
 ffmpeg -i feed1.ffm -qscale 0 -c:v copy output.webm
ffmpeg version N-77542-gb4466c9 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.6 (Debian 4.6.3-14+rpi1)
  configuration: --prefix=/home/pi/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/pi/ffmpeg_build/include --extra-ldflags=-L/home/pi/ffmpeg_build/lib --bindir=/home/pi/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. 11.100 / 55. 11.100
  libavcodec     57. 20.100 / 57. 20.100
  libavformat    57. 21.100 / 57. 21.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 22.100 /  6. 22.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[vorbis @ 0x1926d90] Extradata missing.
[ffm @ 0x19251f0] Failed to open codec in av_find_stream_info
Guessed Channel Layout for  Input Stream #0.0 : mono
Input #0, ffm, from 'feed1.ffm':
  Duration: N/A, bitrate: 464 kb/s
    Stream #0:0: Audio: vorbis, 22050 Hz, 1 channels, fltp, 64 kb/s
    Stream #0:1: Video: vp8, yuv420p, 720x576, 400 kb/s, 25 tbr, 1000k tbn, 25 tbc
Please use -q:a or -q:v, -qscale is ambiguous
File 'output.webm' already exists. Overwrite ? [y/N] y
[libopus @ 0x192c110] No bit rate set. Defaulting to 64000 bps.
[vorbis @ 0x1927a00] Extradata missing.
Output #0, webm, to 'output.webm':
    Stream #0:0: Video: vp8, yuv420p, 720x576, q=2-31, 400 kb/s, 25 tbr, 1000k tbn, 1000k tbc
    Stream #0:1: Audio: opus (libopus), 24000 Hz, mono, flt, 64 kb/s
    Metadata:
      encoder         : Lavc57.20.100 libopus
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (vorbis (native) -> opus (libopus))
Error while opening decoder for input stream #0:0 : Invalid data found when processing input
Wieselflink
 
Posts: 1
Joined: Thu Dec 31, 2015 8:28 am

Re: Converting RTSP to Webm and streaming to html5

Postby carrbrpoa » Wed Nov 30, 2016 2:36 pm

Hello,

I tried your method but when I try the ffmpeg command, I receive error 5xx for server:

The command:

Code: Select all
root@6c28100e8d69:/etc# ffmpeg -rtsp_transport tcp -i rtsp://rtsp:rtsp@10.1.1.8:554/Interface/Cameras/Media?Camera=ABC -map 0 http ://127.0.0.1:8090/feed.ffm
ffmpeg version git-2016-11-22-81147b5 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.9.2 (Debian 4.9.2-10)
  configuration: --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis -
-enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
  libavutil      55. 41.101 / 55. 41.101
  libavcodec     57. 66.107 / 57. 66.107
  libavformat    57. 58.100 / 57. 58.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 67.100 /  6. 67.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Input #0, rtsp, from 'rtsp://rtsp:rtsp@10.1.1.8:554/Interface/Cameras/Media?Camera=ABC':
  Metadata:
    title           : Digifort Media
  Duration: N/A, start: 0.136267, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuvj420p(pc, progressive), 1280x960 [SAR 1:1 DAR 4:3], 14.99 fps, 14.99 tbr, 90k tbn, 29.97 tbc
[http @ 0x40e5660] HTTP error 502 Connection refused
http ://127.0.0.1:8090/feed.ffm: Server returned 5XX Server Error reply


Any ideas? Thanks!
carrbrpoa
 
Posts: 2
Joined: Wed Nov 30, 2016 1:37 pm

Previous

Return to ffserver

Who is online

Users browsing this forum: No registered users and 3 guests