Yes. It is a real possibility that I have a configuration issue with FLAC files for some reason. When the default settings didn;t work for FLAC, I started modifying my ampache.cfg.php file to try to get it to transcode FLAC, as well as WAV and WMA, hoping I could take care of all three at once. Haven't tried anything but FLAC so far though.
I can confirm that FLAC streaming works in SubSonic, which is running on the same machine. Note that my environment is using Debian Wheezy on an ARM processor (CubieTruck hardware). There are some known issues with ffmpeg on ARM, but I have resolved those, as is evident in the fact that Subsonic will stream the FLAC files.
Anyway, here is the pertinent section of my ampache.cfg.php file
*;######################################################
; These are commands used to transcode non-streaming
; formats to the target file type for streaming.
; This can be useful in re-encoding file types that don't stream
; very well, or if your player doesn't support some file types.
;
; 'Downsampling' will also use these commands.
;
; To state the bleeding obvious, any programs referenced in the transcode
; commands must be installed, in the web server's search path (or referenced
; by their full path), and executable by the web server.
; Input type selection
; TYPE is the extension. 'allowed' certifies that transcoding works properly for
; this input format. 'required' further forbids the direct streaming of a format
; (e.g. if you store everything in FLAC, but don't want to ever stream that.)
; transcode_TYPE = {allowed|required|false}
; DEFAULT: false
transcode_m4a = "allowed"
transcode_flac = "allowed"
transcode_flac_target = mp3
transcode_mpc = "required"
transcode_ogg = "allowed"
transcode_ogg_target = mp3
transcode_wav = "required"
transcode_mp3 = "allowed"
transcode_wav = required
transcode_wma = required
transcode_wav_target = mp3
transcode_wma_target = mp3
; Default output format
; DEFAULT: none
encode_target = "mp3"
; Override the default output format on a per-type basis
; encode_target_TYPE = TYPE
; DEFAULT: none
;encode_target_flac = mp3
; Allow clients to override transcode settings (output type, bitrate, codec ...)
; DEFAULT: true
transcode_player_customize = "1"
; Command configuration. Substitutions will be made as follows:
; %FILE% => filename
; %SAMPLE% => target sample rate
; You can do fancy things like VBR, but consider whether the consequences are
; acceptable in your environment.
; Master transcode command
; transcode_cmd should be a single command that supports multiple file types,
; such as ffmpeg or avconv. It's still possible to make a configuration that's
; equivalent to the old default, but if you find that necessary you should be
; clever enough to figure out how on your own.
; DEFAULT: none
;transcode_cmd = "ffmpeg -i %FILE%"
transcode_cmd ="avconv -i %FILE%"
;transcode_cmd = "avconv -i %FILE%"
;transcode_cmd = "/usr/bin/neatokeen %FILE%"
; Specific transcode commands
; It shouldn't be necessary in most cases, but you can override the transcode
; command for specific source formats. It still needs to accept the
; encoding arguments, so the easiest approach is to use your normal command as
; a clearing-house.
; transcode_cmd_TYPE = TRANSCODE_CMD
;transcode_cmd_mid = "timidity -Or -o – %FILE% | ffmpeg -f s16le -i pipe:0"
transcode_cmd_flac = "flac -dc %FILE% | lame -b %SAMPLE% -S - - "
transcode_cmd_ogg = "oggsplt -qn %FILE% %OFFSET% %EOF% -o - | oggdec -Q -o - - | lame -S -q 3 -b %SAMPLE% -S - -"
; Alternative command works better for some people
;transcode_cmd_m4a = "alac %FILE% | lame -h -b %SAMPLE% -S - -"
;transcode_cmd_ogg = "mp3splt -qn %FILE% %OFFSET% %EOF% -o - | oggdec -Q -o - - | lame -S -q 3 -b %SAMPLE% -S - -"
;transcode_cmd_flac = "flac -dc %FILE% | lame -rb %SAMPLE% -S - -"
; This line seems to work better for windows, switch if needed
; transcode_cmd_mp3 = "lame -q 3 -b %SAMPLE% -S %FILE% - -"
; Encoding arguments
; For each output format, you should provide the necessary arguments for
; your transcode_cmd.
; encode_args_TYPE = TRANSCODE_CMD_ARGS
;encode_args_mp3 = "-vn -b:a %SAMPLE%K -c:a libmp3lame -f mp3 pipe:1"
;encode_args_flac = "-vn -b:a %SAMPLE%K -c:a libflac -f mp3 pipe:1"
;encode_args_ogg = "-vn -b:a %SAMPLE%K -c:a libvorbis -f ogg pipe:1"
;encode_args_m4a = "-vn -b:a %SAMPLE%K -c:a libfdk_aac -f adts pipe:1"
encode_args_wav = "-vn -b:a %SAMPLE%K -c:a pcm_s16le -f wav pipe:1"
encode_args_ogg = "-vn -b:a max\(%SAMPLE%K\,49K\) -acodec libvorbis -vcodec libtheora -f ogg pipe:1"
encode_args_mp3 = "-vn -b:a %SAMPLE%K -acodec libmp3lame -f mp3 pipe:1"
;encode_args_ogv = "-vcodec libtheora -acodec libvorbis -ar 44100 -f ogv pipe:1"
;encode_args_mp4 = "-profile:0 baseline -frag_duration 2 -ar 44100 -f mp4 pipe:1"
; The following argument added according to github ampache issue 135
encode_args_wav = "-vn -b:a %SAMPLE%K -c:a pcm_s161e -f wav pipe:1"*
And my Ampache Log file:
*2015-04-20 03:03:39 [ampache] (play) -> Asked for type {song}
2015-04-20 03:03:39 [admin] (session) -> ucaruqgt56f1cjrjtescrldc50 has been extended to Mon, 20 Apr 2015 04:03:39 +0200 extension length 3600
2015-04-20 03:03:39 [admin] (session) -> c75c585973fe7cff9dbdd0d089bd3c89 has been extended to Mon, 20 Apr 2015 05:03:39 +0200 extension length 7200
2015-04-20 03:03:39 [admin] (ajax.server.php) -> Called for page: {song}
2015-04-20 03:03:39 [admin] (session) -> ucaruqgt56f1cjrjtescrldc50 has been extended to Mon, 20 Apr 2015 04:03:39 +0200 extension length 3600
2015-04-20 03:03:39 [admin] (play) -> Playing file (/media/data/Music_Collection/TemporaryAudioFolder/1967 - Clear Light/Clear Light - Clear Light - 07. She's Ready to be Free.flac}...
2015-04-20 03:03:39 [admin] (play) -> Media type {flac}
2015-04-20 03:03:39 [admin] (play) -> Custom play action {}
2015-04-20 03:03:39 [admin] (play) -> Transcode to {}
2015-04-20 03:03:39 [admin] (play) -> Decided not to transcode
2015-04-20 03:03:39 [admin] (ajax.server.php) -> Called for page: {}
2015-04-20 03:03:39 [admin] (session) -> Session created: 4a4eac134d5f7c46608012e241603da8
2015-04-20 03:03:39 [admin] (play) -> Starting stream of /media/data/Music_Collection/TemporaryAudioFolder/1967 - Clear Light/Clear Light - Clear Light - 07. She's Ready to be Free.flac with size 13745892
2015-04-20 03:03:41 [admin] (play) -> Registering stats for {She's Ready to be Free}...
2015-04-20 03:03:41 [admin] (user.class.php) -> Updating stats for {98893} {Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0}...
2015-04-20 03:03:41 [admin] (Plugins) -> Plugin Headphones is not installed, skipping
2015-04-20 03:03:41 [admin] (Plugins) -> Plugin Bit.ly is not installed, skipping
2015-04-20 03:03:41 [admin] (Plugins) -> Plugin LyricWiki is not installed, skipping
2015-04-20 03:03:41 [admin] (Plugins) -> Plugin MusicBrainz does not support save_songplay, skipping
2015-04-20 03:03:41 [admin] (Plugins) -> Plugin Growl is not installed, skipping
2015-04-20 03:03:41 [admin] (Plugins) -> Plugin ChartLyrics is not installed, skipping
2015-04-20 03:03:41 [admin] (Plugins) -> Plugin Libravatar is not installed, skipping
2015-04-20 03:03:41 [admin] (Plugins) -> Plugin Gravatar is not installed, skipping
2015-04-20 03:03:41 [admin] (Plugins) -> Plugin Libre.FM is not installed, skipping
2015-04-20 03:03:41 [admin] (Plugins) -> Plugin Flickr does not support save_songplay, skipping
2015-04-20 03:03:41 [admin] (Plugins) -> Plugin YOURLS is not installed, skipping
2015-04-20 03:03:41 [admin] (Last.FM) -> No Username, not scrobbling
2015-04-20 03:03:41 [admin] (play) -> Stream ended at 16384 (16384) bytes out of 13745892
2015-04-20 03:03:45 [admin] (session) -> ucaruqgt56f1cjrjtescrldc50 has been extended to Mon, 20 Apr 2015 04:03:45 +0200 extension length 3600
2015-04-20 03:03:45 [admin] (ajax.server.php) -> Called for page: {index} *
For what it is worth, my SubSonic configuration has a "two step" transcoding configuration, and is as follows for FLAC files:
flac audio flac mp3 Step 1: flac --silent --decode --stdout %s Step 2: lame --silent -h -b %b -
My SubSonic Downsampling command is: ffmpeg -i %s -map 0:0 -b:a %bk -v 0 -f mp3 -
ffmpeg -ss %o -t %d -i %s -async 1 -b:v %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f mpegts -c:v libx264 -preset superfast -c:a libmp3lame -threads 0 -
The only reason I mention the SubSonic settings is because those actually work in SubSonic, and they may shed some light on how to properly configure Ampache to stream FLAC in my specific environment.
As always, thanks a lot for all of the help on this!