arabenseifer / google-cast-sdk

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

MPL audio parser error with audio tracks encapsulated by .ts container #549

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Prepare HLS multiple audio tracks stream.
2. Launch custom receiver to play. --- mediaPlayer.load(protocol)
3. Switch to alternative audio track. --- protocol.enableStream(audioIndex, 
true); mediaPlayer.reload()
4. Javascript console error - HLS Host error 1.

What is the expected output? What do you see instead?
MPL should switch to the specified audio track. Now error popped up.

What version of the product are you using? On what operating system?
MPL 1.0.0.

Please provide any additional information below.
I suspect that it is because MPL doesn't support TS container audio track. MPL 
currently only support AAC container?
The stream is good on Mac/QuickTime 10.4.

Original issue reported on code.google.com by nicevinc...@gmail.com on 29 Mar 2015 at 3:30

Attachments:

GoogleCodeExporter commented 9 years ago
Update: I even tested with aac file as alternative audio m3u8 stream, still 
getting the aac parser error.

Original comment by nicevinc...@gmail.com on 31 Mar 2015 at 1:41

GoogleCodeExporter commented 9 years ago
Update 2: I download the Apple bip-bop advanced stream and host it locally. 
Then use the custom receiver to switch to another audio track. Now getting 
another error.

==========
Uncaught QuotaExceededError: Failed to execute 'addSourceBuffer' on 
'MediaSource': This MediaSource has reached the limit of SourceBuffer objects 
it can handle. No additional SourceBuffer objects may be added.
==========

Original comment by nicevinc...@gmail.com on 31 Mar 2015 at 3:13

Attachments:

GoogleCodeExporter commented 9 years ago
What is the format of your AAC file and does it start with the ADTS header or 
ID3 tag? Also, since your segment ends with ts, have you tried playing your 
manifest using cast.player.api.HlsSegmentFormat.MPEG2_TS? 
(https://developers.google.com/cast/docs/reference/player/cast.player.api.HlsSeg
mentFormat#.MPEG2_TS)

Original comment by jonathan...@google.com on 1 Apr 2015 at 5:33

GoogleCodeExporter commented 9 years ago
#1 For TS container:
I take your suggestion to explicitly to set the MPEG2_TS format, no luck... So 
I attached the console log. Also note that this is LIVE stream.

protocol = cast.player.api.CreateHlsStreamingProtocol(host, 
cast.player.api.HlsSegmentFormat.MPEG2_TS);

#2 For aac container:
I reviewed our stream, and found out that our aac wrapper is not correct. So I 
need to get this fix then test again. However, I don't want to deliver the AAC 
stream since it has A/V out of sync for other platforms.

Original comment by nicevinc...@gmail.com on 1 Apr 2015 at 7:03

Attachments:

GoogleCodeExporter commented 9 years ago
Since your ts segment is in TS format (not MPEG2_ES), you have to use MPL like 
this:

    this.host_ = new cast.player.api.Host({
      'mediaElement': mediaElement,
      'url': URL_OF_MANIFEST
    });

    this.player_ = new cast.player.api.Player(this.host_);

    // You're calling the API like this: cast.player.api.CreateHlsStreamingProtocol(this.host_, cast.player.api.HlsSegmentFormat.MPEG_AUDIO_ES);
    // you shouldn't pass cast.player.api.HlsSegmentFormat.MPEG_AUDIO_ES
    this.protocol_ = cast.player.api.CreateHlsStreamingProtocol(this.host_);
    this.player_.load(this.protocol_, initialTime);

Original comment by jonathan...@google.com on 2 Apr 2015 at 6:58

GoogleCodeExporter commented 9 years ago
I tried both ways, actually 3, none of these is working.
1. this.protocol_ = cast.player.api.CreateHlsStreamingProtocol(this.host_);
2. this.protocol_ = cast.player.api.CreateHlsStreamingProtocol(this.host_, 
cast.player.api.HlsSegmentFormat.MPEG2_TS);
3. this.protocol_ = cast.player.api.CreateHlsStreamingProtocol(this.host_, 
cast.player.api.HlsSegmentFormat.MPEG_AUDIO_ES);

Original comment by nicevinc...@gmail.com on 2 Apr 2015 at 7:10

GoogleCodeExporter commented 9 years ago
Can you provide your manifest file for us to test?

Original comment by jonathan...@google.com on 2 Apr 2015 at 9:00

GoogleCodeExporter commented 9 years ago
here you go

http://nlds159.cdnak.neulion.com/nldsu/univision/as/live/uni_hd_ipad.m3u8

Original comment by nicevinc...@gmail.com on 2 Apr 2015 at 9:08

GoogleCodeExporter commented 9 years ago
Thanks, I'll let you know if I need any additional information.

Original comment by jonathan...@google.com on 2 Apr 2015 at 10:20