ffmpeg video trimming without freezed starting frames

2

I am using the following commands for cutting videos using ffmpeg. However, they are presenting weird results.

When I am using the following command, the output video has its frames freezed for starting 1 or 2 seconds and plays smooth later.

ffmpeg -i input.mp4 -vcodec copy -acodec copy -ss 30 -t 45 out.mp4

Whereas, this commands solves the problem of freezed frames but seeking is not accurate as I am using -ss parameter before input.

ffmpeg -ss 30 -i input.mp4 -vcodec copy -acodec copy -t 45 out.mp4

I am looking for help that will let me come up with a solution that will accurately clip the video without freezing frames.

Saqib Rao

Posted 2017-03-08T00:39:08.407

Reputation: 21

Not possible without transcoding. See http://superuser.com/a/1168028/114058

– Gyan – 2017-03-08T04:34:40.253

in any way can I clip exact 30 seconds video when seeking doesn't matter but the start point must not coincide with I-Frame – Saqib Rao – 2017-03-08T16:45:58.527

@Mulvya how can I do transcoding to acheive above thing. – Saqib Rao – 2017-03-08T19:04:10.243

Drop the -vcodec copy in the 2nd command. – Gyan – 2017-03-08T19:06:04.077

I tried but output is completely black with audio only. – Saqib Rao – 2017-03-08T19:49:43.563

Please edit your question and include the full, uncut command line output for the commands. (Also the last one you said you've tried.) – slhck – 2017-03-08T19:57:35.187

No answers