Posted: . At: 7:38 AM. This was 5 years ago. Post ID: 13274
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.



Sponsored



How to play a Youtube video with MPV and skip to a certain section.


Playing a Youtube video with mpv is very easy, it is also possible to skip to a certain part of the video whenever you wish.

Make sure that you have the latest version of Youtube-dl first.

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/bin/youtube-dl

Then run this command, and it should work fine.

mpv --start=56:00 https://www.youtube.com/watch?v=ZE3kTCyqPik

This starts playback at 00:56 minutes and works great. youtube-dl must be updated for this to work properly. Otherwise, you will get the error shown below.

.4 Thu May 23 jason@Yog-Sothoth 0: $ mpv --start=45:00 https://www.youtube.com/watch?v=ZE3kTCyqPik
Playing: https://www.youtube.com/watch?v=ZE3kTCyqPik
[ytdl_hook] ERROR: ZE3kTCyqPik: "token" parameter not in video info for unknown reason; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[ytdl_hook] youtube-dl failed, trying to play URL directly ... 
Failed to recognize file format.
 
 
Exiting... (Errors when loading file)

This is very useful for skipping ahead in a long video, it just requires a youtube-dl update to fix the playback issue. And then you are all set.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.