Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ffmpeg creating multiple output videos, splitting on gt(scene,x)

I want to split one video up into multiple parts based on detecting the first frame of each shot, by select scene in ffmpeg.

The following entry records the scene frames and creates a photo mosaic out of them. This indicates to me that the select portion is functional, but I want to use this to create many separate videos, each scene it's own video file.

ffmpeg -i video.mpg -vf select='gt(scene\,0.2331)','scale=320x240,tile=1x100' -frames:v preview.png

Thank you. I think I am close, and I am open to any solution.

like image 281
spitfire109 Avatar asked Nov 04 '22 08:11

spitfire109


1 Answers

You should definitely use -ss(stream start time) and -t(number of second of video from the the start time) options, Can you get the time for each of these scene frames? Then you are good to go.

like image 108
d33pika Avatar answered Nov 16 '22 12:11

d33pika