Page 1 of 1

How to transcode YouTube mp4 audio to mp3 with ffmpeg?

Posted: Wed 15 Apr 2009, 18:39
by rubing
hey all,

here's a simple version of my dilemma (more elaborated below)

I want to uninstall ffmpeg and then reinstall it (manually compile) enabling libfaad, b/c I am trying to transcode mp4 files. How can I do this, since ffmpeg is not in puppy's package manager?


More details:

In case more details can help you solve my problem, here's the whole story:

I am downloading videos from youtube as mp4 files. you can do this by putting the word pwn in front of your youtube url (e.g. www.pwnyoutube.com/video_address_here)

Now, usually these are videos of lectures that I want to listen to in my mp3 player. So, I transode them using ffmpeg. This worked fine at my parent's house using ubuntu! The process is very easy with ffmpeg, just name the input and output files and disable video output with the -vn flag (e.g. ffmpeg -i in.mp4 -vn out.mp3)

Now, when I try to do this on puppy it does not work. And I receive the following error message:

# ffmpeg -i save-video.mp4 -vn out.mp3
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --prefix=/usr --libdir=/usr/lib --mandir=/usr/man --disable-debug --arch=i386 --enable-libmp3lame --enable-liba52 --enable-libogg --enable-libvorbis --enable-pthreads --enable-small --enable-gpl --enable-shared --enable-pp
libavutil version: 49.5.0
libavcodec version: 51.44.0
libavformat version: 51.14.0
built on Oct 23 2007 22:05:00, gcc: 4.2.2
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'save-video.mp4':
Duration: 00:03:25.9, start: 0.000000, bitrate: 623 kb/s
Stream #0.0(und): Audio: mp4a / 0x6134706D, 44100 Hz, stereo
Stream #0.1(und): Video: h264, yuv420p, 480x360, 29.97 fps(r)
Output #0, mp3, to 'out.mp3':
Stream #0.0(und): Audio: libmp3lame, 44100 Hz, stereo, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Unsupported codec (id=86018) for input stream #0.0


So, I am guessing I need to reinstall with libfaad enabled. It's strange that I would need to do this b/c if I play the mp4 using gxine it plays fine and says that it is using ffmpeg with libfaad. So, maybe there is something i am overlooking here??

thks for any help or advice!!!

Posted: Wed 15 Apr 2009, 21:24
by Patriot
Hmmm ...

There should be no problems overwriting ffmpeg library. This should be true if you're using a savefile. A full uninstall is desirable if you have a full hdd install though but not necessary.

I can confirm that compiling and installing from source works ok without uninstalling the previous version. The other option is to install the updated ffmpeg 0.5 pet from here.

The previous ffmpeg is kinda outdated and some newer/recent functions are not available. I have made a quick test with an avc/aac media file and ffmpeg 0.5 is able to transcode the audio portion (even though it did give a warning msg).

Test commandline example:

# ffmpeg -i mediafile.mp4 -vn -acodec libmp3lame -ab 128000 output.mp3

Hope that helps.

Rgds

Posted: Sat 26 Sep 2009, 07:12
by jani
Hi

I installed these packages (only 1 & 2 because 3 is not must).
Before the installation i could use ffmpeg apart from mp4 to mp3 conversation.
After the installation when i launch ffmpeg a got this message:

ffmpeg: relocation error: /usr/lib/libavdevice.so.52: symbol snd_pcm_htimestamp, version ALSA_0.9 not defined in file libasound.so.2 with link time reference

I use puppy 4.00 full install.

Could you help me please?
Have you got any idea what is the issue what i have to do?

Thank you
Jani

Posted: Sat 26 Sep 2009, 10:41
by mikeb
If you grab a copy of avidemux the you can load the video...set audio encoding to lame and save audio only from the menu and voila you have an mp3. Very useful editor generally..eg you can glue flv together and convert to avi/xvid in one go
http://www.murga-linux.com/puppy/viewto ... 83&t=26251
mike

Posted: Sat 26 Sep 2009, 15:25
by gary101
Hi Rubing

I very often download youtube videos as mp4 by using the keepvid website.

I wrote a little script to convert all mp4s in a directory to mp3s.

I hope this is of help

Gary

Code: Select all

#!/bin/sh

for x in *mp4; do ffmpeg -i $x -vn -acodec libmp3lame -ab 128000 $x.mp3; done

# rename files
for y in *.mp4.mp3; do cp $y `basename $y .mp4.mp3`.mp3; done

# remove oddly named files
for z in *.mp4.mp3; do rm $z ; done

Posted: Sat 26 Sep 2009, 21:22
by doggtoon
There are many WEB20 YouTube2MP3 download sites:
a few off hand are:
listentoyoutube.com
vixy.net
convert.playtube.com
Simply paste in the address of the video, and before you know it, the mp3 is ready.

Posted: Fri 18 Oct 2019, 09:49
by foxpup

Code: Select all

ffmpeg -i $VIDEO -f mp3 -ab 192000 -vn $MUSIC
works for me.

(This is a very old thread bumped :) )