Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
--audio-format=mp3 leads to encoder failure #302
Comments
|
What about your ffmpeg version and available modules? |
|
I just found out that ffmpeg isn't linked against lame. I rebuilt it with lame support and everything works as expected. |
|
`youtube-dl -o '%(stitle)s' --extract-audio --audio-format=libmp3lame http://www.youtube.com/watch?v=3XBN72tQEvk youtube-dl: error: invalid audio format specified |
|
|
|
Also, in the |
|
@g2g I doubt this will work on Debian. I have Debian myself, and libavcodec-extra-53 will only provide the following (quoting):This package is a replacement for the regular libavcodec53 library package; it contains the following additional codecs:
* Android VisualOn Adaptive Multi-Rate (AMR) Wide-Band (Encoder)So on Debian you will neither win nor lose anything. Your method, however, works fine on Ubuntu where the extra package actually does contain the mp3 codecs. |
|
In case relevant, I'm running youtube-dl on a heroku django app. This works for me to run on heroku server: (1) in heroku config
See http://blog.pogoapp.com/youtube-mp3-with-node-js-and-ffmpeg/ for instructions (2) in a file called .buildpacks (this sits in root, alongside files like .env and requirements.txt)
That's also from http://blog.pogoapp.com/youtube-mp3-with-node-js-and-ffmpeg/ for instructions (3) in requirements.txt
Adding that ffprobe explicitly solved all mp3 codec errors Now when I run heroku run bash: .....$ heroku run bash
Running `bash` attached to terminal... up, run.4970
~ $ ffprobe
ffprobe version git-2013-08-02-b3f858b Copyright (c) 2007-2013 the FFmpeg developers
built on Aug 2 2013 01:49:41 with gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1)
configuration: --enable-shared --enable-gpl --enable-libmp3lame --enable-avfilter --disable-asm --prefix=/app/vendor/ffmpeg --extra-cflags='-I/app/vendor/x264/include -I/app/vendor/mp3lame/include' --extra-ldflags='-L/app/vendor/x264/lib -L/app/vendor/mp3lame/lib'
libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 19.100 / 55. 19.100
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 82.100 / 3. 82.100
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100
Simple multimedia streams analyzer
usage: ffprobe [OPTIONS] [INPUT_FILE]
You have to specify one input file.
Use -h to get full help or, even better, run 'man ffprobe'.
~ $ ffmpeg
ffmpeg version git-2013-08-02-b3f858b Copyright (c) 2000-2013 the FFmpeg developers
built on Aug 2 2013 01:49:41 with gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1)
configuration: --enable-shared --enable-gpl --enable-libmp3lame --enable-avfilter --disable-asm --prefix=/app/vendor/ffmpeg --extra-cflags='-I/app/vendor/x264/include -I/app/vendor/mp3lame/include' --extra-ldflags='-L/app/vendor/x264/lib -L/app/vendor/mp3lame/lib'
libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 19.100 / 55. 19.100
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 82.100 / 3. 82.100
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.103 / 0. 17.103
libpostproc 52. 3.100 / 52. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
~ $ |
|
Oh, what an old issue. --audio-format=mp3 works perfectly here now on Lubuntu (I've moved away from Debian since, but thanks for the trip down memory lane LOL) |
I have been trying to use --audio-format=mp3 in order to create an mp3 from various youtube videos with the following result:
And a different one:
$ youtube-dl -v --extract-audio -t --audio-format=mp3 --console-title "https://www.youtube.com/watch?v=r0E-0ntoNWo" [debug] Proxy map: {} [youtube] Setting language [youtube] r0E-0ntoNWo: Downloading video webpage [youtube] r0E-0ntoNWo: Downloading video info webpage [youtube] r0E-0ntoNWo: Extracting video information [download] Resuming download at byte 5241856 [download] Destination: Mocha_in_His_First_Broccoli-r0E-0ntoNWo.flv [download] 100.0% of 7.35M at 6.10M/s ETA 00:00 [ffmpeg] Destination: Mocha_in_His_First_Broccoli-r0E-0ntoNWo.mp3 ERROR: audio conversion failed: Unknown encoder 'libmp3lame'mp3lame is installed:
Using the default format works fine:
$ youtube-dl -v --extract-audio -t --console-title "https://www.youtube.com/watch?v=r0E-0ntoNWo" [debug] Proxy map: {} [youtube] Setting language [youtube] r0E-0ntoNWo: Downloading video webpage [youtube] r0E-0ntoNWo: Downloading video info webpage [youtube] r0E-0ntoNWo: Extracting video information [download] Mocha_in_His_First_Broccoli-r0E-0ntoNWo.flv has already been downloaded [ffmpeg] Destination: Mocha_in_His_First_Broccoli-r0E-0ntoNWo.aacI am using:
FreeBSD 9.0 amd64
lame-3.99.4
youtube_dl-2012.02.27
python27-2.7.2_4