Jump to content
IGNORED

Gapless playback with CCA from Android App Hi-Fi Cast


Qhwoeprktiyns

Recommended Posts

If you played WAV it is very light for the CPU as there is no decoding involved. For FLAC, it must be decoded to WAV which will use the CPU moderately.

 

The easiest way to achieve gapless on Chromecast is to play to it... a continuous gapless WAV (or FLAC) stream generated by whatever program or app, thus using the Chromecast as a "dumb" networked sound card.

 

Other possibilities to do it on desktop computers:

 

- From foobar2000 using foo_out_upnp to play to a Chromecast transformed as an UPnP renderer with BubbleUPnP Server

- using any sofware that is able to play all system audio as a single stream to an UPnP renderer (still using BubbleUPnP Server to make the Chromecast an UPnP renderer). Example: Stream What you hear, Asset or Jamcast captures of system audio.

 

 

AFAIK, there is no example of anyone having made a gapless receiver running on the Chromecast itself (using html5 advanced audio/codec APIs), working with FLAC or WAV. Despite good guy Google telling developers this is the solution in the infamous Chromecast issue about gapless.

 

Hi,

 

Would there be an advantage, in terms of audio quality, to having a gapless receiver running on the chromecast as opposed to having the player send a continuous stream? I understand that the first solution is much simpler, but if the second solution works, why is it not more readily available? Have you considered implementing it in bubbleupnp, as an option?

 

Thanks.

Link to comment
Yes, I couldn't get gapless with Hi-Fi Cast App, only the Qobuz app does gapless for me.

I'm sorry to hear its not working for you. There's a few things that can prevent gapless transitions between tracks when casting using the Hi-Fi Cast app:

 

  1. If the files are hi-rez. Gapless is only currently supported for 16bit/44.1kHz WAV and FLAC files
  2. Seeking to near the end of the track
  3. Moving/deleting tracks in the playback queue (when the currently playing track is nearly finished)

 

Anyway. Thanks for trying it.

Link to comment
Hi,

 

Would there be an advantage, in terms of audio quality, to having a gapless receiver running on the chromecast as opposed to having the player send a continuous stream? I understand that the first solution is much simpler, but if the second solution works, why is it not more readily available? Have you considered implementing it in bubbleupnp, as an option?

 

Thanks.

 

AFAIK there is no way to create a gapless receiver that will play WAV/FLAC files. Even though Mr Google has said that gapless can be done using MSE (Media Source Extensions), the implementation on the Chromecast simply doesn't work with WAV/FLAC (well, I couldn't get it to work!).

 

And while it is possible to use MSE to stitch together a gapless stream on the receiver for MP3 and AAC files, the Chromecast enforces CORS which means that your DLNA server would need to provide appropriate headers (I don't know if any do) to have any chance of working.

 

As far as sound quality is concerned, I don't think it would make any difference. The 'bits' sent to the DAC will be exactly the same.

Link to comment
I'm sorry to hear its not working for you. There's a few things that can prevent gapless transitions between tracks when casting using the Hi-Fi Cast app:

 

  1. If the files are hi-rez. Gapless is only currently supported for 16bit/44.1kHz WAV and FLAC files
  2. Seeking to near the end of the track
  3. Moving/deleting tracks in the playback queue (when the currently playing track is nearly finished)

 

Anyway. Thanks for trying it.

 

So setting a upnp server to transcode to 24 bit 96khz will prevent gapless playback? I thought it worked... Should test it again.

Link to comment
I'm sorry to hear its not working for you. There's a few things that can prevent gapless transitions between tracks when casting using the Hi-Fi Cast app:

 

  1. If the files are hi-rez. Gapless is only currently supported for 16bit/44.1kHz WAV and FLAC files
  2. Seeking to near the end of the track
  3. Moving/deleting tracks in the playback queue (when the currently playing track is nearly finished)

 

Anyway. Thanks for trying it.

I like the sound so I bought the app, not getting gapless on that download I mentioned may be due to the download itself, I'll try some CD rips. Out of interest do files have to be transcoded into a particular format in order to be accepted by the CCA? Cheers!

Link to comment
I like the sound so I bought the app, not getting gapless on that download I mentioned may be due to the download itself, I'll try some CD rips. Out of interest do files have to be transcoded into a particular format in order to be accepted by the CCA? Cheers!

Thanks for buying the app. Much appreciated.

 

 

The CCA natively accepts MP3, AAC, FLAC and WAV. Multichannel FLAC and WAV files do not play and 192kHz files are resampled by the CCA to 96kHz. So provided that the file being played is stereo MP3, AAC, FLAC or WAV then transcoding is not required.

Link to comment
Thanks for buying the app. Much appreciated.

 

 

The CCA natively accepts MP3, AAC, FLAC and WAV. Multichannel FLAC and WAV files do not play and 192kHz files are resampled by the CCA to 96kHz. So provided that the file being played is stereo MP3, AAC, FLAC or WAV then transcoding is not required.

Cool, do you have any plans to do a PC/Mac desktop app?

Link to comment
Hi,

 

Would there be an advantage, in terms of audio quality, to having a gapless receiver running on the chromecast as opposed to having the player send a continuous stream? I understand that the first solution is much simpler, but if the second solution works, why is it not more readily available?

 

There would not be an advantage in audio quality. However having gapless supported on the receiver side in a standard way (eg on the standard receiver made by Google) would make it easy for app developers to take advantage of it for ubiquitous and easy gapless playback.

Having the controlling software send a continous stream (such as HiFi Cast) is *not* an easy solution for developers, although it is the only one possible for now. And it has some drawbacks such as requiring the device generating the continuous stream running , and using more battery if playing FLAC or whatever format that must be decoded to PCM (not a problem on a desktop computer or NAS).

There is hope that at some point html5 Media Source Extensions (MSE) will support FLAC decoding, allowing to make a gapless FLAC receiver running on the Chromecast. But writing such receiver will not be trivial, if at all possible. Google doesn't give a shit about gapless as long as Google Play Music mp3's can somewhat be played gaplessly (MSE supports mp3 and it is believed Google used it for their Google Music receiver). Amusingly, Android has such easy to use API for developers to play music gaplessly.

 

Have you considered implementing it in bubbleupnp, as an option?

 

I answered this question a few posts above.

Link to comment
There would not be an advantage in audio quality. However having gapless supported on the receiver side in a standard way (eg on the standard receiver made by Google) would make it easy for app developers to take advantage of it for ubiquitous and easy gapless playback.

Having the controlling software send a continous stream (such as HiFi Cast) is *not* an easy solution for developers, although it is the only one possible for now. And it has some drawbacks such as requiring the device generating the continuous stream running , and using more battery if playing FLAC or whatever format that must be decoded to PCM (not a problem on a desktop computer or NAS).

There is hope that at some point html5 Media Source Extensions (MSE) will support FLAC decoding, allowing to make a gapless FLAC receiver running on the Chromecast. But writing such receiver will not be trivial, if at all possible. Google doesn't give a shit about gapless as long as Google Play Music mp3's can somewhat be played gaplessly (MSE supports mp3 and it is believed Google used it for their Google Music receiver). Amusingly, Android has such easy to use API for developers to play music gaplessly.

 

Thanks. There are java libraries available to play flac in html. Qobuz, among others, has developed its app using them.

Introducing FLAC.js: A Pure JavaScript FLAC Decoder — Audiocogs

 

Obviously, the chromecast does not integrate this.

 

It is a shame that there is not an equivalent to Hi-Fi Cast or Bubblupnp in html...

Link to comment
Yes. That's right. The app will not try and play 24bit files gaplessly.

But gapless up to 24/96 should be available soon...hopefully in the next release.

 

The Hi-Fi Cast app can now do gapless playback of 24bit WAV and FLAC files (up to 96kHz) via Chromecast Audio and the 2nd Generation Chromecast (video). Gapless with the original Chromecast (video) is still limited to 16bit WAV and FLAC.

Link to comment
If you played WAV it is very light for the CPU as there is no decoding involved. For FLAC, it must be decoded to WAV which will use the CPU moderately.

 

The easiest way to achieve gapless on Chromecast is to play to it... a continuous gapless WAV (or FLAC) stream generated by whatever program or app, thus using the Chromecast as a "dumb" networked sound card.

 

Other possibilities to do it on desktop computers:

 

- From foobar2000 using foo_out_upnp to play to a Chromecast transformed as an UPnP renderer with BubbleUPnP Server

- using any sofware that is able to play all system audio as a single stream to an UPnP renderer (still using BubbleUPnP Server to make the Chromecast an UPnP renderer). Example: Stream What you hear, Asset or Jamcast captures of system audio.

 

 

AFAIK, there is no example of anyone having made a gapless receiver running on the Chromecast itself (using html5 advanced audio/codec APIs), working with FLAC or WAV. Despite good guy Google telling developers this is the solution in the infamous Chromecast issue about gapless.

 

I've found using Airparrot software on my Windows laptop gives the clearest sound (and gapless) from the CCA, I guess this is 'using the Chromecast as a "dumb" networked sound card' . Problem is although sound is clear, it sounds overly bright. Airfoil on Mac (also sound capture software) sounds less clear/dynamic. Any plans to offer something similar but better?

Link to comment
I've found using Airparrot software on my Windows laptop gives the clearest sound (and gapless) from the CCA, I guess this is 'using the Chromecast as a "dumb" networked sound card' . Problem is although sound is clear, it sounds overly bright. Airfoil on Mac (also sound capture software) sounds less clear/dynamic. Any plans to offer something similar but better?

 

If you mean a way to capture system audio, no plan for that. As I mentioned in the post you quoted, There are already software that do that and expose the stream via UPnP and that you can play with your UPnP/DLNA Control Point of choice (or from the systray for Jamcast and Stream What you hear) to your Chromecast managed as an UPnP renderer by BubbleUPnP Server.

Link to comment
If you mean a way to capture system audio, no plan for that. As I mentioned in the post you quoted, There are already software that do that and expose the stream via UPnP and that you can play with your UPnP/DLNA Control Point of choice (or from the systray for Jamcast and Stream What you hear) to your Chromecast managed as an UPnP renderer by BubbleUPnP Server.

 

Ya I tried your suggestions, didn't sound good, thanks anyway.

Link to comment
Ya I tried your suggestions, didn't sound good, thanks anyway.

 

'Didn't sound good' is rather vague, especially since you do not tell what you tried exactly. For example, Jamcast may stream mp3 by default and its virtual sound card feature must be configured to stream WAV (or FLAC).

As long as the system audio capture is played as WAV to the Chromecast in the same samplerate/bitdepth (likely 44.1/16 or 48/16), it should sound identical whatever the capturing software. It's not like it flip bits randomly just to make it sound worse or there are 200 method to capture audio giving each different data...

Link to comment

+1

 

Not only is the capture method & its configuration not mentioned, neither is the music file playback software and its precise output settings.

 

Also, @Rexp's original methods of sound capture with regards what audio codec that are being used for onward streaming to the Chromecast Audio, both via the AirParrot software on his Windows laptop & Airfoil on the Mac appear to be unknown and/or hidden, for example:

https://weblog.rogueamoeba.com/2016/10/28/airfoil-5-5-now-playing-on-chromecast/

How to Stream to Chromecast from PC

 

At least with the methods you've mentioned there's an assurance from the developers, in that they describe exactly what audio codec and resolutions are being used in the outbound stream to the CCA, for the various settings.

 

For maximum confidence, which whatever lossless music file is being played, is being bit perfectly streamed to the Chromecast Audio, should be the one to try on the Windows laptop. So, the first method you mentioned (and it doesn't actually involve any audio capture), ie, the foobar2000 music file player with the foo_out_upnp (UPnP MediaRenderer output) plugin component, set to output to the UPnP/DLNA renderer that has been created by the BubbleUPnP Server helper software for the Chromecast Audio.

Download foobar2000

foobar2000: Components Repository - UPnP MediaRenderer Output

https://www.bubblesoftapps.com/bubbleupnpserver/#googlecast

media_renderers.png

We are far more united and have far more in common with each other than things that divide us.

-- Jo Cox

Link to comment
I've found using Airparrot software on my Windows laptop gives the clearest sound (and gapless) from the CCA, I guess this is 'using the Chromecast as a "dumb" networked sound card' . Problem is although sound is clear, it sounds overly bright. Airfoil on Mac (also sound capture software) sounds less clear/dynamic. Any plans to offer something similar but better?

 

Clear but bright? Maybe the rest of your system is bright. On a good system, the chromecast sounds good!

Link to comment
'Didn't sound good' is rather vague, especially since you do not tell what you tried exactly. For example, Jamcast may stream mp3 by default and its virtual sound card feature must be configured to stream WAV (or FLAC).

As long as the system audio capture is played as WAV to the Chromecast in the same samplerate/bitdepth (likely 44.1/16 or 48/16), it should sound identical whatever the capturing software. It's not like it flip bits randomly just to make it sound worse or there are 200 method to capture audio giving each different data...

 

I suggest you try it and get back to me with your description of the SQ.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...