{"id":2667,"date":"2021-06-19T07:57:54","date_gmt":"2021-06-18T22:57:54","guid":{"rendered":"https:\/\/www.codedojo.com\/?p=2667"},"modified":"2022-12-22T09:09:02","modified_gmt":"2022-12-22T00:09:02","slug":"subfish-search-youtube-channels-for-spoken-words","status":"publish","type":"post","link":"https:\/\/www.codedojo.com\/?p=2667","title":{"rendered":"Subfish:  Search youtube channels for spoken words, export clips to Premiere\/DaVinci Resolve timeline"},"content":{"rendered":"\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<iframe loading=\"lazy\" title=\"Subfish: Search youtube channels for spoken words, export clips to Premiere\/DaVinci Resolve timeline\" width=\"625\" height=\"352\" src=\"https:\/\/www.youtube.com\/embed\/ZVyVGAyNtDc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Features:<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Download all subtitles from a channel or playlist<\/li>\n\n\n\n<li>Search subtitles for keywords (regex supported)<\/li>\n\n\n\n<li>Export video timeline of all found clips as .EDL for Premiere or DaVinci Resolve<\/li>\n\n\n\n<li>Will notify you on startup if a newer version is available<\/li>\n\n\n\n<li>Full <a href=\"https:\/\/github.com\/SethRobinson\/Subfish\"><strong>source code on github<\/strong><\/a> so feel free to submit patches, <a href=\"https:\/\/github.com\/SethRobinson\/Subfish\/discussions\">report bugs or make feature requests<\/a>.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-medium\"><a href=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/subfish_edl_export.png\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"188\" src=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/subfish_edl_export-300x188.png\" alt=\"\" class=\"wp-image-2717\" srcset=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/subfish_edl_export-300x188.png 300w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/subfish_edl_export-1024x641.png 1024w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/subfish_edl_export-768x480.png 768w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/subfish_edl_export-1536x961.png 1536w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/subfish_edl_export-624x390.png 624w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/subfish_edl_export.png 1584w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption class=\"wp-element-caption\">Exporting found clips to a Premiere\/Resolve timeline<\/figcaption><\/figure>\n\n\n\n<p>Here&#8217;s an example of exporting a lot of clips at once based on finding a single word and using Resolve&#8217;s scripting to automatically add the count, date, and youtube video title each clip is from.  (the only &#8220;work&#8221; I had to do was hand nudge the clips forward and back a little so only the correct word was heard instead of a few seconds before and after as well)<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-twitter wp-block-embed-twitter\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"twitter-tweet\" data-width=\"550\" data-dnt=\"true\"><p lang=\"en\" dir=\"ltr\">Released V1.07 of Subfish, it now works again after recent youtube changes.  BTW, Subfish&#39;s EDL export of certain words + Davinci Resolve scripting can do wacky things. Like what?  Well, here&#39;s the first 30 seconds of a test I did earlier with <a href=\"https:\/\/twitter.com\/lazygamereviews?ref_src=twsrc%5Etfw\">@lazygamereviews<\/a>&#39;s great channel <a href=\"https:\/\/t.co\/A7XcSVj9BZ\">pic.twitter.com\/A7XcSVj9BZ<\/a><\/p>&mdash; Seth A. Robinson (@rtsoft) <a href=\"https:\/\/twitter.com\/rtsoft\/status\/1505132891206217729?ref_src=twsrc%5Etfw\">March 19, 2022<\/a><\/blockquote><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n<\/div><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Download\/install instructions (Windows)<\/h1>\n\n\n\n<p>To run Subfish, you need to download some Windows libraries from Microsoft first because I&#8217;m too lazy to make an installer for now. Requires Windows 7 or newer.<\/p>\n\n\n\n<p><strong>1. Install the .NET 5.0 Desktop Runtime. <\/strong>(Windows version is&nbsp;<a href=\"https:\/\/dotnet.microsoft.com\/download\">here<\/a>)<\/p>\n\n\n\n<p><strong>2. Install the WebView2 runtime<\/strong> (<a href=\"https:\/\/developer.microsoft.com\/en-us\/microsoft-edge\/webview2\/#download-section\">Try here, look for x64 version probably<\/a>).<\/p>\n\n\n\n<p><strong>3. Download&nbsp;<a href=\"https:\/\/rtsoft.com\/subfish\/SubfishWindows.zip\">the latest version of Subfish (in a zip)<\/a> for Windows.<\/strong> <\/p>\n\n\n\n<p>Inside the zip there is a folder called &#8220;Subfish&#8221;. Drag that folder onto your desktop (or somewhere) to extract it. Then enter it and run Subfish.exe. (The binaries are signed by RTsoft so Windows shouldn&#8217;t give you any trouble running it)<\/p>\n\n\n\n<figure class=\"wp-block-image size-medium\"><a href=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/subfish_screenshot.png\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"176\" src=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/subfish_screenshot-300x176.png\" alt=\"\" class=\"wp-image-2680\" srcset=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/subfish_screenshot-300x176.png 300w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/subfish_screenshot-1024x602.png 1024w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/subfish_screenshot-768x451.png 768w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/subfish_screenshot-1536x902.png 1536w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/subfish_screenshot-2048x1203.png 2048w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/subfish_screenshot-624x367.png 624w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption class=\"wp-element-caption\">An exciting screenshot<\/figcaption><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">Why I made this<\/h1>\n\n\n\n<p>Earlier I was doing some youtube research and needed to look through thousands of videos for spoken words.  While I did figure out a way to do it using <a href=\"https:\/\/github.com\/ytdl-org\/youtube-dl\">youtube-dl<\/a> and text scanning utilities, it was a clunky process and I couldn&#8217;t instantly jump to the exact spot in videos to preview video  without some shenanigans.  <br><br><em>&#8220;This is stupid, someone must have made a slick front end for this&#8230;&#8221;<\/em> and well, I couldn&#8217;t find one, so here we are.  As for the name, well, check out my other free utility <a href=\"https:\/\/www.rtsoft.com\/toolfish\">Toolfish<\/a>!<br><br>The timeline export options were actually added for a friend, but that&#8217;s pretty handy too.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Info &amp; Issues<\/h1>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Audio sync problem after importing the EDL timeline into DaVinci Resolve?<\/strong>  I think this is a Resolve bug when importing something that has clips with multiple internal timings.   No problem &#8211; I created a script to fix it, check the <strong>ScriptsForDaVinciResolve<\/strong> sub directory.  The readme.txt there explains how to copy FixTimelineSync.py into <strong>%PROGRAMDATA%\\Blackmagic Design\\DaVinci Resolve\\Fusion\\Scripts\\Comp<\/strong> so you can run <strong>Workspace-&gt;Scripts-&gt;Comp-&gt;FixTimelineSync<\/strong> in resolve.<\/p>\n\n\n\n<p><strong>Is there a way to automatically add date, video counter, video name etc on top of the videos in the exported timeline?<\/strong>  Yes, I&#8217;ve done it with DaVinci Resolve scripts, hoping to do a tutorial on that later as it&#8217;s kind of tricky.  The .json metadata we export with each video is useful for this.<\/p>\n\n\n\n<p><strong>It seems to stop after downloading around 4500 subtitles?<\/strong>  This seems to be a youtube limitation.   One trick is to download again in reverse order, so 9,000+ from a single channel is possible. I think with some changes to optimize youtube-dl I could have it &#8220;continue&#8221; pulling data in a much smarter way but I haven&#8217;t been bothered enough to try yet. (youtube-dl&#8217;s current date restriction options just don&#8217;t work for right for subtitles, it still checks every video in order)<\/p>\n\n\n\n<p><strong>I&#8217;m getting &#8220;This browser or app may not be secure.&#8221; when I try to login to my Google\/Youtube account in the preview window?! <\/strong> Yeah, I started getting that recently too.  Luckily it has nothing to do with the actual text\/video extraction process, but clip previewing tends to show google ads if not logged on.  I think you can fix this by <a href=\"https:\/\/support.google.com\/accounts\/answer\/6010255?hl=en#zippy=%2Cif-less-secure-app-access-is-off-for-your-account%2Cif-less-secure-app-access-is-on-for-your-account\">enabling &#8220;Less secure apps&#8221;<\/a> but I didn&#8217;t actually try it.<\/p>\n\n\n\n<p><strong>OSX\/Linux support?<\/strong>  Cross-compiling is a problem due to using WebView2 for now, so I guess that&#8217;s out. On a side note, in theory this does support Windows-10 ARM based devices too but I don&#8217;t have one to test with.<\/p>\n\n\n\n<p><strong>Privacy<\/strong> &#8211; On startup, Subfish visits www.rtsoft.com\/subfish\/checking_for_new_version.php?version=&lt;version #&gt; in its little web-browser thingie which will give a download link if a new version is out. That&#8217;s the only communication done with our servers.<\/p>\n\n\n\n<p><strong>Legal<\/strong> &#8211; Only use this product if it&#8217;s legal to do what you&#8217;re doing where you&#8217;re doing it. That&#8217;s probably good advice for life in general.<\/p>\n\n\n\n<p><strong>To report a bug or feature request<\/strong> &#8211; Post here, <a href=\"https:\/\/twitter.com\/rtsoft\">twitter<\/a>, or drop me an <a href=\"mailto:seth@rtsoft.com\">email<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"506\" height=\"285\" src=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/blog_thumb_506_285.jpg\" alt=\"\" class=\"wp-image-2668\" srcset=\"https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/blog_thumb_506_285.jpg 506w, https:\/\/www.codedojo.com\/wp-content\/uploads\/2021\/06\/blog_thumb_506_285-300x169.jpg 300w\" sizes=\"auto, (max-width: 506px) 100vw, 506px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Features: Here&#8217;s an example of exporting a lot of clips at once based on finding a single word and using Resolve&#8217;s scripting to automatically add the count, date, and youtube video title each clip is from. (the only &#8220;work&#8221; I had to do was hand nudge the clips forward and back a little so only [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[],"class_list":["post-2667","post","type-post","status-publish","format-standard","hentry","category-development","category-tech-tips"],"_links":{"self":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts\/2667","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2667"}],"version-history":[{"count":39,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts\/2667\/revisions"}],"predecessor-version":[{"id":3023,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=\/wp\/v2\/posts\/2667\/revisions\/3023"}],"wp:attachment":[{"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2667"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2667"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codedojo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2667"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}