[Problems] CDS Api -> Android App for Chromecast
I am working on a simple APP for streaming videos to Google Cast (e.g. Chromecast).
I am testing with three files, here the codecs and the result, without transcoding (these errors have Chromecast issues):
1. mkv
Video: H246 - MPEG-4 AVC
Audio: DTS Audio
Streaming: Video OK, but no Sound
2. ts
Video: H246 - MPEG-4 AVC
Audio: A52 Audio (aka AC3) (a52 )
Streaming: not possible
3. avi
Video: MPEG-4 Video (XVID)
Audio: MPEG Audio layer 1/2/3 (mpga)
Streaming: not possible
First try with "applehttp":
Result: No Casting possible.
appletv or HLS returns a m3u8 file, wich is like a playlist. The HLS format cut the stream in many pieces e.g. segment00000.ts
It seems like it is a problem, when I request the m3u8 file, the pieces in the playlist have no authToken, although the m3u8 request was sending one.
Here a snipet from the log file:
Everything is OK:
2014-11-06 01:45:22,637 INFO [LogService] 2014-11-06 01:45:22 192.168.188.31 - - 23424 GET /cds/resource/37/MANIFEST/HLS-0/ORIGINAL.m3u8 profile=gochromecast&authToken=624b9a951ca8404195e66a5836013851 200 - 0 196 http://192.168.188.26:23424 Mozilla/5.0 (Unknown; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.0 Safari/537.36 CrKey/22062 -
2014-11-06 01:45:22,881 DEBUG [CDSRetrieveMediaServerResource] GET http://192.168.188.26:23424/cds/resourc ... ea9eafd4e6 HTTP/1.1, headers = [host: 192.168.188.26:23424,connection: keep-alive,user-agent: Mozilla/5.0 (Unknown; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.0 Safari/537.36 CrKey/22062,origin: https://www.gstatic.com,accept: */*,accept-encoding: gzip,deflate,accept-language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4]
2014-11-06 01:45:22,884 DEBUG [CDSRetrieveMediaServerResource] Creating client with id '192.168.188.31'
then:
2014-11-06 01:45:25,790 INFO [LogService] 2014-11-06 01:45:25 192.168.188.31 - - 23424 GET /cds/resource/37/MEDIA_ITEM/HLS-0/segment00000.ts - 401 - 0 40 http://192.168.188.26:23424 Mozilla/5.0 (Unknown; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.0 Safari/537.36 CrKey/22062 -
2014-11-06 01:45:27,485 WARN [ServiioStatusService] AuthenticationException occured. Returning error code 401 to the REST layer. Message: No authentication token has been provided for a restricted resource.
2014-11-06 01:45:27,486 DEBUG [ServiioStatusService] Detailed exception:
org.serviio.restlet.AuthenticationException: No authentication token has been provided for a restricted resource.
I add the whole log file as attachment, please have a look, perhaps is the error something else.