gapu / google-cast-sdk

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

Make max buffer configurable in MediaPlayer #456

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have custom HLS streams that have 60 seconds segments. Your current 
implementation will start downloading next segment when buffer is below 20 sec. 
The problem is that 60 seconds segment can take up to 60 seconds to download 
(on bad connection), so the playback freezes alot.

Original issue reported on code.google.com by vichev.j...@gmail.com on 18 Dec 2014 at 8:41

GoogleCodeExporter commented 9 years ago

Original comment by na...@google.com on 18 Dec 2014 at 9:31

GoogleCodeExporter commented 9 years ago
What is the stream bitrate / size of such 60 second segment?

Original comment by vadi...@google.com on 7 Jan 2015 at 9:40

GoogleCodeExporter commented 9 years ago
8Mb to 12Mb dependig on bitrate. Our max bitrate is 1600kbps - 1600 / 8 * 60 ~ 
12Mb.

Original comment by vichev.j...@gmail.com on 9 Jan 2015 at 11:18

GoogleCodeExporter commented 9 years ago
60 seconds * 1.5 MB/sec will put you over the size of the source buffer on 
Chromecast:

https://code.google.com/p/chromium/codesearch#chromium/src/media/filters/source_
buffer_platform_lowmem.cc

Original comment by vadi...@google.com on 12 Jan 2015 at 5:05

GoogleCodeExporter commented 9 years ago
1600kbps != 1.5MB :) You have to devide it by 8 to make it in bytes. As i look 
the code you pointed the buffer is 30MB, witch is 30 * 8 = 240mbit.

Original comment by vichev.j...@gmail.com on 13 Jan 2015 at 8:12

GoogleCodeExporter commented 9 years ago
I misread your description to say that you had a 12 Mb stream. Can you try 
breaking your stream into smaller chunks, i.e. 5 or 10 seconds per segment?

Original comment by vadi...@google.com on 13 Jan 2015 at 5:11

GoogleCodeExporter commented 9 years ago
I have a lot of DVR, currently for 60 seconds chunks i have 1.5 million files. 
So it's not practical to partition them in 10 seconds chunks. I'm researching 
the option to make I-Frame playlists and range requests to larger chunks, which 
will solve my problem.

Original comment by vichev.j...@gmail.com on 15 Jan 2015 at 9:31