YouTube

From Indie IT Wiki

How to Get an RSS Feed for a YouTube Channel

Copy and paste the Channel ID to the end of this url. For example...

HBO = https://www.youtube.com/channel/UCVTQuK2CaWaTgSsoNkn5AiQ

So, the RSS Feed would be...

HBO = https://www.youtube.com/feeds/videos.xml?channel_id=UCVTQuK2CaWaTgSsoNkn5AiQ

Thanks

Wealth Statistics on YouTubers

https://socialblade.com/youtube/user/marquesbrownlee

HOWTO:

Dark Mode

https://www.youtube.com/new

Change To HTML5 Instead Of Flash

https://www.youtube.com/html5

Downloading

In the browser add 'ss' (without the quotes) after www. For example:

www.ssyoutube.com/a-video

Press enter and you will be directed to:

savefrom.net

You will then be presented with the option to download the video in various qualities and formats.

Downloading using youtube-dl (Linux)

Small command-line program to download videos from YouTube.com and other video sites.

NEW VERSION - fixes YT goalpost moving!

https://github.com/yt-dlp/yt-dlp

sudo -H python3 -m pip install --force-reinstall https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz

Your config is now in ~/yt-dlp.conf

# 1080p and best audio
-f bestvideo[height<=?1080]+bestaudio/best
# merge as mkv
--merge-output-format mkv

OLD

http://rg3.github.io/youtube-dl/

https://github.com/rg3/youtube-dl#configuration

sudo -H pip install --upgrade youtube_dl
youtube-dl --version
youtube-dl --help

Download just the audio from a web site...

youtube-dl --extract-audio --audio-format mp3 --audio-quality 0 https://soundcloud.com/band/link-to-song

Download and stream a youtube video to mplayer...

youtube-dl -o- "https://www.youtube.com/watch?v=1giVzxyoclE" | mplayer -

To select a different video resolution...

youtube-dl -F https://www.youtube.com/watch?v=HOqt8NDZHgI

[youtube] HOqt8NDZHgI: Downloading webpage
[youtube] HOqt8NDZHgI: Downloading video info webpage
[youtube] HOqt8NDZHgI: Extracting video information
[youtube] HOqt8NDZHgI: Downloading MPD manifest
[info] Available formats for HOqt8NDZHgI:
format code  extension  resolution note
249          webm       audio only DASH audio   45k , opus @ 50k (48000Hz), 191.35KiB
250          webm       audio only DASH audio   51k , opus @ 70k (48000Hz), 210.25KiB
171          webm       audio only DASH audio   81k , vorbis@128k (44100Hz), 332.05KiB
251          webm       audio only DASH audio   93k , opus @160k (48000Hz), 382.95KiB
140          m4a        audio only DASH audio  127k , m4a_dash container, mp4a.40.2@128k (44100Hz), 716.26KiB
278          webm       256x144    DASH video  101k , webm container, vp9, 24fps, video only, 440.55KiB
160          mp4        256x144    DASH video  116k , avc1.4d400c, 24fps, video only, 550.42KiB
242          webm       426x240    DASH video  238k , vp9, 24fps, video only, 848.43KiB
133          mp4        426x240    DASH video  252k , avc1.4d4015, 24fps, video only, 1.18MiB
243          webm       640x360    DASH video  409k , vp9, 24fps, video only, 1.56MiB
134          mp4        640x360    DASH video  645k , avc1.4d401e, 24fps, video only, 2.40MiB
244          webm       854x480    DASH video  769k , vp9, 24fps, video only, 2.93MiB
135          mp4        854x480    DASH video 1192k , avc1.4d401e, 24fps, video only, 4.44MiB
247          webm       1280x720   DASH video 1513k , vp9, 24fps, video only, 5.96MiB
136          mp4        1280x720   DASH video 2378k , avc1.4d401f, 24fps, video only, 8.79MiB
248          webm       1920x1080  DASH video 2773k , vp9, 24fps, video only, 10.74MiB
137          mp4        1920x1080  DASH video 4379k , avc1.640028, 24fps, video only, 16.21MiB
17           3gp        176x144    small , mp4v.20.3,  mp4a.40.2@ 24k
36           3gp        320x180    small , mp4v.20.3,  mp4a.40.2
43           webm       640x360    medium , vp8.0,  vorbis@128k
18           mp4        640x360    medium , avc1.42001E,  mp4a.40.2@ 96k
22           mp4        1280x720   hd720 , avc1.64001F,  mp4a.40.2@192k (best)

Thanks - http://askubuntu.com/questions/486297/how-to-select-video-quality-from-youtube-dl

Downloading a Livestream

youtube-dl --quiet --no-part "https://www.youtube.com/watch?v=4nZhhSxULFk"

Then press CTRL+C _once_ and wait.

You will then get the file in MP4 format, e.g.

Queen lying in state - Live stream from Westminster Hall 2022-09-16 08_54-4nZhhSxULFk.mp4

FFMPEG YouTube Extract X Minutes

Adjust the -t parameter to your liking...

ffmpeg $(youtube-dl -g -f 18 'https://www.youtube.com/watch?v=vxiSb_Q6KNc' | sed "s/.*/-ss 00:05 -i &/") -t 01:00 -c copy out.mkv

MPlayer YouTube Shell Script

mplayer -fs -cookies -cookies-file /tmp/cookie.txt $(youtube-dl -g --cookies /tmp/cookie.txt "http://www.youtube.com/watch?v=PTOSvEX-YeY")

http://wiki.multimedia.cx/index.php?title=MPlayer_youtube_script

Random

https://random-ize.com/random-youtube/

https://www.ytroulette.com/