Skip to content

Reducing video via scene detection to essential frames

Notifications You must be signed in to change notification settings

g-rden/ffmpeg-vfr-scene-det

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

ffmpeg-vfr-scene-det

Reducing video via scene detection to essential frames and encoding it with variable fps. This will not work well with most video contentand is very unorthodox.

extract frames

Make the script executable: e.g. chmod +x getframes.sh. Make a directory called frames. e.g. mkdir frames. Run script ./getframes [scene value] [video file].

Set scene value for more or less aggressive scene detection:

0 - very aggressive

1 - not aggressive or even disabled

e.g. 0.01

encode extracted frames with variable fps

ffmpeg -f concat -safe 0 -i concat -vsync passthrough [output file] You can add ffmpeg options, but these are required.

re-encode with constant fps

ffmpeg -i [vrf video file] -r [framerate of the original video] -vsync cfr [output file] You can add ffmpeg options, but these are required. Re-encoding as cfr can improve compatability with video players and displaying subtitles.

About

Reducing video via scene detection to essential frames

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages