othmar52 / slimpd

PHP/JS based MPD-web-client for large music collections
GNU Affero General Public License v3.0
41 stars 11 forks source link

AC3 waveform conversion script #34

Closed killhellokitty closed 8 years ago

killhellokitty commented 8 years ago

This one also uses Mplayer to convert the AC3 to WAV, then we go about the usual and convert to MP3 to WAV. I believe this still grabs FFmpeg for the codecs to transcode. I've added a line to convert AC3 5.1 to 2 channel stereo. Im not sure if it is needed, but I think AC3 is usually in 5.1 or 7.1, I may be wrong. If it is incorrect just remove "-channels 5 -af pan=2:'1:0':'0:1':'0.7:0':'0:0.7':'0.5:0.5'".

/usr/bin/mplayer -really-quiet -channels 5 -af pan=2:'1:0':'0:1':'0.7:0':'0:0.7':'0.5:0.5' '/srv/http/slimpd/templates/partials/systemcheck/waveforms/testfiles/testfile-converted-with-www.zamzar.com.ac3' -ao pcm:file='/srv/http/slimpd/cache/ac3.dc713d0a458118bf61ae2905c2b8e483.wav' && /usr/bin/lame -m m -S -f -b 16 --resample 8 '/srv/http/slimpd/cache/ac3.dc713d0a458118bf61ae2905c2b8e483.wav' '/srv/http/slimpd/cache/ac3.dc713d0a458118bf61ae2905c2b8e483.mp3' && lame -S --decode '/srv/http/slimpd/cache/ac3.dc713d0a458118bf61ae2905c2b8e483.mp3' '/srv/http/slimpd/cache/ac3.dc713d0a458118bf61ae2905c2b8e483.wav'