[英]FFMPEG record http video stream with normal speed
I'm recording an http stream from my IP Camera (TPLINK NC200), using this command:我正在使用以下命令从我的 IP 摄像机(TPLINK NC200)录制一个 http 流:
ffmpeg -i http://admin:YWRtaW4=@192.168.0.18:8080/stream/getvideo -t 30 -acodec copy -vcodec copy abc.mp4
As you can see , the video length is set to 30 seconds ( -t option ) .如您所见,视频长度设置为 30 秒(-t 选项)。 But it takes about 1 minute 30 seconds to record , and the video speed is very high ( the camera recording a stopwatch and a 30-second video recorded the timer to 1 minute and 11 seconds ).
但是录制大约需要1分30秒,而且视频速度非常高(相机录制秒表和30秒视频录制计时器为1分11秒)。
Is there some ffmpeg option to get a normal speed video?是否有一些 ffmpeg 选项来获得正常速度的视频? Or the problem is the camera configuration?
还是相机配置的问题?
Despite the declared 25 fps is your stream likely varying in framerate.尽管声明为 25 fps,但您的视频流的帧速率可能会有所不同。 I would try this
我会试试这个
ffmpeg -use_wallclock_as_timestamps 1 -i "http://admin:YWRtaW4=@192.168.0.18:8080/stream/getvideo" -t 30 -c copy -y output.mp4
Sometimes I get a bunch of Non-monotonous DTS in output stream warnings.有时我会在输出流警告中收到一堆非单调的 DTS 。 There seems to be some timebase issue of the input format, and the only help for me is to force mjpeg format instead of mpjpeg.
输入格式似乎存在一些时基问题,对我来说唯一的帮助是强制使用 mjpeg 格式而不是 mpjpeg。
ffmpeg -use_wallclock_as_timestamps 1 -f mjpeg -i "http://admin:YWRtaW4=@192.168.0.18:8080/stream/getvideo" -t 30 -c copy -y output.mp4
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.