[FFmpeg-user] Problem with ffmpeg command when recording live streams
Yanet Giuse
yanetagiu at yahoo.com
Fri Apr 28 18:28:49 EEST 2017
Thank you for your response,
Ive tried a lot of different parameters.
for the command line:
ffmpeg -i rtsp://admin:admin@192.168.32.228:554/live -c:v copy -movflags +faststart -f mp4 /home/equipoprueba/Desktop/outfile.mp4
The result is
ffmpeg version N-81709-g492259c Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 20160609
configuration: --enable-gpl --enable-libx264 --enable-shared --enable-libx265 --enable-nvenc
libavutil 55. 30.100 / 55. 30.100
libavcodec 57. 57.101 / 57. 57.101
libavformat 57. 50.100 / 57. 50.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 62.100 / 6. 62.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
[rtsp @ 0x1b90120] UDP timeout, retrying with TCP
[rtsp @ 0x1b90120] method PAUSE failed: 455 Method Not Valid in This State
[rtsp @ 0x1b90120] 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://admin:admin@192.168.32.228:554/live':
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
File '/home/equipoprueba/Desktop/outfile.mp4' already exists. Overwrite ? [y/N] y
[mp4 @ 0x1be41e0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, mp4, to '/home/equipoprueba/Desktop/outfile.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 @ 0x1b90120] UDP timeout, retrying with TCP
[rtsp @ 0x1b90120] method PAUSE failed: 455 Method Not Valid in This State
rtsp://admin:admin@192.168.32.228:554/live: Operation not permitted
[mp4 @ 0x1be41e0] Starting second pass: moving the moov atom to the beginning of the file
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 @ 0x1be5ae0] Qavg: -nan
for the command line :
ffmpeg -i rtsp://admin:admin@192.168.32.228:554/live -c:v copy -c:a mp3 -b:a 128k -movflags +faststart -f mp4 /home/equipoprueba/Desktop/outfile.mp4
I got:
ffmpeg version N-81709-g492259c Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 20160609
configuration: --enable-gpl --enable-libx264 --enable-shared --enable-libx265 --enable-nvenc
libavutil 55. 30.100 / 55. 30.100
libavcodec 57. 57.101 / 57. 57.101
libavformat 57. 50.100 / 57. 50.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 62.100 / 6. 62.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
[rtsp @ 0x1a981e0] UDP timeout, retrying with TCP
[rtsp @ 0x1a981e0] method PAUSE failed: 455 Method Not Valid in This State
[rtsp @ 0x1a981e0] 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://admin:admin@192.168.32.228:554/live':
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
Unknown encoder 'mp3'
El Viernes, 28 de abril, 2017 11:56:06, DopeLabs <dopelabs at dubstep.fm> escribió:
Have you tried a stream copy or only encoding the audio to mp3/aac since the video looks like its already in h264?
Stream copy video and re-encode audio
ffmpeg -I rtsp:/ip -c:v copy -c:a mp3 -b:a 128k -movflags +faststart -f mp4 outfile.mp4
> On Apr 28, 2017, at 6:12 24AM, Yanet Giuse <yanetagiu-at-yahoo.com at ffmpeg.org> wrote:
>
> 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..
>
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email
ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list