Skip to content

Instantly share code, notes, and snippets.

View darktef's full-sized avatar
🐳
Hacking

Lin Yang darktef

🐳
Hacking
View GitHub Profile
@darktef
darktef / gist:dc39f10d2b99d4ba774d81cb0368bb3f
Created September 23, 2016 04:14
Fish - ffmpeg - Convert webm to mp3
for i in (find . -type f -iname "*.webm")
set int (string trim -l -c=./ $i)
set name (string trim -r -c=.webm $int)
echo $name
ffmpeg -i $i -vn -acodec libmp3lame -q:a 2 $name.mp3
end
@darktef
darktef / gist:69dff2055c0614bdf592d3bd04e0e7ac
Last active March 11, 2017 20:54
Fish - youtube-dl - Download playlist in
youtube-dl -f bestaudio -o 'The_Sounds_of_the_Monterey_Bay/%(playlist_index)s - %(title)s.%(ext)s' 'https://www.youtube.com/watch?v=oBik31cwRbY&list=PLUSRfoOcUe4aw6JiTXbwUET_wdQ1bnyoo'
## Download playlist in separate folder, audio only
youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' -o '%(playlist_index)s-%(title)s.%(ext)s' 'https://www.youtube.com/playlist?list=PL4BBB74C7D2A1049C'
## Download playlist with best quality
@darktef
darktef / gist:53db9956a9172377f37ae488d8511809
Created September 23, 2016 03:43
Fish - ffmpeg&lame - convert m4a to mp3
for f in *.m4a
set name (string trim --right --chars=.m4a $f)
echo $name
ffmpeg -i $f -acodec libmp3lame -b:a 320k $name.mp3
end