J
J
jiglipup2019-10-09 14:13:11
fmpeg
jiglipup, 2019-10-09 14:13:11

How to batch cut the first 10 seconds from a view using ffmpeg?

Good day!
there is a folder with a lot of videos c:/ffmpeg/videos/
you need to cut off the first 10 seconds of all videos, without re-encoding while maintaining quality and with the same file names.
Save the final result to c:/ffmpeg/videos2/
Thank you so much!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2019-10-09
@sergiks

With one file, everything is simple:

ffmpeg \
  -i "c:/ffmpeg/videos/video_1.avi"  \
  -t 10  \
  -c:v copy  \
  -c:a copy  \
  "c:/ffmpeg/videos2/video_1.avi"

But substituting the correct file names and addresses is not a task for ffmpeg, but for the script. Under Linux/MacOS this would be a bash script as an option. Under Windows, you also need to write something like a bat file.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question