oralodabas / google-cast-sdk

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

Opus audio codec not supported in Chromecast #491

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open 
https://7d6813dc99fcf444c71006a1d23645beebe7ca76-www.googledrive.com/host/0B5Bsu
QNLd6xrZVpEekE2dXlBNms on chromecast (via App ID B6C7AA49 or with location.href 
on any debuggable custom receiver)

What is the expected output? What do you see instead?
There are 3 audio tags, each with a different source. The first is a normal 
Lame icecast stream, the second an Opus icecast stream and the last a Opus file.
The expected output is that all 3 streams should play correctly. Instead, only 
the first one works.

What version of the product are you using? On what operating system?
Chromecast (latest version?). Tried not only this custom receiver, but also 
just streaming through the Default Media Receiver, with no luck.

In your documentation (https://developers.google.com/cast/docs/media) you 
mention that you support Opus, but discussing this with other developers, it 
seems that Opus is only supported when embedded in webm video files, which 
kinda defeats the purpose of a low latency codec.

Original issue reported on code.google.com by m...@eduardoneves.net on 18 Jan 2015 at 5:45

GoogleCodeExporter commented 9 years ago
Can you provide the error logs and explain how your app is set up?

Original comment by jonathan...@google.com on 20 Jan 2015 at 8:57

GoogleCodeExporter commented 9 years ago
Current builds of Chromecast firmware don't actually support Opus audio codec. 
Unfortunately the current stable build (22062) reports Opus as supported (if 
you ask via MediaSource.isTypeSupported or HTMLMediaElement.canPlayType), but 
that's a bug, it's really not supported.

Original comment by serv...@google.com on 20 Jan 2015 at 11:01

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi Jonathan, I assume then that no more information is needed?

If it's a bug, why is it also reported as supported here 
https://developers.google.com/cast/docs/media ? 

And are there any plans to support Opus audio codec in the near future?

Thanks!

Original comment by m...@eduardoneves.net on 20 Jan 2015 at 11:29

GoogleCodeExporter commented 9 years ago
Hi,
Sorry, I need to clarify. What I meant was that media files with Opus audio 
tracks are not supported for playback through HTMLMediaElement (e.g. HTML5 
<video> tag) on Chromecast. You might still be able to play Opus-encoded audio 
on Chromecast by using Web Audio APIs. I haven't tried this myself yet, I'll 
try later today. But Web Audio code path uses a software audio decoder and 
doesn't depend on hardware, so in theory it should work fine.

Original comment by serv...@google.com on 22 Jan 2015 at 7:39

GoogleCodeExporter commented 9 years ago
Hi!

I thought about trying to play it through the Web Audio API, but found this at 
the time:
https://code.google.com/p/chromium/issues/detail?id=409402 , so I assumed that 
this would be the case in Chromecast too.

Original comment by m...@eduardoneves.net on 22 Jan 2015 at 11:25

GoogleCodeExporter commented 9 years ago
I wasn't aware of that issue, but yes, unfortunately it means that Opus is 
unusable even through Web Audio at the moment. Web Audio and HTMLMediaElement 
use different code paths and both don't work for now :-(

Original comment by serv...@google.com on 23 Jan 2015 at 12:21

GoogleCodeExporter commented 9 years ago
Hi!

Thanks for the investigation.
Well, that leads me to the question (I guess to the product manager? :) ) if, 
being documented as supported, will the documentation be amended or the feature 
be implemented? 

We have hundreds of Chromecast devices that we gifted to our customers, and for 
us it would be important to know in which direction to turn, specifically if 
low latency audio is something we will be able to have in the near future.

Thanks again!

Original comment by m...@eduardoneves.net on 23 Jan 2015 at 4:27

GoogleCodeExporter commented 9 years ago

Original comment by jonathan...@google.com on 23 Jan 2015 at 7:02

GoogleCodeExporter commented 9 years ago
In general we try to maintain feature parity with Chrome browser. Since Chrome 
supports Opus we are going to try and support it as well, it's just an 
unfortunate coincidence that the Opus code path is broken in Web Audio and the 
alternative code path through HTMLMediaElement is not yet implemented on our 
side. So yeah, I hope that we'll implement that someday, hopefully soon, but I 
can't promise, since we have a lot of other feature requests and this one seems 
to be somewhat lower priority, since no major apps depend on it yet.

Original comment by serv...@google.com on 23 Jan 2015 at 11:15

GoogleCodeExporter commented 9 years ago
In the meantime, you can try the workaround posted here: 
https://code.google.com/p/chromium/issues/detail?id=409402#c10 (note that it 
doesn't work on Android).

Original comment by jonathan...@google.com on 23 Jan 2015 at 11:21

GoogleCodeExporter commented 9 years ago
Opus has been removed from the list of supported media and Chromecast should no 
longer report it as being supported. Although Opus is not supported at this 
time, we may consider adding it in the future.

Original comment by jonathan...@google.com on 9 Apr 2015 at 12:33