There is a multitude of browser add-ons and extensions available for downloading YouTube videos or converting to mp3 that are usually somewhat obscure, but there is actually nothing more needed than the popular VLC player. Here is how!
In our HowTo download “Mediathek” features for archival purposes we looked into how to download features from your typical German public broadcasting Mediathek.
We might want a similar solution to YouTube for having media
available offline, e.g. for live presentations when internet service
cannot be guaranteed.
Regrettably the same trick is not working for YouTube. Naturally, there
is a multitude of browser add-ons and extensions available for
downloading YouTube videos that might range from deprecated to outright
malicious, but are usually somewhat obscure.
But, as of writing this, there is actually nothing more needed than
the popular VLC player↗.
VLC is a feature packed, free and open source cross-platform multimedia
player and framework that plays virtually all multimedia files as well
as DVDs, Audio CDs, VCDs, and various streaming protocols.
Download here, as this is what we will use: https://www.videolan.org
VLC does not only play music or videos from disk, but is also a
complete software solution for video streaming that can be used to
capture and transcode media streams, such as YouTube videos!
For information, also on the command line options see the documentation
here: https://wiki.videolan.org/Documentation:Streaming_HowTo_New/
For the most straight forward approach we will go as follows:
curl
$ curl "your_copied_Codec-URL_here" -o YT.mp4
Similar to the above, we can use the Codec-URL to download only the Audio of the video, though not by niftily extracting the original audio stream, but simply by transcoding↗, which means some quality loss of course.
For downloading a MP3 off YouTube follow the steps 1-6 from above, then instead of pasting the Codec-URL back into the browser, paste the link back into VLC and instead of play we choose to Convert:
The same procedures can be used to play, download or convert
M3U streams (or other) directly in VLC.
M3U files are basically a type of playlist, where the location of each
item on the playlist is placed on a new line, and which are widely used
by (German) public broadcasting for streams, instead the of un-split mp3
or mp4 files we could find otherwise in the Mediathek.
For that, simply download the m3u TXT file to local or paste the m3u’s
link into the network URL again (via Ctrl +
N) and follow the steps given under //
Download audio from YouTube with VLC above.
For DASH
(Dynamic Adaptive Streaming over HTTP) and its related
.m4s media segment files, one has to identify the
initialization segment, like
pc_hd_abr_v2_nonuk_dash_master.mpd in BBC’s radio
programmes. Conversion again follows the steps above.
For attribution, please cite this work as
Schmalfuss (2018, May 5). OS DataMercs: download YouTube (videos | mp3) without browser extension using only VLC. Retrieved from https://www.datamercs.net/posts/2018-05-05-download-youtube-using-only-vlc/
BibTeX citation
@misc{schmalfuss2018download, author = {Schmalfuss, Olaf}, title = {OS DataMercs: download YouTube (videos | mp3) without browser extension using only VLC}, url = {https://www.datamercs.net/posts/2018-05-05-download-youtube-using-only-vlc/}, year = {2018} }