How to create short video previews at specified intervals starting AFTER 10 seconds?

0

I'm trying to create some video previews consisting of 10x1s clips. My challenge though is to skip the first few seconds of the input files as they normally are all black without any content.

Current command:

ffmpeg -y -i inputfile.mp4 -filter_complex "[0:v]select='lt(mod(t,${duration}/10),1)',setpts=N/(FRAME_RATE*TB),scale=320:-2" -an outputfile.mp4

So, any suggestions on how I can skip the first few second?

FFMpegUser

Posted 2019-07-08T23:19:21.813

Reputation: 1

Basic form is ffmpeg -ss 12 -t 10 -i in.mp4 -vf "scale=320:-2" -an out.mp4 which starts from 12 seconds into the file and extracts 10 seconds. – Gyan – 2019-07-09T04:47:09.997

Answers

1

Just looking at the man page for ffmpeg here, you can use plenty of options to achieve the desired result.

-ss and -timestamp would probably work best.

So the command you're looking for is as follows:

ffmpeg -y -i inputfile.mp4 -ss 00:00:10 -filter_complex "[0:v]select='lt(mod(t,${duration}/10),1)',setpts=N/(FRAME_RATE*TB),scale=320:-2" -an outputfile.mp4

Note the format after the -ss option.

aa2397

Posted 2019-07-08T23:19:21.813

Reputation: 74

I've already tried -ss. (i.e. -ss 10) This causes the encoding to produce zero output. I do not see how -timestamp contributes to solving the problem. – FFMpegUser – 2019-07-09T00:35:33.190

@FFMpegUser If you've already tried that, please modify your question and include the full, uncut command line output. – slhck – 2019-07-09T14:42:52.367

@FFMpegUser Check the format required for the ss option – aa2397 – 2019-07-09T16:21:36.647

@aa2397 Actual man page is at https://ffmpeg.org/ffmpeg.html and see https://ffmpeg.org/documentation.html for more.

– llogan – 2019-07-09T17:04:20.880