imberezin / google-cast-sdk

Automatically exported from code.google.com/p/google-cast-sdk
0 stars 0 forks source link

Chromecast Audio does not play some FLACs within spec (<= 96/24) #708

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

I found a 96/24 FLAC that the CCA doesn't play, while it play other 96/24 FLACs 
without problem

To reproduce it, follow these steps:

1. install BubbleUPnP: 
https://play.google.com/store/apps/details?id=com.bubblesoft.android.bubbleupnp
2. start BubbleUPnP
3. in the top navigation drawer, in the renderer section, select a Chromecast 
Audio running firmware 1.17a or higher
4. Start Google Chrome on Android
5. Open this URL: http://bubblesoftapps.com/test96ko.flac
6. In the Chrome app chooser, select BubbleUPnP to send the URL to it
7. The 96/24 FLAC pointed by the URL should play but doesn't. If you do the 
same with http://bubblesoftapps.com/test96.flac, this one will play

I attached the output of metaflac --list for both files, to compare file 
headers. There's no difference that I could find pointing at an obvious problem 
or possible cause of the failure.

The test96ko.flac plays fine to a Chromecast v1 and v2 (you can verify it 
following the steps above, but selecting a CC v1 or v2 in step 3), although it 
is resampled to 48/16 by the Chromecast (unlike the CCA).

Original issue reported on code.google.com by pujos.mi...@gmail.com on 15 Dec 2015 at 4:14

Attachments:

GoogleCodeExporter commented 8 years ago
Additional info:  the test96ko.flac file plays fine everywhere except on the 
CCA (Desktop music players, Android music players, CC v1 and v2, ...).

Original comment by pujos.mi...@gmail.com on 15 Dec 2015 at 4:19

GoogleCodeExporter commented 8 years ago
A quick thought.  How are the flac files encoded?  I had issues with some files 
and re-encoded them with --fast preset and playback was fine.  Not ideal but 
maybe a workaround.

Original comment by stanev...@gmail.com on 15 Dec 2015 at 9:05

GoogleCodeExporter commented 8 years ago
I do not know how test96ko was encoded, as I did not encode it myself. Not 
surprised a reencode fixes it though. I suspect that test96ko is non-Subset 
compliant (see https://xiph.org/flac/format.html#subset), but I cannot tell 
from the header metadata. Maybe it is audio frames that are not compliant. 
Anyway, almost anything else is able to decode and play this file.

Original comment by pujos.mi...@gmail.com on 15 Dec 2015 at 11:21

GoogleCodeExporter commented 8 years ago
We'll look into this. In the meantime, does using the work around suggested in 
#2 fix the issue?

Original comment by jonathan...@google.com on 16 Dec 2015 at 1:22

GoogleCodeExporter commented 8 years ago
Yes reeconding test96ko with --fast worked. 
The resulting flac is here: http://bubblesoftapps.com/test96fix.flac

Just reecoding without that flag produced a flac that did not work.

Original comment by pujos.mi...@gmail.com on 16 Dec 2015 at 12:34

GoogleCodeExporter commented 8 years ago
metaflac --list output for test96fix.flac:

http://bubblesoftapps.com/test96fix.log

Notice the smaller blocksize and framesize than test96ko.log

Original comment by pujos.mi...@gmail.com on 16 Dec 2015 at 12:36

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I remember reading back in the day about different compression levels, and that 
it generally should not matter for the decoding device, but that there is a 
possibility of the decoder 'choking' on higher compression levels (maybe 24/96 
doesn't help either).
A quick test of decoding to WAV and then encoding that with --fast and --best 
resulted to playback of both WAV and --fast but not --best.   

Original comment by stanev...@gmail.com on 16 Dec 2015 at 3:10

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
No addtional info on the defect in itself, but this is a total failure when 
playing HDtrack- and gubemusic-files.  Please bump priority to "Critical".

Original comment by per.adel...@gmail.com on 4 Jan 2016 at 3:37

GoogleCodeExporter commented 8 years ago
I am having very similar issues. I bought a Chromecast V2 (disc) after being 
able to _successfully_ play my ripped CD collection in flac format on an also 
recently purchased Chromecast Audio. Sadly, however, none of my audio 
collection in flac format will play on the Chromecast V2, firmware 1.17.48342.

The flac files are 44.1kHz, 16bit, stereo.

The output of metaflac --list looks similar to test96ko.log already attached to 
tihs issue. I converted one of my existing flac files (using foobar2000) to 
large/fast encoding and the output of this file looks similar to test96.log, 
but it still doesn't play. I don't desire to rip my entire audio collection as 
a workaround anyway, but thought I'd try it to see if I could provide any more 
useful info for this issue.

I've attached the output of my original ripped-to-flac and converted files.

Original comment by ross.stu...@gmail.com on 6 Jan 2016 at 2:43

Attachments:

GoogleCodeExporter commented 8 years ago
I am having similar issues as well.

Changing the compression to --fast worked for most files. But not all, like 
this one:

https://www.dropbox.com/s/qxqye7lvtmrnasd/02%20Some%20%28test%20file%29.flac?dl=
0

compressed: fast (41% compressed)
compressed with dBpoweramp
24 bit 96 Khz

Any help?

Original comment by Stephane...@gmail.com on 6 Jan 2016 at 4:28

GoogleCodeExporter commented 8 years ago
Try compressing the wav file with the flac command line tool instead of using 
dbPowerAmp. The command should be "flac file.wav --fast". This has solved all 
my flac issues at least for now.

Original comment by mik...@gmail.com on 9 Jan 2016 at 6:07

GoogleCodeExporter commented 8 years ago
To: Stephane...@gmail.com
I was going to try your problem file but it seems to have been removed.

As mik...@gmail.com suggests, I have only used command line to recode flac's 
and have not had issues with the resulting files.  You can do something like:
for file in *.flac;do flac --fast -f "$file";done;

Note this would overwrite the original file but your meta data is preserved.
You will also see an "ERROR" which is informational "FAILURE: Compression 
failed (ratio 1.043, should be < 1.0)."

flac 1.3.1, Copyright (C) 2000-2009  Josh Coalson, 2011-2014  Xiph.Org 
Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

file.flac: wrote 71783697 bytes, ratio=1.043
FAILURE: Compression failed (ratio 1.043, should be < 1.0).
This happens for some files for one or more of the following reasons:
 * Recompressing an existing FLAC from a higher to a lower compression setting.
 * Insufficient input data  (eg, very short files, < 10000 frames).
 * The audio data is not compressable (eg a full range white noise signal).

Original comment by stanev...@gmail.com on 11 Jan 2016 at 10:07

GoogleCodeExporter commented 8 years ago
To: ross.stu...@gmail.com
I tried playing flac files to Chromecast V2, firmware 1.17.48342 as you 
describe and they play fine.  I tried 16 bits, 44.1 KHz compressed --best and 
24 bits, 48.0 KHz. Used BubbleUPNP streaming from local NAS.  Receiver shows 
48kHz for both so I suspect Chromecast V2 is resampling.

When played through Chromecast Audio (via SPDIF), receiver shows correct sample 
rate

Original comment by stanev...@gmail.com on 11 Jan 2016 at 11:17