Skip to content

various methods to compress a video based on the speed of things moving in it

Notifications You must be signed in to change notification settings

benfordslaw/vspeed_compression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

vspeed compression

various methods to compress a video based on the speed of things moving in it.

usage

rip

reduce each frame to only things that are moving fast enough. condense into the middle of the frame.

python lib/rip.py [-h] -i INPUT [-fd FRAMEDIST] [-min MINMAG] [-max MAXMAG] [-p PADDING] [-o OUTPUT]

combine resized, fill

normalize the video's speed by making faster things smaller than slower things AND fill in the gaps with nearby color values

python lib/combine_resized_fill.py [-h] -i INPUT [-fd FRAMEDIST] [-ds DOWNSCALE] [-min MINMAG] [-max MAXMAG] [-p PADDING] [-o OUTPUT] [-nf]

combine, separated by speed

normalize the video's speed by making the frame rate of faster things smaller than that of slower things

python lib/combine_sep_speed.py [-h] -i INPUT [-w WINSIZE] [-fd FRAMEDIST] [-d DEPTH] [-o OUTPUT]

update only past threshold

only update parts of a video that are moving faster than a given threshold (out of 255, default 50)

python lib/update_only_past_thresh.py [-h] -i INPUT [-w WINSIZE] [-fd FRAMEDIST] [-min MINMAG] [-o OUTPUT]

download videos

download and resize a youtube video given a url and maximum dimension

bash tools/download_video.sh "URL" MAX_DIM

dependencies

  • opencv
  • tqdm
  • numpy
  • ffmpeg
  • yt-dlp

About

various methods to compress a video based on the speed of things moving in it

Topics

Resources

Stars

Watchers

Forks