[FFmpeg-user] Problem with ffmpeg command when recording live streams

Yanet Giuse yanetagiu at yahoo.com
Fri Apr 28 16:12:24 EEST 2017


Hello!I am trying to record a live rtsp stream and save videos locally using ffmpeg, but i cant.This stream is a camera, and Ive tested the video stream in VLC. It works.
First, the ffplay command (ffplay rtsp://ip ) returns
[rtsp @ 0x7fa574009280] UDP timeout, retrying with TCP   0B f=0/0   
[rtsp @ 0x7fa574009280] method PAUSE failed: 455 Method Not Valid in This State
[rtsp @ 0x7fa574009280] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, rtsp, from 'rtsp://ip':
  Metadata:
    title           : Media Server
  Duration: N/A, bitrate: 128 kb/s
    Stream #0:0: Video: h264, none, 90k tbr, 90k tbn, 180k tbc
    Stream #0:1: Audio: pcm_alaw, 16000 Hz, 1 channels, s16, 128 kb/s
[rtsp @ 0x7fa574009280] UDP timeout, retrying with TCP   0B f=0/0   
[rtsp @ 0x7fa574009280] method PAUSE failed: 455 Method Not Valid in This State
So, i installed h264 and h265 codecs and re-installed ffmpeg. But the same error happened.Alsp, i tried the ffmpeg command
ffmpeg -i rtsp://ip -r 15 outvideo.mp4
the result is:
[rtsp @ 0x11e30c0] UDP timeout, retrying with TCP
[rtsp @ 0x11e30c0] method PAUSE failed: 455 Method Not Valid in This State
[rtsp @ 0x11e30c0] Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://ip':
  Metadata:
    title           : Media Server
  Duration: N/A, bitrate: 128 kb/s
    Stream #0:0: Video: h264, none, 90k tbr, 90k tbn, 180k tbc
    Stream #0:1: Audio: pcm_alaw, 16000 Hz, 1 channels, s16, 128 kb/s
[mp4 @ 0x1237260] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, mp4, to 'outvideo.mp4':
  Metadata:
    title           : Media Server
    encoder         : Lavf57.50.100
    Stream #0:0: Audio: aac (LC) ([64][0][0][0] / 0x0040), 16000 Hz, mono, fltp, 69 kb/s
    Metadata:
      encoder         : Lavc57.57.101 aac
Stream mapping:
  Stream #0:1 -> #0:0 (pcm_alaw (native) -> aac (native))
Press [q] to stop, [?] for help
[rtsp @ 0x11e30c0] UDP timeout, retrying with TCP
[rtsp @ 0x11e30c0] method PAUSE failed: 455 Method Not Valid in This State
rtsp://ip: Operation not permitted
size=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[aac @ 0x1238a60] Qavg: -nan

I tried with several parameters I found on the web. No chances to work.

I think it is a codec problem, or maybe the reason is that my camera is in 192.168.32. and my computer works in 192.168.31.I am searching for suggests, reasons, commands .. Everything that helps..




More information about the ffmpeg-user mailing list