Archive

Posts Tagged ‘youtube’

download a YouTube playlist for offline view and keep the videos numbered

Problem
You want to download a YouTube playlist. youtube-dl can do that, fine. However, if the playlist contains the videos in chronological order, then you may want to watch them offline in the same order too. On YouTube, the videos are ordered and they are also numbered, but if you download them with youtube-dl, you lose the numbers and you lose the original order.

Solution
Good news: youtube-dl has a command-line option for this. When downloading a playlist, I use the following Bash script:

#!/usr/bin/env bash

URL="https://www.youtube.com/playlist?list=<playlist_id_here>"

youtube-dl -o "%(playlist_index)s - %(title)s.%(ext)s" \
           --ignore-errors \
           --download-archive downloaded.txt \
           -f 22 \
           "$URL"

It’ll download the videos in .mp4 format (that’s format 22).

Categories: bash Tags: ,

How to loop a YouTube video?

December 17, 2018 Leave a comment

Problem
You have a favorite song and you want to listen to it in a loop.

Solution
Right click on the video and select “Loop”.

Introduction to Linux

September 23, 2017 Leave a comment

I want to start a new video series entitled “Introduction to Linux”. It is intended for beginners who never (or not much) used Linux before. So far I have one video, but I plan to add more videos in the future. I will update this post with the new videos.

Complete playlist: here.

Videos in the series:

Categories: linux, ubuntu Tags: ,

download with youtube-dl

June 20, 2017 Leave a comment

For downloading a YouTube playlist, or for downloading all the videos of a YouTube user, I use this script:

URL="https://..."    # youtube user / playlist

youtube-dl --ignore-errors --download-archive downloaded.txt -f 22 "$URL"

The videos will be saved in .mp4 format. You can stop the script and re-run it later. The already saved videos are stored in downloaded.txt and they will be skipped if you re-run the script.

Categories: bash Tags: ,

loop a youtube video

January 28, 2017 Leave a comment

Problem
You find an awesome music video and you want to play it in an infinite loop.

Solution
You need to re-format the youtube URL a bit. Sample:

Input: https://www.youtube.com/watch?v=VIDEO_ID

Output: http://www.youtube.com/v/VIDEO_ID?version=3&loop=1&playlist=VIDEO_ID

Concrete example: input, output.

Tip from here.

YouTube video to text

September 28, 2015 Leave a comment

turn off annoying YouTube annotations

August 9, 2015 Leave a comment

Problem
YouTube annotations are driving you crazy.

Solution
Turn ’em off for good. Follow these simple steps: http://www.businessinsider.com/turn-off-youtube-annotations-for-good-2014-8 .

Categories: tips Tags: , ,