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.

6
  • Not possible without transcoding. See superuser.com/a/1168028/114058
    – Gyan
    Commented Mar 8, 2017 at 4:34
  • 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
    Commented Mar 8, 2017 at 16:45
  • @Mulvya how can I do transcoding to acheive above thing.
    – Saqib Rao
    Commented Mar 8, 2017 at 19:04
  • Drop the -vcodec copy in the 2nd command.
    – Gyan
    Commented Mar 8, 2017 at 19:06
  • I tried but output is completely black with audio only.
    – Saqib Rao
    Commented Mar 8, 2017 at 19:49

0

You must log in to answer this question.

Browse other questions tagged .