I am using ffmpeg to cut a video accurately at a given time to another time. I know, we can simply re-encode it, but will lose the quality. Also, I do not want to use copy option because of key frames issue (i.e, the video won't be cutt accurately). These are the commands that I used.
ffmpeg -ss 55 -i input.mp4 -t 00:03:06 -vcodec copy -acodec copy out.mp4
ffmpeg -ss 55 -i input.mp4 -t 00:03:06 out.avi