Subsonic doesn't play FLAC files

Need help? Post your questions here.

Moderator: moderators

Subsonic doesn't play FLAC files

Postby jahtimes » Wed Nov 28, 2012 9:50 pm

Hi, I'm new to subsonic. I installed Subsonic on my server, it plays fine mp3 but not FLAC :(

Here is my log :

[28/11/12 21:38:49 UTC] INFO PlayQueueInputStream admin listening to "Black Sabbath - Black Sabbath (2007) - FLAC/01. Black Sabbath .flac"
[28/11/12 21:38:50 UTC] DEBUG TranscodeInputStream Starting transcoder: [/*****************************/subsonic/transcode/ffmpeg] [-i] [/*********************************/data/Black Sabbath - Black Sabbath (2007) - FLAC/01. Black Sabbath .flac] [-ab] [128k] [-v] [0] [-f] [mp3] [-]
[28/11/12 21:38:50 UTC] DEBUG AudioScrobblerService Successfully registered now playing for song 'Black Sabbath' for user miozoim at Last.fm: Wed Nov 28 21:38:50 UTC 2012
[28/11/12 21:38:50 UTC] DEBUG AudioScrobblerService Successfully registered submission for song 'A day apart' for user miozoim at Last.fm: Wed Nov 28 21:38:50 UTC 2012
[28/11/12 21:38:50 UTC] DEBUG InputStreamReaderThread (/********************/subsonic/transcode/ffmpeg) FFmpeg version SVN-r0.5.6-4:0.5.6-3, Copyright (c) 2000-2009 Fabrice Bellard, et al.
[28/11/12 21:38:50 UTC] DEBUG InputStreamReaderThread (/********************/subsonic/transcode/ffmpeg) configuration: --extra-version=4:0.5.6-3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libfaad --enable-libdc1394 --enable-shared --disable-static
[28/11/12 21:38:50 UTC] DEBUG InputStreamReaderThread (/***************************/subsonic/transcode/ffmpeg) libavutil 49.15. 0 / 49.15. 0
[28/11/12 21:38:50 UTC] DEBUG InputStreamReaderThread (/***************************/subsonic/transcode/ffmpeg) libavcodec 52.20. 1 / 52.20. 1
[28/11/12 21:38:50 UTC] DEBUG InputStreamReaderThread (/**************************/subsonic/transcode/ffmpeg) libavformat 52.31. 0 / 52.31. 0
[28/11/12 21:38:50 UTC] DEBUG InputStreamReaderThread (/*************************/subsonic/transcode/ffmpeg) libavdevice 52. 1. 0 / 52. 1. 0
[28/11/12 21:38:50 UTC] DEBUG InputStreamReaderThread (/******************************/subsonic/transcode/ffmpeg) libavfilter 0. 4. 0 / 0. 4. 0
[28/11/12 21:38:50 UTC] DEBUG InputStreamReaderThread (/******************************/subsonic/transcode/ffmpeg) libswscale 0. 7. 1 / 0. 7. 1
[28/11/12 21:38:50 UTC] DEBUG InputStreamReaderThread (/*********************************/subsonic/transcode/ffmpeg) libpostproc 51. 2. 0 / 51. 2. 0
[28/11/12 21:38:50 UTC] DEBUG InputStreamReaderThread (/*******************************/subsonic/transcode/ffmpeg) built on Dec 31 2011 16:14:46, gcc: 4.4.5
[28/11/12 21:38:50 UTC] DEBUG InputStreamReaderThread (/******************************/subsonic/transcode/ffmpeg) Input #0, flac, from '*****************************************/Black Sabbath - Black Sabbath (2007) - FLAC/01. Black Sabbath .flac':
[28/11/12 21:38:50 UTC] DEBUG InputStreamReaderThread (/****************************/subsonic/transcode/ffmpeg) Duration: N/A, bitrate: N/A
[28/11/12 21:38:50 UTC] DEBUG InputStreamReaderThread (/*****************************/subsonic/transcode/ffmpeg) Stream #0.0: Audio: flac, 44100 Hz, stereo, s16
[28/11/12 21:38:50 UTC] DEBUG InputStreamReaderThread (/********************************/subsonic/transcode/ffmpeg) Stream mapping:
[28/11/12 21:38:50 UTC] DEBUG InputStreamReaderThread (/*************************************/transcode/ffmpeg) Stream #0.0 -> #0.0
[28/11/12 21:38:50 UTC] DEBUG InputStreamReaderThread (/**********************************/subsonic/transcode/ffmpeg) Unsupported codec for output stream #0.0

Any help would be appreciated, thanks !

It puts the same thing for all FLAC files.
jahtimes
 
Posts: 3
Joined: Wed Nov 28, 2012 9:43 pm

Re: Subsonic doesn't play FLAC files

Postby jahtimes » Mon Dec 03, 2012 8:40 pm

up!
jahtimes
 
Posts: 3
Joined: Wed Nov 28, 2012 9:43 pm

Re: Subsonic doesn't play FLAC files

Postby nordboerg » Tue Dec 04, 2012 1:27 pm

I guess you haven't changed any of your transcoding settings in subsonic, right? cause it seems it's trying to use the default ffmpeg codec.
if you want to play flac files I suggest you to use a two step encodig method, first convert the flac to wav, then convert the wav to mp3.

to do this you should get the latest lame and flac codecs.

if you're on debian you can do this with

sudo apt-get install flac
sudo apt-get install lame (I just went through this configuration process on a raspberry pi, and I had to reinstall lame there to get it work, at least I guess I had to)

then you should link the codecs to your subsonic/transcode directory
sudo ln -s /usr/bin/flac /var/subsonic/transcode
sudo ln -s /usr/bin/lame /var/subsonic/transcode

now that you have the codecs you can configure subsonic
go to settings > transcoding and take the first record "mp3 audio"
copy the following to step 1: flac -c -d -F %s
and put this to step 2: lame -V 0 --vbr-new - -

this will also give you the best possible quality you can get while you stream your lossless files.

let me know if it works, cheers!

*edit: updated my post. ln -a instead of cp is more practical.
Last edited by nordboerg on Thu Dec 13, 2012 10:13 am, edited 3 times in total.
nordboerg
 
Posts: 6
Joined: Tue Dec 04, 2012 1:11 pm

Re: Subsonic doesn't play FLAC files

Postby HerrNilsson » Wed Dec 05, 2012 2:53 pm

nordboerg wrote:I guess you haven't changed any of your transcoding settings in subsonic, right? cause it seems it's trying to use the default ffmpeg codec.
if you want to play flac files I suggest you to use a two step encodig method, first convert the flac to wav, then convert the wav to mp3.

to do this you should get the latest lame and flac codecs.

if you're on debian you can do this with

sudo apt-get install flac
sudo apt-get install lame (I just went through this configuration process on a raspberry pi, and I had to reinstall lame there to get it work, at least I guess I had to)

then you should copy the codecs to your subsonic/transcode directory
sudo cp /usr/bin/flac /var/subsonic/transcode
sudo cp /usr/bin/lame /var/subsonic/transcode

now that you have the codecs you can configure subsonic
go to settings > transcoding and take the first record "mp3 audio"
copy the following to step 1: flac -c -d -F %s
and put this to step 2: lame -V 0 --vbr-new - -

this will also give you the best possible quality you can get while you stream your lossless files.

let me know if it works, cheers!


Thanks! This worked for me :)
HerrNilsson
 
Posts: 60
Joined: Fri Aug 17, 2012 5:13 am

Re: Subsonic doesn't play FLAC files

Postby libussa » Wed Dec 05, 2012 3:12 pm

couple of things to complete your answer...

nordboerg wrote:I guess you haven't changed any of your transcoding settings in subsonic, right? cause it seems it's trying to use the default ffmpeg codec.
if you want to play flac files I suggest you to use a two step encodig method, first convert the flac to wav, then convert the wav to mp3.


actually, ffmpeg can transcode flac, and it can do it in 1 step. The default subsonic transcode command works perfectly !

nordboerg wrote:
then you should copy the codecs to your subsonic/transcode directory
sudo cp /usr/bin/flac /var/subsonic/transcode
sudo cp /usr/bin/lame /var/subsonic/transcode


This method is not recommended ; by doing so, you physically copy the binary into the subsonic directory ; when your distro is going to update those, subsonic will still be using the old, deprecated version. You're better off creating a symbolic link :

Code: Select all
ln -s /usr/bin/ffmpeg /var/subsonic/transcode


if you absolutely want to use the 2-step transcode, just do the same for flac and lame
libussa
 
Posts: 6
Joined: Wed Dec 05, 2012 3:03 pm

Re: Subsonic doesn't play FLAC files

Postby nordboerg » Wed Dec 05, 2012 10:34 pm

Yea, a symbolic link is definitely a better way to add the codecs, true.
But ffmped didn't work for me either, maybe a reinstall could have solved that, but the two step conversion is also more transparent (at least to me) and the lame codec is kind of a standard when it comes to audio encoding
nordboerg
 
Posts: 6
Joined: Tue Dec 04, 2012 1:11 pm

Re: Subsonic doesn't play FLAC files

Postby jahtimes » Fri Dec 07, 2012 9:52 pm

nordboerg wrote:I guess you haven't changed any of your transcoding settings in subsonic, right? cause it seems it's trying to use the default ffmpeg codec.
if you want to play flac files I suggest you to use a two step encodig method, first convert the flac to wav, then convert the wav to mp3.

to do this you should get the latest lame and flac codecs.

if you're on debian you can do this with

sudo apt-get install flac
sudo apt-get install lame (I just went through this configuration process on a raspberry pi, and I had to reinstall lame there to get it work, at least I guess I had to)

then you should copy the codecs to your subsonic/transcode directory
sudo cp /usr/bin/flac /var/subsonic/transcode
sudo cp /usr/bin/lame /var/subsonic/transcode

now that you have the codecs you can configure subsonic
go to settings > transcoding and take the first record "mp3 audio"
copy the following to step 1: flac -c -d -F %s
and put this to step 2: lame -V 0 --vbr-new - -

this will also give you the best possible quality you can get while you stream your lossless files.

let me know if it works, cheers!


Thanks, the two steps method works great ! Don't know why the default method doesn't !

Resolved !
jahtimes
 
Posts: 3
Joined: Wed Nov 28, 2012 9:43 pm

Re: Subsonic doesn't play FLAC files

Postby nordboerg » Sat Dec 08, 2012 10:00 am

jahtimes wrote:Thanks, the two steps method works great ! Don't know why the default method doesn't !

Resolved !

Glad to hear! I think if you delete the ffmpeg codec which comes with subsonic, reinstall it from repository and link the new one to the transcode folder it should work.
nordboerg
 
Posts: 6
Joined: Tue Dec 04, 2012 1:11 pm

Re: Subsonic doesn't play FLAC files

Postby getwired » Mon Dec 24, 2012 11:42 am

This is a ONE STEP method for FLAC to CBR MP3 that works great, correctly preserves tags, obeys Subsonic player bit-rates, and down-samples to 44.1KHz/16bit/stereo. Optimized and tested with Subsonic 4.7, Winamp 5.63, N7 Player (Android).

Code: Select all
ffmpeg -i %s -ar 44100 -ac 2 -request_sample_fmt s16 -acodec libmp3lame -ab %bk -map_metadata 0:0 -f mp3 -id3v2_version 3 -

Try it if you want... :wink:
getwired
 
Posts: 6
Joined: Tue Sep 07, 2010 4:15 pm

Re: Subsonic doesn't play FLAC files

Postby nordboerg » Tue Dec 25, 2012 12:16 am

getwired wrote:This is a ONE STEP method for FLAC to CBR MP3 that works great, correctly preserves tags, obeys Subsonic player bit-rates, and down-samples to 44.1KHz/16bit/stereo. Optimized and tested with Subsonic 4.7, Winamp 5.63, N7 Player (Android).

Code: Select all
ffmpeg -i %s -ar 44100 -ac 2 -request_sample_fmt s16 -acodec libmp3lame -ab %bk -map_metadata 0:0 -f mp3 -id3v2_version 3 -

Try it if you want... :wink:

Can you set it to encode to VBR instead of CBR?
nordboerg
 
Posts: 6
Joined: Tue Dec 04, 2012 1:11 pm

Re: Subsonic doesn't play FLAC files

Postby getwired » Tue Dec 25, 2012 1:11 am

nordboerg wrote:Can you set it to encode to VBR instead of CBR?


Sure, but you're going to need a newer FFMPEG binary on your system that supports the transcoding you want. First, look here, then decide what your target "quality" should be. Once you have that decided, put the new FFMPEG binary in your transcode folder (backup the original). Then update your transcoding string like the example below, "-q:a x", where x is the VBR quality level you want. Good luck, but it's actually pretty easy.

Code: Select all
ffmpeg -i %s -ar 44100 -ac 2 -request_sample_fmt s16 -acodec libmp3lame -q:a 0 -map_metadata 0:g:0 -f mp3 -id3v2_version 3 -
getwired
 
Posts: 6
Joined: Tue Sep 07, 2010 4:15 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 33 guests