2

I am new in ffmpeg! i want to split videos which duration like 3 mins. or more into 10 sec.using ffmpeg? please help me how to resolve it.

Jabs
  • 37
  • 1
  • 5
  • Thanks for your reply ! but in my case i don't know what was the exact duration about input video. and right now i am use below command for split video ffmpeg -i input.mp4 -c copy -map 0 -segment_time 30 -f segment -reset_timestamps 1 output"%03d.mp4 PLEASE HELP ME HOW TO RESOLVE !!! – Jabs Jan 08 '19 at 06:50

1 Answers1

2

Use these commands in sequence for splitting videos.

ffmpeg -ss 00:00:00 -t 10 -i input.mov -vcodec copy -acodec copy output_part1.mov
ffmpeg -ss 00:00:10 -t 10 -i input.mov -vcodec copy -acodec copy output_part2.mov
ffmpeg -ss 00:00:20 -t 10 -i input.mov -vcodec copy -acodec copy output_part3.mov
ffmpeg -ss 00:00:30 -t 10 -i input.mov -vcodec copy -acodec copy output_part4.mov


-ss stands for start time,

-t is the length of final clip,

-i is the input file, in this case it's a file called 'input.mov'

-vcodec is the video codec used to encode the output file. 'copy' means we're using the 
 same codec as the input file.

-acodec is the audio codec. Like the video codec, we'll be using the same audio codec as the input file.

output.mov is the output file, you can rename this to any file name you choose.
nkalra0123
  • 2,281
  • 16
  • 17
  • Thanks for your reply ! but in my case i don't know what was the exact duration about input video. and right now i am use below command for split video ffmpeg -i input.mp4 -c copy -map 0 -segment_time 30 -f segment -reset_timestamps 1 output"%03d.mp4 – Jabs Jan 07 '19 at 06:02