ViaThinkSoft CodeLib
Dieser Artikel befindet sich in der Kategorie:
CodeLib → Problemlösungen
On my Debian machine, I was trying to extract the audio track of a video file, and then convert it to MP3.
First of all, we must take care that we allow non-free packages on our package system.
Example: /etc/apt/sources.list with Debian Wheezy
Then, we need to install libmp3lame0. Run this code:
Now, the problems came.
After this was done, I tried following:
The result was "Unknown decoder 'libmp3lame'"
Then I tried this:
Running this command, I got thousands of error messages with the content "[mp3 @ 0x1c0dc40] Header missing . Error while decoding stream #0:1" .
Finally, I found a working code:
This finally worked, but a warning message reminds us that ffmpeg is obsolete, and instead, avconv should be used.
So, I gave it a last try:
And it worked!
This is really strange: avconv does require a specific order of the parameters, otherwise it will output bogus error messages. It might be probably a bug.
First of all, we must take care that we allow non-free packages on our package system.
Example: /etc/apt/sources.list with Debian Wheezy
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
deb http://ftp.de.debian.org/debian wheezy-updates main
deb-src http://ftp.de.debian.org/debian wheezy-updates main
deb http://ftp.de.debian.org/debian wheezy main contrib non-free
deb-src http://ftp.de.debian.org/debian wheezy main contrib non-free
Then, we need to install libmp3lame0. Run this code:
aptitude update
sudo aptitude install ffmpeg libmp3lame0 libav-tools
Now, the problems came.
After this was done, I tried following:
avconv -acodec libmp3lame -i "helloworld.webm" helloworld.mp3
The result was "Unknown decoder 'libmp3lame'"
Then I tried this:
avconv -acodec mp3 -i "helloworld.webm" helloworld.mp3
Running this command, I got thousands of error messages with the content "[mp3 @ 0x1c0dc40] Header missing . Error while decoding stream #0:1" .
Finally, I found a working code:
ffmpeg -i helloworld.webm -vn -acodec libmp3lame helloworld.mp3
This finally worked, but a warning message reminds us that ffmpeg is obsolete, and instead, avconv should be used.
So, I gave it a last try:
avconv -i helloworld.webm -acodec libmp3lame helloworld.mp3
And it worked!
This is really strange: avconv does require a specific order of the parameters, otherwise it will output bogus error messages. It might be probably a bug.
Daniel Marschall
ViaThinkSoft Mitbegründer
ViaThinkSoft Mitbegründer