{"id":20826,"date":"2025-07-04T18:21:24","date_gmt":"2025-07-04T17:21:24","guid":{"rendered":"https:\/\/johnjohnston.info\/blog\/?p=20826"},"modified":"2025-12-05T11:15:07","modified_gmt":"2025-12-05T11:15:07","slug":"ds106-supercuts","status":"publish","type":"post","link":"https:\/\/johnjohnston.info\/blog\/ds106-supercuts\/","title":{"rendered":"DS106 Supercuts"},"content":{"rendered":"\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe loading=\"lazy\" class=\"youtube-player\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/7TZquIfs0So?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;wmode=transparent\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span>\n<\/div><\/figure>\n\n\n\n<p>I&#8217;ve followed the <a href=\"https:\/\/daily.ds106.us\">#ds106 daily create<\/a> for quite a few years now. The other day the invite was to use <a href=\"https:\/\/www.playphrase.me\/\">PlayPhrase<\/a><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>PlayPhrase will assemble a clip of movie scenes all having the same phrase, a small supercut if you will.<\/p>\n<\/blockquote>\n\n\n\n<p>The results are slick and amusing.<\/p>\n\n\n\n<p>I remember <a href=\"https:\/\/johnjohnston.info\/106\/?s=Supercut\">creating a few Supercuts<\/a> using the amazing <a href=\"https:\/\/lav.io\/2014\/06\/videogrep-automatic-supercuts-with-python\/\">Videogrep<\/a> python script. I thought I&#8217;d give it another go. I&#8217;ve made quite a few notes on using Videogrep before, but I think I&#8217;ve smoothed out a few things on this round. I thought I might write up the process DS106 style just for memory &amp; fun<sup data-fn=\"9b213888-f702-44ee-8a7f-0c25db41252f\" class=\"fn\"><a href=\"#9b213888-f702-44ee-8a7f-0c25db41252f\" id=\"9b213888-f702-44ee-8a7f-0c25db41252f-link\">1<\/a><\/sup>. The following brief summary assumes you have command line basics.<\/p>\n\n\n\n<p>I decided to just go for people saying ds106 in videos about ds106. I searched for ds106 on YouTube and found quite a few. I needed to download the video and an srt, subtitle, file. Like most videos on YouTube there are not uploaded subtitles on any of the ds106 videos I choose. But you can download the autogenerated subtitles in vtt format and convert to srt with yt-dlp. The downloading and subtitle conversion is handled by yt-dlp<sup data-fn=\"17679d24-4cac-413e-a6d9-9e10c3a16d0f\" class=\"fn\"><a href=\"#17679d24-4cac-413e-a6d9-9e10c3a16d0f\" id=\"17679d24-4cac-413e-a6d9-9e10c3a16d0f-link\">2<\/a><\/sup>.<\/p>\n\n\n\n<p>I had installed Videogrep a long time ago, but decided to start with a clean install. I understand very little about python and have run into various problems getting things to work. Recently I discover that using a virtual environment seems to help. This creates a separate space to avoid problems with different versions of things. I&#8217;d be lying if I could explain much about what these things are. Fortunately it is easy to set up and use if you are at all comfortable with the command line.<\/p>\n\n\n\n<p>The following assumes you are in the terminal and have moved to the folder you want to use.<\/p>\n\n\n\n<p>Create a virtual environment:<\/p>\n\n\n\n<p><code>python3 -m venv venv<\/code><\/p>\n\n\n\n<p>Turn it on:<\/p>\n\n\n\n<p><code>source venv\/bin\/activate<\/code><\/p>\n\n\n\n<p>Your prompt now looks something like this:<\/p>\n\n\n\n<p>(venv) Mac-Mini-10:videos john$<\/p>\n\n\n\n<p>You will also have a folder <strong>venv<\/strong> full of stuff<\/p>\n\n\n\n<p>I am happy to ignore this and go on with the &#8216;knowledge&#8217; that I can&#8217;t mess too much up.<\/p>\n\n\n\n<p>Install Videogrep:<\/p>\n\n\n\n<p><code>pip install videogrep<\/code><\/p>\n\n\n\n<p>I am using yt-dlt to get the videos. As usual I am right in the middle when I realise I should have updated it before I started. I&#8217;d advise you to do that first.<\/p>\n\n\n\n<p>You can get a video and generate a srt file form the YouTube auto generated:<\/p>\n\n\n\n<p><code>yt-dlp --sub-lang \"en\" --write-auto-sub -f 18 --convert-subs srt \"https:\/\/www.youtube.com\/watch?v=tuoOKNJW7EY\"<\/code><\/p>\n\n\n\n<p>Should download the video, the auto generated subtitles and convert them to a srt file!<\/p>\n\n\n\n<p>I edit the video &amp; srt file names to make then easier to see\/type<\/p>\n\n\n\n<p>Then you can run Videogrep:<\/p>\n\n\n\n<p><code>videogrep --input ds106.mp4 --search \"ds106\"<\/code><\/p>\n\n\n\n<p>This makes a file <em>Supercut.mp4<\/em> of all the bits of video with the text &#8216;ds106&#8217; in the srt file.<\/p>\n\n\n\n<p>I did a little editing of the srt file to find and replace ds-106 with ds106, and ds16 with ds106. I <em>think<\/em> I could work round that by using a regular expression in videogrep.<\/p>\n\n\n\n<p>After trying that I realised I wanted a fragment not a whole sentence, for that you need the vtt file: I can dowmnload that with:<br>yt-dlp &#8211;write-auto-sub &#8211;sub-lang en &#8211;skip-download &#8220;https:\/\/www.youtube.com\/watch?v= tuoOKNJW7EY&#8221;<\/p>\n\n\n\n<p>Then I rename the file to <em>ds106.vtt<\/em> delete the srt file and run<\/p>\n\n\n\n<p><code>videogrep --input ds106.mp4 --search \"106\"<\/code> &#8211;search-type fragment<\/p>\n\n\n\n<p>I shortened ds106 to 106 as vtt files seem to split the text into ds and 106.<\/p>\n\n\n\n<p>I ended up with 4 nice wee Supercut files. I could have run through the whole lot at once but I did it one at a time.<\/p>\n\n\n\n<p>I thought I could join all the videos together with ffmpeg, but ran into bother with dimensions and formats so I just opened up iMovie and dragged the clips in.<\/p>\n\n\n\n<p>at the end close the virtualenv with <code>deactivate<\/code><\/p>\n\n\n\n<p>reactivate with<\/p>\n\n\n\n<p><code>source venv\/bin\/activate<\/code><\/p>\n\n\n\n<p>This is about the simplest use of videogrep, it can do much more interesting and complex things. <\/p>\n\n\n\n<p><\/p>\n\n\n<ol class=\"wp-block-footnotes has-small-font-size\"><li id=\"9b213888-f702-44ee-8a7f-0c25db41252f\">I am retired, it is raining &amp; Alan mentioned it might be a good idea. <a href=\"#9b213888-f702-44ee-8a7f-0c25db41252f-link\" aria-label=\"Jump to footnote reference 1\">\u21a9\ufe0e<\/a><\/li><li id=\"17679d24-4cac-413e-a6d9-9e10c3a16d0f\">I assume you have installed yt-dlp, <a href=\"https:\/\/github.com\/yt-dlp\/yt-dlp?tab=readme-ov-file#post-processing-options\">GitHub &#8211; yt-dlp\/yt-dlp: A feature-rich command-line audio\/video downloader<\/a>. As I use a Mac I use homebrew to install this some other command line tools. This might feel as if things are getting complicated. I think that is because it is. <a href=\"#17679d24-4cac-413e-a6d9-9e10c3a16d0f-link\" aria-label=\"Jump to footnote reference 2\">\u21a9\ufe0e<\/a><\/li><\/ol>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve followed the #ds106 daily create for quite a few years now. The other day the invite was to use PlayPhrase PlayPhrase will assemble a clip of movie scenes all having the same phrase, a small supercut if you will. The results are slick and amusing. I remember creating a few Supercuts using the amazing [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":20836,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"mf2_syndication":[],"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"webmentions_disabled_pings":false,"webmentions_disabled":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"[{\"content\":\"I am retired, it is raining &amp; Alan mentioned it might be a good idea.\",\"id\":\"9b213888-f702-44ee-8a7f-0c25db41252f\"},{\"content\":\"I assume you have installed yt-dlp, <a href=\\\"https:\/\/github.com\/yt-dlp\/yt-dlp?tab=readme-ov-file#post-processing-options\\\">GitHub - yt-dlp\/yt-dlp: A feature-rich command-line audio\/video downloader<\/a>. As I use a Mac I use homebrew to install this some other command line tools. This might feel as if things are getting complicated. I think that is because it is.\",\"id\":\"17679d24-4cac-413e-a6d9-9e10c3a16d0f\"}]"},"categories":[27],"tags":[443,485,80,1488],"post_format":[],"class_list":{"0":"post-20826","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-ds106","8":"tag-bash","9":"tag-ds106","10":"tag-fun","11":"tag-videogrep","12":"kind-article","14":"h-entry","15":"hentry"},"better_featured_image":{"id":20836,"alt_text":"A gif of the terminal running videogrep","caption":"","description":"","media_type":"image","media_details":{"width":1280,"height":580,"file":"2025\/07\/videogrep.gif","filesize":265669,"sizes":{"medium":{"file":"videogrep-620x281.gif","width":620,"height":281,"mime-type":"image\/gif","filesize":4961,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2025\/07\/videogrep-620x281.gif"},"large":{"file":"videogrep-1024x464.gif","width":1024,"height":464,"mime-type":"image\/gif","filesize":9466,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2025\/07\/videogrep-1024x464.gif"},"thumbnail":{"file":"videogrep-150x150.gif","width":150,"height":150,"mime-type":"image\/gif","filesize":1580,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2025\/07\/videogrep-150x150.gif"},"medium_large":{"file":"videogrep-768x348.gif","width":768,"height":348,"mime-type":"image\/gif","filesize":6685,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2025\/07\/videogrep-768x348.gif"},"post-thumbnail":{"file":"videogrep-668x303.gif","width":668,"height":303,"mime-type":"image\/gif","filesize":5262,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2025\/07\/videogrep-668x303.gif"},"sempress-image-post":{"file":"videogrep-668x303.gif","width":668,"height":303,"mime-type":"image\/gif","filesize":5262,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2025\/07\/videogrep-668x303.gif"},"rpwe-thumbnail":{"file":"videogrep-45x45.gif","width":45,"height":45,"mime-type":"image\/gif","filesize":254,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2025\/07\/videogrep-45x45.gif"},"jetpack-portfolio-admin-thumb":{"file":"videogrep-50x50.gif","width":50,"height":50,"mime-type":"image\/gif","filesize":371,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2025\/07\/videogrep-50x50.gif"}},"image_meta":{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":"","orientation":"0","keywords":[]}},"post":20826,"source_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2025\/07\/videogrep.gif"},"jetpack_featured_media_url":"https:\/\/johnjohnston.info\/blog\/wp-content\/uploads\/2025\/07\/videogrep.gif","jetpack_shortlink":"https:\/\/wp.me\/p57zFQ-5pU","jetpack_likes_enabled":false,"jetpack_sharing_enabled":true,"kind":false,"_links":{"self":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/20826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/comments?post=20826"}],"version-history":[{"count":10,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/20826\/revisions"}],"predecessor-version":[{"id":21611,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/20826\/revisions\/21611"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/media\/20836"}],"wp:attachment":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/media?parent=20826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/categories?post=20826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/tags?post=20826"},{"taxonomy":"post_format","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/post_format?post=20826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}