1

I am trying to split a video (.avi) file with duration of 1 hour to 8 minutes. I am using the following command

 ffmpeg -i videos_22_05_18/cnbc.avi -ss 00:00:00 -to 00:08:00 -c copy 1.avi

But it makes a video of 37 minutes instead and also the audio quality is too fast.

I compared the specifications of the original .avi file and the resulting one, and the only difference is that of bitrate.

Bitrate of original file is 646k while that of splitted file is 1126.

I have literally tried every thing. like using

ffmpeg -i videos_22_05_18/cnbc.avi -ss 00:00:00 -to 00:08:00 -c copy -b 646k 1.avi

AND

ffmpeg -i videos_22_05_18/cnbc.avi -ss 00:00:00 -to 00:08:00 -c copy -async 1 1.avi

AND

ffmpeg -i videos_22_05_18/cnbc.avi -ss 00:00:00 -to 00:08:00 -c copy -b 646k -async 1 1.avi

AND

ffmpeg -i videos_22_05_18/cnbc.avi -ss 00:00:00 -to 00:08:00 -vcodec copy -acodec copy -b 646k 1.avi

AND MANY MORE combinations

Nothing seems to work I don't know why it is happening like this. PLease help.

Yaser Sakkaf
  • 164
  • 2
  • 10
  • 1
    Your question is Off Topic here. Quote from the ffmpeg tag: "Only questions about programmatic use of the FFmpeg libraries, API, or tools are on topic. Questions about interactive use of the command line tool should be asked on Super User or Video Production." – jps May 30 '18 at 11:04
  • 2
    Seems like an ffmpeg bug to me, file a trac ticket with small reproducible example. Also make sure you're using an up to date ffmpeg, hard to tell from your post. – rogerdpack May 31 '18 at 22:36
  • 1
    @rogerdpack I am using the latest version 4.0 – Yaser Sakkaf Jun 01 '18 at 09:26

1 Answers1

0

Split video file by ffmpeg:

There are two ways how to split video files by ffmpeg. The first one is good in itself, more than that - it is faster, but sometimes creates output files with certain flaws. So for those cases there is the second way of splitting video files: it is considerably slower, the output files are bigger, but it seems they are always of the same quality level as input files used.

Way : 1

ffmpeg -ss <start> -t <duration> -i in1.avi -vcodec copy -acodec copy out1.avi

Way : 2

ffmpeg -ss <start> -t <duration> -i in1.avi -sameq out1.avi

Refer Link

Gaurav Kandpal
  • 1,250
  • 2
  • 15
  • 33