View Full Version : [ubuntu] how to batch convert with ffmpeg?
logos34
July 23rd, 2008, 04:33 AM
So I want to convert all the .m4a (apple lossless .alac) files in a folder to .wav. How?
ffmpeg -i *.m4a ?
Creative2
July 23rd, 2008, 05:27 AM
save this lik m4a2wav.sh then you have to give it executable permission
and the execute in a terminal ./ m4a2wav.sh
for f in *.m4a; do mplayer -ao pcm:file="${f%.m4a}.wav" "$f"; done
or you could install fuoco tools it manage m4a to mp3 or what you want..
logos34
July 23rd, 2008, 08:04 AM
cool, it works. Thanks. Just had to
sudo chmod +x
the file first.
But I get this message (in red) for every track:
user@ubuntu:~/09 Penderecki _ Orchestewerke _.m4a$ ~/./m4a2wav-mplayer.sh
MPlayer 1.0rc2-4.2.3 (C) 2000-2007 MPlayer Team
CPU: AMD Sempron(tm) Processor 2600+ (Family: 15, Model: 44, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
mplayer: could not connect to socket
mplayer: No such file or directory
MPlayer 1.0rc2-4.2.3 (C) 2000-2007 MPlayer Team
But it doesn't seem effect anything.
I also changed it slightly and it works with ffmpeg too:
for f in *.m4a; do ffmpeg -i "$f" "${f%.m4a}.wav"; done
user@ubuntu:~/03 Messiaen _ Quatuor pour la Fin d$ ~/./m4a2wav-ffmpeg.sh
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-libmp3lame --enable-libfaadbin --enable-libfaad --enable-libfaac --enable-xvid --enable-x264 --enable-liba52 --enable-amr_nb --enable-amr_wb --enable-shared --prefix=/usr
libavutil version: 1d.49.3.0
libavcodec version: 1d.51.38.0
libavformat version: 1d.51.10.0
built on Jul 17 2008 19:38:35, gcc: 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '01 Quatuor pour la fin du Temps_ 1..m4a':
Duration: 00:03:04.7, start: 0.000000, bitrate: 607 kb/s
Stream #0.0(und): Audio: alac, 44100 Hz, stereo
Output #0, wav, to '01 Quatuor pour la fin du Temps_ 1..wav':
Stream #0.0: Audio: pcm_s16le, 44100 Hz, stereo, 1411 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
size= 31823kB time=184.7 bitrate=1411.2kbits/s
video:0kB audio:31823kB global headers:0kB muxing overhead 0.000135%
Creative2
July 25th, 2008, 01:06 PM
well you can convert or not?
if not :
medibuntu repository are up or not?
no?
add medibuntu repository
yes?
i don't know
done
xD
logos34
July 25th, 2008, 10:47 PM
yeah, your script converts with both mplayer and ffmeg, I was just wondering why the error message with mplayer.
Creative2
July 26th, 2008, 05:49 AM
i really dunno , well if your files are ok why are you worrying :D ?
(well if i was you probably i would ask to myself the same question.. )
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.