ChromeCast Ultra (the new one with HEVC support)

Discuss media renderers like Xbox 360, TVs, smartphones, etc.
zuricksaves
Posts: 12
Joined: Sun Jun 28, 2015 3:30 pm

ChromeCast Ultra (the new one with HEVC support)

Post by zuricksaves »

Currently this config is not yet working. My new ChromecastUltra is still coming up as a normal Chromecast (but I have a temporary workaround)

Probably because the Chromecast hardcodes the renderer file selection:
from:ChromecastMgr.java

ccr = RendererConfiguration.getRendererConfigurationByName("Chromecast");

So I switched the RendererName in the conf files temporarily to test. Success. No transcoding of h265 video from an mkv!


Here are the unswapped changes.

First, I had to change the existing Android-Chromecast.conf:
#UserAgentSearch = Android|CrKey
UserAgentSearch = CrKey.*armv71|armv71.*CrKey

Various revisions had the search keys in different orders. The new one doesn't even add a unique field. The only way we know is the arch build flag. (its aarch64 insteam of armv7)


Google-Android-ChromecastUltra.conf:

RendererName = ChromecastUltra
RendererIcon = chromecast.png

# ============================================================================
# This renderer has sent the following string/s:
#
# User-Agent: Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.84 Safari/537.36 CrKey/1.21a.76178
# ============================================================================
#

UserAgentSearch = CrKey.*aarch64|aarch64.*CrKey

# Note: Set loading priority to 1 to activate this configuration and override Android.conf
LoadingPriority = 1

SeekByTime = exclusive
TranscodeVideo = MPEGTS-H264-AC3
TranscodeAudio = MP3
MaxVideoBitrateMbps = 20
MimeTypesChanges = video/mpeg=video/mp4
CustomFFmpegOptions = -async 1 -fflags +genpts -c:a libmp3lame -ac 2 -b:v 35000k -bufsize 35000k -f matroska
MediaInfo = true

# Supported video formats:
# ChromeCastU seems to be fine with mkv, and plays h265 unlike the classic
Supported = f:mpegts|mp4|mkv v:mp4|h264|h265 a:aac|aac-he|mp3 n:2 m:video/mpeg

# Supported audio formats:
Supported = f:aac n:2 m:audio/aac a:aac|aac-he
Supported = f:mp3 n:2 m:audio/mp3
Supported = f:m4a|mp4 n:2 m:audio/mp4 a:aac|aac-he
Supported = f:wav n:2 m:audio/x-wav a:lpcm

# Supported image formats:
Supported = f:bmp m:image/bmp
Supported = f:gif m:image/gif
Supported = f:jpg m:image/jpeg
Supported = f:png m:image/png

# Supported subtitles formats:
SupportedExternalSubtitlesFormats = WEBVTT
zuricksaves
Posts: 12
Joined: Sun Jun 28, 2015 3:30 pm

Re: ChromeCast Ultra (the new one with HEVC support)

Post by zuricksaves »

I'm not familiar with the java methods, but it looks like instead of setting the renderer by a name key it needs to get the renderer by headers.
zuricksaves
Posts: 12
Joined: Sun Jun 28, 2015 3:30 pm

Re: ChromeCast Ultra (the new one with HEVC support)

Post by zuricksaves »

# Supported video formats:
Supported = f:mpegts|mp4|mkv v:mp4|h264|h265 a:aac|aac-he|mp3|ac3 n:2 m:video/mpeg

Sneaky Google. They added ac3 too.

Now if I could just figure out how to make mkv subs pass through as webvvt subs, I could watch anime without transcoding.
PacoBell
Posts: 1
Joined: Mon Jan 16, 2017 9:07 pm

Re: ChromeCast Ultra (the new one with HEVC support)

Post by PacoBell »

Not to mention being able to switch between embedded audio tracks (especially with dual-audio anime).
zuricksaves
Posts: 12
Joined: Sun Jun 28, 2015 3:30 pm

Re: ChromeCast Ultra (the new one with HEVC support)

Post by zuricksaves »

Actually, the best route for Chromecast+UMS might be a hybrid approach.

Chromecast->BubbleUPNP Server->UMS

So UMS is your media server while BubbleUPNP Server acts as a broker to the Chromecast including handling transcoding, and you use the BubbleUPNP app from your phone to browse/play video.

So if you are like me and have Kodi/PS4/Chromecast clients to UMS, you get better command/control of the Chromecast client and have UMS as your central library and main media server for your other clients.

A defect has been filed for the chromecast-sdk about the lack of ID/capability in their http headers.
User avatar
Sami32
Posts: 851
Joined: Mon Apr 11, 2016 5:09 am

Re: ChromeCast Ultra (the new one with HEVC support)

Post by Sami32 »

@SophiaGill Add these 2 lines into that renderer:

Code: Select all

MaxVideoWidth = 3840
MaxVideoHeight = 2160
And add this renderer configuration file in your /UniversalMediaServer/renderers/ folder.

Hoping that helped.
ioannis
Posts: 3
Joined: Wed Jun 28, 2017 7:43 pm

Re: ChromeCast Ultra (the new one with HEVC support)

Post by ioannis »

Sami32 wrote:@zuricksaves You can try this: https://github.com/UniversalMediaServer ... 1148/files
I've used that, but I still can't get it to not transcode. I still see ffmpeg hogging my CPU. I even tried adding 'hevc' and 'x265' to the list, to no avail:

Code: Select all

Supported = f:mpegts|mp4|mkv          v:mp4|h264|h265|hevc|x265        a:aac|aac-he|mp3|ac3      n:2      m:video/mpeg
any ideas how to debug this?

PS: I should point out that I can successfully stream the same video to chromecast-ultra using 'castnow' (https://github.com/xat/castnow), without transcoding, so I know CCU can handle it just fine.
User avatar
Sami32
Posts: 851
Joined: Mon Apr 11, 2016 5:09 am

Re: ChromeCast Ultra (the new one with HEVC support)

Post by Sami32 »

@ioannis Yes, post your full trace log ;) as explained here (read carefully the 3 first posts)

For a specific Chromecast debugging you can read your UMS.conf file or our Wiki:
https://github.com/UniversalMediaServer ... ChromeCast

P.S.: I should point out that we use this Chromecast library.
The developper of 'castnow' stopped to work on it, and used DLNA instead ;)
Post Reply