Skip to content

Instantly share code, notes, and snippets.

@rohit-gupta
Last active September 4, 2017 09:01
Show Gist options
  • Save rohit-gupta/f8a6f0c6f9098018bb351a217b73ab39 to your computer and use it in GitHub Desktop.
Save rohit-gupta/f8a6f0c6f9098018bb351a217b73ab39 to your computer and use it in GitHub Desktop.
Useful commands for video pre-processing pipeline for deep learning
# clip videos and delete original
ffmpeg -hide_banner -y -i clipped.avi -vf "trim=start=0:end=2,setpts=PTS-STARTPTS" -an tiny.avi && rm -rf clipped.avi
# Extract Frames
ffmpeg -i vid4.avi frames/vid4/%04d.jpg -hide_banner
# Download videos from Youtube
youtube-dl --get-filename -o '%(id)s_%(fps)s.%(ext)s' w4JM08PDEng -f 'bestvideo[height<=240]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment