Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Transcode FLAC in Linux (Read 7533 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Transcode FLAC in Linux

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!

Transcode FLAC in Linux

Reply #1
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?

Transcode FLAC in Linux

Reply #2
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: [Select]
#!/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


Transcode FLAC in Linux

Reply #4

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



Code: [Select]
#!/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?

Transcode FLAC in Linux

Reply #5
Code: [Select]
#!/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: [Select]
flac -d -c file.flac | you_script - file.mp4 ...