How to grab content from youtube for offline listening

You don't need to have premium plan

In case you are interested on listening your favourite podcasts without generating LTE/wireless traffic, when commuting or taking a rest.

Prerequisites

  • Download and install ffmpeg
  • Configure environmental variables so the ffmpeg and yt-dlp are directly available for your convinience
$env:PATH

Howto

This can be used for youtube, but also for other network streams, provided you know the path of the media stream, which can quite easily be identified with developer tools comming from the web browser.

Where to find some usefull details

Saving video as mp3 file

yt-dlp -f 'ba' -x --audio-format mp3 'https://www.youtube.com/watch?v=tJx7LbH_GwE'  -o '%(id)s.%(ext)s'
yt-dlp -f 'ba' -x --audio-format mp3 'https://www.youtube.com/watch?v=SWnfGJ36gpQ&list=PLuF78wm0RiGbo4vZ2eqgicrKkZDq3BCkH' -o '%(title)s.%(ext)s' 
yt-dlp -f 'ba' -x --audio-format mp3 'https://www.youtube.com/watch?v=SWnfGJ36gpQ&list=PLuF78wm0RiGbo4vZ2eqgicrKkZDq3BCkH' -o '%(channel_id)s/%(playlist_id)s/%(title)s.%(ext)s'
yt-dlp -f 'ba' -x --audio-format mp3 'https://www.youtube.com/watch?v=SWnfGJ36gpQ&list=PLuF78wm0RiGbo4vZ2eqgicrKkZDq3BCkH' -o '%(channel_id)s/%(playlist_id)s/%(id)s.%(title)s.%(ext)s'

How to rename multiple files with Total Commander

Alternative way of reaching similar result

Summary

If your device supports the communication over ethernet through the wire with the use of microUsb/usb-c or Iphone lightning to RJ45, then you are closer to get rid of wireless traffic, never the less up to my knowledge, not all devices can do this. That’s it.

Last update: 2022.04.09

Tags: Audio Misc
Share: X (Twitter) LinkedIn