Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: avconv in command line  (gelezen 1450 keer)

avconv in command line
« Gepost op: 2016/07/12, 12:31:02 »
OS: Ubuntu 14.04

Ik wil in een map met (veel) wav files converteren naar mp3 files.

Voor één file doe ik:  avconv -i "filename.wav" "filename.mp3"


Maar hoe doe ik dat in één keer met alle files in die map?  (met de command line)

Wat niet werkt is dit:
for f in *.wav; do convert -i ./"$f" ./${f%.wav}.mp3; done

Maar zoiets dergelijks moet het wel zijn (denk ik).

Wie helpt mij verder?

(Heb al getest met Soundconverter, maar die crashed te vaak)
𝕸𝖎𝖘𝖈𝖊𝖗𝖊 𝖚𝖙𝖎𝖑𝖊 𝖉𝖚𝖑𝖈𝖎. (Ter leering ende vermaeck)
𝕹𝖎𝖑 𝖛𝖔𝖑𝖊𝖓𝖙𝖎𝖇𝖚𝖘 𝖆𝖗𝖉𝖚𝖚𝖒. (Niets is moeilijk voor hen die willen)
https://henk.oegema.com  (Op RaspberryPi2)
Registered linux user 520520.  In gebruik: Ubuntu  24.04 Hobby's: Radio Amateur callsign: PA2HO.  Interesses: Raspberry Pi & Arduino & TELLO drone (voor AI)

Offline Nero

  • Lid
Re: avconv in command line
« Reactie #1 Gepost op: 2016/07/12, 14:49:23 »
for i in *.wav ; do avconv -i $i $(basname $i .wav).mp3 ; done

Offline bart85

  • Lid
Re: avconv in command line
« Reactie #2 Gepost op: 2016/07/12, 14:50:23 »
Dit kan met het programma lame.

for file in *.wav
do
    outputfile=${file%wav}mp3
    lame $file $outputfile
done
Je leert maar mooi over weg gaan met de commandline.
Linus: "I'm happy with the people who are wandering around looking at the stars but I am looking at the ground and I want to fix the pothole before I fall in."
I look to the clouds behind me and see the thunder coming.

Re: avconv in command line
« Reactie #3 Gepost op: 2016/07/12, 15:05:26 »
Dank U heren.   :)
𝕸𝖎𝖘𝖈𝖊𝖗𝖊 𝖚𝖙𝖎𝖑𝖊 𝖉𝖚𝖑𝖈𝖎. (Ter leering ende vermaeck)
𝕹𝖎𝖑 𝖛𝖔𝖑𝖊𝖓𝖙𝖎𝖇𝖚𝖘 𝖆𝖗𝖉𝖚𝖚𝖒. (Niets is moeilijk voor hen die willen)
https://henk.oegema.com  (Op RaspberryPi2)
Registered linux user 520520.  In gebruik: Ubuntu  24.04 Hobby's: Radio Amateur callsign: PA2HO.  Interesses: Raspberry Pi & Arduino & TELLO drone (voor AI)