tetris_ctm_summary
tetris_ctm_summary copied to clipboard
Add 'Tetris Metadata Subtitles Extractor', modules, & CLI menu.
In the spirit of implementing dubious features that no one specifically requested but I personally find interesting 😅, here's a PR that implements #8, begins adding modules (single monolithic generate.py
function, be gone!! 👋), and also adds a basic CLI menu for easier navigation.
In Summary:
https://user-images.githubusercontent.com/45280066/111083475-3619c300-84e4-11eb-9bc3-24cdc0441df9.mp4
Notes:
- To run: Navigate to your root and run
python -m main.runner
. - All files you're interested in processing need to posses the
.mp4
extension and be housed in.\input\
. - All generated
.srt
files will be placed in.\output\
- If you're processing a large file and want to exit early, hitting
ctrl-c
on your keyboard will exit the main processing loop but not the app. - Still need to do a ton of stuff like handle bad CLI menu inputs, etc. It's on the docket. Currently, the app works fine if you behave... 😄
Pictures:
So, for example-- put your input video (*.mp4)
files here that you wish to process:
And after running the subtitles generator, your .srt
will appear here:
Your generated .srt
should look like this:
Using an app like VLC, add the subtitle; it should look like this:
I was just gonna do something similar but saw this PR which is anyway way better than I could've done
Hi @JupeOwl ! Welcome! 👋😄 So great to see a new face here in Yobi World! 😀
Haha, thanks for the kind words! I know some Python, but tbh, there's probably 90% of the standard library that I don't know. Python is so incredibly powerful and can do so much! I'd chatted with Yobi about a month ago in his Discord and in the end we didn't pursue a CLI menu (for good reasons!) but this was still a fun side-project that I'd enjoyed hacking together. I didn't go farther with this at the time, but my thinking was that:
- Since many newbies might be using the tool, it'd be cool to offer two modes:
- A CLI menu version for total beginners who are just interested in the Tetris-side (extracting stats, etc).
- A command line version for old-school, advanced users who are interested in embedding Yobi's tool in their own scripts.
- My thinking was that once you extracted stats in a
plaintext
format out of a video, then you could process that metadata in Excel/Sheets/pandas/a Jupytr notebook to do Nate Silver-style/538 analysis. The potential is endless!! 😁
(Btw, if you're curious: I actually ended up writing about my PR/'ideas-for-next-steps' here: https://community.codenewbie.org/r002/2-python-opencv-classic-tetris-monthly-summary-tool-mar-12-2021-nep)
In general, please contribute and make a PR though! Yobi is awesome and Yobi's CTM Summary Tool is awesome! 🎉🌟✨ Seriously though, the world needs more open-source! Open-source is the way! 🚀🚀🚀