Generates a montage of action-packed 1.5s videos about the supplied topic for youtube videos uploaded today that have less than 50 views.
-
A selenium (automated) browser goes to
m.youtube.com/search, sets results to today only, and collects youtube video IDs from the first 25 pages that:- Are less than 4 minutes
- Have less than 50 views
- Are limited to one video per user
-
Loops over all collected youtube IDs and:
- Downloads the video
- Extracts the framerate
- Extracts the size of each frame (as in bytes)
- Finds the 1.5s window with the most action (see
interestingness) - Slices the full video to this 1.5s slice
- Ensures the 1.5s slice has sufficient audio
-
1.5s clips are joined into a single video
- *nix with Bash
- Python >= 3.5
- dateutil, xmltodict, requests (
pip install python-dateutil xmltodict requests) - youtube-dl, ffmpeg (
sudo apt install youtube-dl ffmpeg)
./ObscureTube "search term"
$ ./ObscureTube cockatoo
Spinning up a browser > Searching...
Downloading pUh-oW5iG2E > Sucking Frames > Finding Actionest 1.5s > Writing Slice > Saved
Downloading 4dttNoJ5Vd8 > Sucking Frames > Finding Actionest 1.5s > Writing Slice > Too quiet, deleted.
...
Downloading 4LSWnekuXSE > Sucking Frames > Finding Actionest 1.5s > Writing Slice > Saved
Done! joined.mkv ready