Help - Search - Members - Calendar
Full Version: Transcode FLAC in Linux
Hydrogenaudio Forums > Lossless Audio Compression > FLAC
torok
Does anyone know a good way to do this? My encoder is a bash script, so it can't be a pipes thing. I need to have it go through a temp wav file. I used FooBar for this in Windows, of course, but I'm not sure how to go about it now. Thanks!
neomoe
QUOTE(torok @ Jun 25 2006, 16:16) *

Does anyone know a good way to do this? My encoder is a bash script, so it can't be a pipes thing. I need to have it go through a temp wav file. I used FooBar for this in Windows, of course, but I'm not sure how to go about it now. Thanks!



what do you mean with "your encoder is a script"? have you looked at the debian section of rarewares?
Justin Ruggles
QUOTE(torok @ Jun 25 2006, 18:16) *

Does anyone know a good way to do this? My encoder is a bash script, so it can't be a pipes thing. I need to have it go through a temp wav file. I used FooBar for this in Windows, of course, but I'm not sure how to go about it now. Thanks!


Well you haven't given a lot of information, but maybe you're thinking of something like the script below? Of course, you could replace encode="faac..." with the commandline encoder of your choice. Another alternative would be FFmpeg, which can decode FLAC and also encode ogg/vorbis, aac, mp3, ac3, and others.

CODE

#!/bin/bash

decode="flac -s -f -o test.wav -d"
encode="faac --mpeg-vers 4 test.wav -o"

mkfifo test.wav
${decode} $1 &
${encode} $1.aac

rm test.wav
torok
QUOTE(neomoe @ Jun 25 2006, 17:38) *

what do you mean with "your encoder is a script"?



CODE

#!/bin/bash
wine neroAacEnc.exe -q .425 -if "$1" -of "$2"
wine neroAacTag.exe "Z:/$2" -meta:artist="$3" -meta:album="$4" -meta:title="$5" -meta:track="$6" -meta:year="$7"
aacgain -r -c "$2"
neomoe
QUOTE(torok @ Jun 25 2006, 22:17) *

QUOTE(neomoe @ Jun 25 2006, 17:38) *

what do you mean with "your encoder is a script"?



CODE

#!/bin/bash
wine neroAacEnc.exe -q .425 -if "$1" -of "$2"
wine neroAacTag.exe "Z:/$2" -meta:artist="$3" -meta:album="$4" -meta:title="$5" -meta:track="$6" -meta:year="$7"
aacgain -r -c "$2"



you use a commandline encoder. why do you need to have a temporary WAV-file? is piping impossible anyhow?
iGold
QUOTE(torok @ Jun 26 2006, 12:17) *
CODE
#!/bin/bash
wine neroAacEnc.exe -q .425 -if "$1" -of "$2"
wine neroAacTag.exe "Z:/$2" -meta:artist="$3" -meta:album="$4" -meta:title="$5" -meta:track="$6" -meta:year="$7"
aacgain -r -c "$2"

neroAacEnc.exe uses "-" for stdin, so just use "-" as "$1", like this:
CODE
flac -d -c file.flac | you_script - file.mp4 ...
torok
QUOTE(iGold @ Jun 26 2006, 02:18) *

neroAacEnc.exe uses "-" for stdin, so just use "-" as "$1", like this:
CODE
flac -d -c file.flac | you_script - file.mp4 ...



Ooo, that's good to know. Thanks!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.