[FFmpeg-user] easy question

Good Developer mkhazanov.developer at gmail.com
Fri May 11 00:00:31 EEST 2018


I hope it is an easy question for someone who came across this issue.
I am recording a video from an ip camera. The video stream comes in h264
format and there is no audio stream. In order to save cpu, I am not
decoding and then re encoding it back to h264, I just copy it. The problem
is that a resulting video sometimes comes distorted. Here is a simple
command that I am using:

ffmpeg -i rtsp://admin:admin@192.168.1.234/ch0_0.h264 -an -c:v copy -f
segment -segment_time 60 -segment_wrap 10 -reset_timestamps 1 result%d.mp4


Also, for your information, there is no problem if I encode the video to
h264, but I am trying to avoid this for saving cpu time:


ffmpeg -i rtsp://admin:admin@192.168.1.234/ch0_0.h264 -an -c:v libx264 -b:v
512K -pix_fmt yuv420p -g 60 -f segment -segment_time 60 -segment_wrap 10
-reset_timestamps 1 result%d.mp4


Can someone point me in a right direction please?


More information about the ffmpeg-user mailing list