Du bist hier:Start»Linux»Musik

Kostenlose Musik unter Linux

Musikvideos von YouTube, Dailymotion, MyVideo herunterladen

Clipgrab ist ein Programm, das Musikvideos von YouTube, Dailymotion, MyVideo und einigen anderen Videodiensten herunterladen kann.

screenshot of clipgrab

Nachdem das Video heruntergeladen wurde, kann mit ffmpeg die Musik aus dem Video herausgefiltert werden. Die folgenden Kommandozeilen zeigen, wie das unter Linux funktioniert.

# you might need to install libqtwebkit:
apt-get install libqtwebkit-dev

# export another directory than /tmp as temporary directory
export TMPDIR=/otherTemporaryDirectory/

# run clipgrab
./ClipGrab-3.7.0-x86_64.AppImage

# download your file via URL

# get the music from the downloaded Flash video
videoFile="downloadedFile.flv"
ffmpeg -i "$videoFile" -vn -acodec copy music.aac

# check music.aac
file music.aac

# split the music file into chunks of 10 minutes in case that it is too large
for index in $(seq 0 12);do
  echo $index; ffmpeg -i input.aac -ss $(expr $index \* 600) -t 600 -acodec copy output_$(printf "%02i" $index).aac;
done

# create a playlist file
ls -1 output_*aac > playlist.m3u

AAC bedeutet Advanced Audio Coding. Der file-Befehl am Ende zeigt an, ob music.aac tatsächlich eine .aac-Datei ist. Wenn nicht, dann sollte die Datei music.aac in die entsprechende Dateiendung umbenannt werden.

Verwandte Themen: Musikerkennung unter Linux mit Shazam, Webradio unter Linux