cat brain.log | less

Getting it down on `paper`

Frame Grab YouTube Videos

// Get the youtube downloader
git clone ~/dev/

// Place the downloader in my ~/bin directory for path-less reference
cp ~/dev/youtube-dl/youtube-dl ~/bin/
chmod +x ~/bin/youtube-dl

// Fetch a scenic movie

// Option 1 (preferred):
// Obtain ffmpeg that I’ll use to extract frames.
sudo apt-get install libav-tools

// extract frames (-r=1Hz) at 135 seconds for 10 seconds.
// enhanced quality jpegs (between 1-31, try 2-5)
ffmpeg -i YW8p8JO2hQw.mp4 -ss 135 -t 10 -r 1 -qscale:v 2 out/img-%03d.jpg

// Skip to ~13 minutes, extract to ~20.5 minutes.
// Extract 5 frames/sec, rotate CCW 90 deg.
ffmpeg -ss "00:13:09" -t 442 -i GOPR0002.MP4 -y -an -sameq -f image2 -r 5 -vf "transpose=2" out/img%06d.jpg

// Option 2:
// Obtain vlc:
sudo apt-get install vlc

// extract every 25th frame, between 135 seconds and 145 seconds.
cvlc YW8p8JO2hQw.mp4 --aout=dummy --vout=dummy --video-filter=scene --scene-format=jpg --scene-prefix=img- --scene-path=out/ --scene-ratio=25 --start-time=135 --stop-time=145 vlc://quit



No comments so far.

(comments are closed)