[FFmpeg-user] Reading from an ipcam via HTTP and streaming to a file

John Baker jbaker at dryfish.org.uk
Fri Mar 4 16:33:51 CET 2016


Hello,

Thank you for your feedback. I've downloaded the statically linked
ffmpeg 3 and am trying to make it work with another camera (a Foscam C1,
so relatively modern) given the first camera in question (original
posting) has fallen off the network. How do I go about diagnosing this
error? It looks like the RTSP stream isn't recognised by ffmpeg, and it
fails with vlc too.

$ ./ffmpeg -v trace -i rtsp://user:pass@192.168.0.123:554/videoMain -r
900  -vcodec copy -an -t 9 x.mp4
ffmpeg version 3.0-static http://johnvansickle.com/ffmpeg/  Copyright
(c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.1 (Debian 5.3.1-8) 20160205
  configuration: --enable-gpl --enable-version3 --disable-shared
  --disable-debug --enable-runtime-cpudetect --enable-libmp3lame
  --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex
  --enable-libvorbis --enable-libvpx --enable-libfreetype
  --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb
  --enable-libopencore-amrwb --enable-libtheora --enable-libvo-amrwbenc
  --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass
  --enable-gnutls --enable-libvidstab --enable-libsoxr --enable-frei0r
  --enable-libfribidi --disable-indev=sndio --disable-outdev=sndio
  --enable-librtmp --enable-libmfx --cc=gcc
  libavutil      55. 17.103 / 55. 17.103
  libavcodec     57. 24.102 / 57. 24.102
  libavformat    57. 25.100 / 57. 25.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 31.100 /  6. 31.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument 'trace'.
Reading option '-i' ... matched as input file with argument
'rtsp://user:pass@192.168.0.123:554/videoMain'.
Reading option '-r' ... matched as option 'r' (set frame rate (Hz value,
fraction or abbreviation)) with argument '900'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video
codec ('copy' to copy stream)) with argument 'copy'.
Reading option '-an' ... matched as option 'an' (disable audio) with
argument '1'.
Reading option '-t' ... matched as option 't' (record or transcode
"duration" seconds of audio/video) with argument '9'.
Reading option 'x.mp4' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument trace.
Successfully parsed a group of options.
Parsing a group of options: input file
rtsp://user:pass@192.168.0.123:554/videoMain.
Successfully parsed a group of options.
Opening an input file: rtsp://user:pass@192.168.0.123:554/videoMain.
Probing rtsp score:100 size:0
[tcp @ 0x3cfdf40] No default whitelist set
[rtsp @ 0x3cfbfe0] Sending:
OPTIONS rtsp://192.168.0.123:554/videoMain RTSP/1.0
CSeq: 1
User-Agent: Lavf57.25.100

--
[rtsp @ 0x3cfbfe0] ret=0 c=00
[rtsp://user:pass@192.168.0.123:554/videoMain: Invalid data found when
processing input

Curiously, the motion Linux camera tool will read the RTSP stream. 

Thanks


John


More information about the ffmpeg-user mailing list