I use ffmpeg to cut a video file. The format i use is this:
ffmpeg -i input.avi -ss 00:06:30 -to 00:07:15 -c copy output.avi
Unfortunately this leaves some black frames in the beginning of my output video, so i lose certain parts of the video. In one video i tried, this went on for one second, in another, the black frames lasted 4 seconds.
The funny thing is that when i used the same command, exactly the same amount of black frame exists for the same video. Meaning, no matter how many times i did this for my second video, in all outputs, the output video will be blank for the first 4 seconds!
The sound works great though!
Here are some other command formats i tried and did NOT work:
ffmpeg -ss 00:01:00 -i video.mp4 -to 00:02:00 -c copy cut.mp4 ffmpeg -ss 00:01:00 -i video.mp4 -to 00:02:00 -c copy -copyts cut.mp4
I thout i found my solution with the command i used, but then this problem occured
EDIT: I figured out that if i don't use the
-c copy flag, then i do not have the black frames:
ffmpeg -i input.avi -ss 00:06:30 -to 00:07:15 output.avi
However, with this method, the quality of my output video is significantly lower than the input video, or the output video from the previous methods. So i am back at square one.