Extract audio: Difference between revisions
No edit summary |
m Text replacement - "<(\/?)source" to "<$1syntaxhighlight" |
||
| Line 5: | Line 5: | ||
The [[Video Editing]] article gives some examples for using mencoder and ffmpeg, but in this case I found using ffmpeg on the command line was the easiest tool after some initial trial and error. I was surprised to find out that Avidemux didn't just do what I wanted. With Avidemux, I tried 'save audio' which produced a relatively large file, that didn't play in anything. I ran ffmpeg -i on it, and it reported "unknown format" | The [[Video Editing]] article gives some examples for using mencoder and ffmpeg, but in this case I found using ffmpeg on the command line was the easiest tool after some initial trial and error. I was surprised to find out that Avidemux didn't just do what I wanted. With Avidemux, I tried 'save audio' which produced a relatively large file, that didn't play in anything. I ran ffmpeg -i on it, and it reported "unknown format" | ||
< | <syntaxhighlight lang="bash"> | ||
# try mplayer, but it did not work | # try mplayer, but it did not work | ||
mplayer -dumpaudio VID00001.AVI -dumpfile molin-5th-grade-xmas-concert.mp3 | mplayer -dumpaudio VID00001.AVI -dumpfile molin-5th-grade-xmas-concert.mp3 | ||
| Line 24: | Line 24: | ||
# let ffmpeg figure out what I want (WORKED) | # let ffmpeg figure out what I want (WORKED) | ||
ffmpeg -i VID00001.AVI -vn molin-5th-grade-xmas-concert.mp3 | ffmpeg -i VID00001.AVI -vn molin-5th-grade-xmas-concert.mp3 | ||
</ | </syntaxhighlight> | ||
http://soundconverter.berlios.de/header.png | http://soundconverter.berlios.de/header.png | ||
| Line 33: | Line 33: | ||
== Download YouTube Videos == | == Download YouTube Videos == | ||
See https://github.com/rg3/youtube-dl/ | See https://github.com/rg3/youtube-dl/ | ||
< | <syntaxhighlight lang="bash">sudo pip install -U youtube-dl</syntaxhighlight> will give you a YouTube downloader that can do a lot of things, including extract the audio portion (relying on ffmpeg) | ||
recipe: | recipe: | ||
< | <syntaxhighlight lang="bash"> | ||
musicdir=/share/CACHEDEV1_DATA/Multimedia/music | musicdir=/share/CACHEDEV1_DATA/Multimedia/music | ||
videodir=/share/CACHEDEV1_DATA/Multimedia/video | videodir=/share/CACHEDEV1_DATA/Multimedia/video | ||
| Line 44: | Line 44: | ||
scp Dave\ Matthews\ Band\ -\ You\ \&\ Me-kD9CrZODlNA.m4a admin@qnap:$musicdir'/Dave\ Matthews\ Band/You\ And\ Me.m4a' | scp Dave\ Matthews\ Band\ -\ You\ \&\ Me-kD9CrZODlNA.m4a admin@qnap:$musicdir'/Dave\ Matthews\ Band/You\ And\ Me.m4a' | ||
scp Dave\ Matthews\ Band\ -\ You\ \&\ Me-kD9CrZODlNA.mp4 admin@qnap:$videodir'/You\ And\ Me.mp4' | scp Dave\ Matthews\ Band\ -\ You\ \&\ Me-kD9CrZODlNA.mp4 admin@qnap:$videodir'/You\ And\ Me.mp4' | ||
</ | </syntaxhighlight> | ||
[[Category:Multimedia]] | [[Category:Multimedia]] | ||
[[Category:Music]] | [[Category:Music]] | ||