{"id":10905,"date":"2022-10-25T14:10:29","date_gmt":"2022-10-25T18:10:29","guid":{"rendered":"https:\/\/irreal.org\/blog\/?p=10905"},"modified":"2022-10-25T14:10:29","modified_gmt":"2022-10-25T18:10:29","slug":"playing-youtube-videos-in-emacs","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=10905","title":{"rendered":"Playing YouTube Videos in Emacs"},"content":{"rendered":"<p>Marcin Borkowski often watches long YouTube videos (frequently lectures) and sometimes can\u2019t watch the whole thing in a single sitting. A couple of weeks ago, he wrote a post about <a href=\"http:\/\/mbork.pl\/2022-10-10_Adding_timestamps_to_youtube_links\">capturing the elapsed play time where he left off<\/a> and adding it to a link to the video that he maintained within Org-mode. That way when he followed the link, the video would start where he left off.<\/p>\n<p>He\u2019s discovered what he describes as a \u201c<a href=\"http:\/\/mbork.pl\/2022-10-24_Playing_videos_from_the_last_position_in_mpv\">much much better solution<\/a>\u201d to the problem. And it really is. He leverages a <a href=\"https:\/\/github.com\/yt-dlp\/yt-dlp\">youtube-dl fork<\/a> and <a href=\"https:\/\/mpv.io\/\">mpv<\/a> to play YouTube videos directly from Emacs. That\u2019s already pretty nice but <code>mpv<\/code> can also remember where you left off so that you don\u2019t need anything fancy to help you remember. There are a couple of ways of doing that so be sure to check out Borkowski\u2019s post for the details.<\/p>\n<p>Oddly, the code to do all this is simpler and shorter than the code to capture the time and add it to a link. If you want to store links to YouTube videos for later watching and be able to remember how much you\u2019ve watched, this is a great solution.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Marcin Borkowski often watches long YouTube videos (frequently lectures) and sometimes can\u2019t watch the whole thing in a single sitting. A couple of weeks ago, he wrote a post about capturing the elapsed play time where he left off and &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=10905\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[18,4],"class_list":["post-10905","post","type-post","status-publish","format-standard","hentry","category-general","tag-emacs","tag-org-mode"],"_links":{"self":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10905","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10905"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10905\/revisions"}],"predecessor-version":[{"id":10906,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/10905\/revisions\/10906"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10905"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10905"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}