How to update the next row of the current row when a condition is met.Python - format dataframe columns as different datatypes. ![]() Change value in a 2-value column to its opposite only if a condition in another column is met.Unlist a list within a list of ames into a single ame.How can I remove combinations of groups specified in one data.table from another data.table.How to reshape a dataframe into percentage of categorical data.Once you have a video to work with, we can use videogrep to make a supercut of it. If you haven’t already done so, go ahead and download a YouTube video with yt-dlp, and make sure to pass along the -write-auto-sub option to also download the video subtitle file. vtt files that are provided with almost every YouTube video. So, if you have a video called meta.mp4 you’d also need a subtitle file, in the same folder, called meta.vtt or meta.srt. Note: the subtitle file must have the same name as the video file. json files that videogrep can generate itself (more on this later). vtt files (a common web-based subtitle format), or specially formatted. srt files (the most common subtitle format). It will automatically look for a few different types of subtitle files, including. Videogrep uses the timestamps in subtitle files to make supercuts of videos. This will download the video as a 1280x720 mp4 with the filename meta.mp4, along with it’s subtitles in. Yt-dlp "" -write-auto-sub -f 22 -o meta.mp4 Yt-dlp allows you to very easily download almost any video from the web. If you’re on a PC, download and install the latest stable release of Python here.īefore we get into Videogrep, here’s a brief intro to yt-dlp. If you’re on a Mac you should already be good to go. You’ll also need Python installed on your computer. If you’re brand new to this type of thing, you may wish to take a look at this video/write-up I’ve prepared: Intro to the Command Line. This tutorial requires some familiarity with the command line (although not much). Update: Part two of the tutorial is here. If you prefer to skip the tutorial, videogrep’s usage instructions and code can be found on github. In this tutorial I’ll walk you through how to use the new and improved Videogrep, as well as another tool called yt-dlp that allows you to download videos from almost any website. ![]() I’ve also attempted to simplify the tool a bit, removing some features that I don’t think anyone was really using, like searching by part of speech or word category. The most significant improvement I’ve made to the software is migrating Videogrep’s offline transcription tool from Pocketsphinx, which is notoriously inaccurate and seemed to have stopped working on my Mac, to Vosk, which anecdotally works around 1000% better. The class includes a section on automatically manipulating video, and I’ll also be teaching this material this June, in a 3-hour workshop that is specifically about video and the command line at Sonic Acts. These updates were motivated in part by a 10 week class I recently developed and taught at the School for Poetic Computation called Scrapism (web-scraping-as-art). I’ve been working on some long-needed updates to Videogrep, my command-line tool that automatically generates supercuts.
0 Comments
Leave a Reply. |