Youtube2Audio: Difference between revisions

From JoBaPedia
Jump to navigation Jump to search
(Created page with "= Youtube to Audio = Download youtube-dl or update to latest (-U) Commands for DL a playlist mkdir artist cd artist youtube-dl ... 'playlist-url' Commands for adding me...")
 
No edit summary
Line 1: Line 1:
= Youtube to Audio =
= Youtube to Audio =


Download youtube-dl or update to latest (-U)
Download youtube-dl or update to latest
 
sudo youtube-dl -U


Commands for DL a playlist
Commands for DL a playlist
Line 7: Line 9:
  mkdir artist
  mkdir artist
  cd artist
  cd artist
  youtube-dl ... 'playlist-url'
  youtube-dl --extract-audio --keep-video --embed-thumbnail 'playlist-url'


Commands for adding metadata (will need adapting to actual yt titles)
Commands for adding metadata (will need adapting to actual yt titles)

Revision as of 16:08, 31 May 2020

Youtube to Audio

Download youtube-dl or update to latest

sudo youtube-dl -U

Commands for DL a playlist

mkdir artist
cd artist
youtube-dl --extract-audio --keep-video --embed-thumbnail 'playlist-url'

Commands for adding metadata (will need adapting to actual yt titles)

mkdir meta
find . -name '*.opus' -print | while read f; do
  t=${f%-???????????.opus}
  t=${t/Roger Waters - /}
  t=${t#*/}
  a=${t%/*}
  t=${t#*/}
  echo "<$a><$t>"
  mkdir -p "meta/$a"
  ffmpeg -i "$f" -acodec copy -metadata title="$t" -metadata artist="Roger Waters" -metadata album="$a" "meta/$a/$t.opus"
done