4 ms·
I did a similar (in spirit, to save time) thing [1] to be able to skim on technical presentations: it creates a static HTML page with regular shots from the vid
by RBerenguel 6y ago
I did a similar (in spirit, to save time) thing [1] to be able to skim on technical presentations: it creates a static HTML page with regular shots from the video with the corresponding Youtube CC on the side. It can help decide if a presentation is worth a watch (or just get the gist of one). Uses youtube-dl and ffmpeg under the hood.
[1]: https://github.com/rberenguel/glancer https://github.com/rberenguel/glancer
- gavinray 6y agoWow, I am going to use hell out of this. Such a basic idea when you think about it, but a ton of value.
- RBerenguel 6y agoThanks, when I was done I kind of thought the same. In the end, having the slides would be almost equivalent, but combining a decent enough transcript with the slides adds the minimum "ok, got it" to go from having to watch the video to just being able to skim over it.
- saimiam 6y agoTo take your idea even further, one of the ideas i've been batting around with is to create some sort of learning algo which runs through a video or song, skips forward and back a set number of times to random timestamps to decide if that video or song is something I would be interested in based on my listening history. I feel this is how I currently approach an unfamiliar artist or creator - skip ahead to random points in the video and if I still find them engaging, I rewatch from 0. This type of AI would be so great.
- RBerenguel 6y agoThere's no AI in my program, it's as simple as it sounds: get regular screenshots from the video, collate the corresponding closed captions. One natural improvement of this, though, using some ML would be to focus on the slides when there is a slide+banner+floating head type of presentation. That wouldn't be terribly hard to implement in Python, in Haskell would get me ages (there's Hasktorch, but I havent' tried it, also I have many more years of Python behind me). Your idea sounds intriguing, though. I wonder how one could measure _interest_ in this regard, some form of entropy measure might be right, but how to construct it would be the fun part.
- fallat 6y agoWow this is going to change the way I use YouTube. Huge thank you. I might even rewrite it in Rust!
- RBerenguel 6y agoThanks! There's nothing here that required Haskell, it's just that I'm writing all my new "custom tools" in it. Once you get the hang of some things (parsing, running external commands, command line parsing), it's very easy to build a new tool. I imagine it would be the same with Rust (if I'm not wrong there's a very good parser combinator library as well). Ping me when you are done, my Rust is very basic but since I'd know what it does I would learn from it.
- awiesenhofer 6y agoWow, thanks so much for this! Have to try this in Termux on my ereader (Onyx Books Nova 3). Love the idea of comfortably reading all these tech videos on eink instead of sitting in front of a normal display even longer.
- RBerenguel 6y agoI hope it works well. The generated HTML is _large_, since I embed the images as base64 encoded (to make it braindead easy to share the "presentation"), that's the only point I can imagine an ereader having issues, but Onyx devices should have enough power to handle that.
- pdimitar 6y agoI wonder if the normal `youtube-dl` tool still has problems downloading the auto-generated subtitles as of today? Do you know? I'm not keen on using any of its forks for the moment.
- DyslexicAtheist 6y agoAt least the official version that is currently in Debian sid/unstable is having problems downloading vtt: apt-cache policy youtube-dl youtube-dl: Installed: 2021.01.08-1 Candidate: 2021.02.04.1-1 Combining youtube-dl with vtt2txt.py[1] would usually give me a transcript, however this no longer works for me (for now): $> youtube-dl --skip-download --convert-subs vtt https://www.youtube.com/watch?v=iGLzWdT7vGc $> find . -name "*.vtt" -exec python vtt2text.py {} \; [1] https://gist.github.com/glasslion/b2fcad16bc8a9630dbd7a945ab5ebf5e https://gist.github.com/glasslion/b2fcad16bc8a9630dbd7a945ab...
- RBerenguel 6y agoHaven't checked since I wrote glancer (it's a pretty recent project), I expect the normal one to eventually fix its issues, then I'd move to it. Better not add more complications (you already need stack, that's kind of askinga lot).
- jarbus 6y agoThe README mentions that you have a list of technical talks you are meaning to watch. Would you mind sharing that list? I'm curious!
- RBerenguel 6y agoAny way I can reach you? Don't want to spam an answer with a very long list. The summary would be "a few from" (around 7-15) the last Flink Forward, Ray summit, Spark Summit (the last 2 actually) and then some other more "random" talks in areas I'm interested in. That is the bulk of it. I also have now a section of "non-glanceable", for talks where there is more than the slides (like, the Play track of last Github Universe, or the recent Bill Evans documentary shared here in HN).
- jarbus 6y agoYou could upload it as a gist on Github for example, that way others could see it. If not, my email is jarbus@tutanota.com. Thanks!
- RBerenguel 6y agoNot thinking of a gist is what you get after 8 days without opening a computer, here it is: https://gist.github.com/rberenguel/dd6a84927b8f367e9b68e9397d977080 https://gist.github.com/rberenguel/dd6a84927b8f367e9b68e9397...
- jarbus 6y agoThank you so much!
- KiwiCoder 6y agoNever touched Haskell before, but found that path separators were needed to get this working (on WSL with Ubuntu if it matters) For example - capsPath <- getFullPath (T.unpack (coerce dir <> coerce videoName <> ".en.vtt")) + capsPath <- getFullPath (T.unpack (coerce dir <> "/" <> coerce videoName <> ".en.vtt")) Needed to apply the same change in a few places. Also found --sub-langs en doesn't work if the videos has for example en-CA as the subtitle language. And finally, youtube-dlc seems to inconveniently discard the VTT file, breaking glancer, unless you specify `-k` to keep the file.
- RBerenguel 6y agoPaths: will fix, since I was the only user I didn't hit any issues Subs: that's kind of known, I need to provide the option to the user to choose sub language in weird cases. I'll try to find a way. VTT file: oh, that's definitely new, is not the case with the version I have installed. I'll have a look ASAP and add this parameter.