Page 1 of 1

Roku files being transcoded when they don't need to be

PostPosted: Wed Jan 18, 2017 11:53 pm
by suidakra
For some reason my h264 encoded movies are being transcoded and I can't figure out why.

1. Is there a way to turn on debugging info on why a video is being decoded or is that not logged in anyway?

Here is the relevant info:

  Code:
  Duration: 01:30:04.54, start: 0.000000, bitrate: 2456 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080
 [SAR 1:1 DAR 16:9], 2388 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (defaul
t)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo,
 fltp, 64 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
At least one output file must be specified



It's also a 4.0 level

I thought maybe this was the relevant part of the the Profile:

  Code:
-<Video targetContainer="mpegts" targetVCodec="h264" maxVBitrate="12000">

<!-- for no surround passthrough comment out the following four lines -->


<Matches container="*" vCodec="h264" aCodec="ac3"/>

<Matches container="*" vCodec="h264" aCodec="eac3"/>

<Matches container="*" vCodec="h264" aCodec="dca"/>

<Matches container="*" vCodec="mpeg2video" aCodec="ac3"/>

<Matches container="*" vCodec="mpeg2video" aCodec="eac3"/>

<Matches container="*" vCodec="mpeg2video" aCodec="dca"/>

<!-- comment the following line if you have files with 5.1ch AAC, Roku only supports 2 channel AAC -->


<!-- <Matches container="*" vCodec="h264" aCodec="aac" /> -->


but as you can see I commented out the h264 with aac section but it is still transcoding. Or am I reading the profile wrong. To me that reads transcode to mpegts if file is any container with h264 vCodec and an aCodec of aac.

The file plays fine if I choose the Samsung C/D profile.

Re: Roku files being transcoded when they don't need to be

PostPosted: Thu Jan 19, 2017 12:40 am
by atc98092
The existing (and only) Roku profile transcodes almost everything because the older models could not keep up with a h264 stream higher than about 15 Mbps. Any Roku built in 2015 or later can handle much higher streams, and of course the 4K boxes even more. However, your particular file has HE-AAC audio, which I don't believe the Roku can handle either.

So, depending on your Roku model, it might be able to handle the stream without transcoding. Since it worked with the Samsung profile, that pretty well proves it. We are working on new Roku profiles that are more tailored to the box's abilities. Right now there's a hangup with transcoding HD audio. Once that issue is resolved, there should be at least four new Roku profiles to support the various models.

If you want to make some tweaks to the profile, you could remove the targetVCodec="h264" maxVBitrate="12000" section and leave the audio transcoding alone. Or simply turn all transcoding off and see how many of your files will play.

Re: Roku files being transcoded when they don't need to be

PostPosted: Thu Jan 19, 2017 1:50 am
by suidakra
Ok I must be mistaken then...

Does -
<Video targetContainer="mpegts" targetVCodec="h264" maxVBitrate="12000">

Not mean what it's going to transcode the matches to?

Re: Roku files being transcoded when they don't need to be

PostPosted: Thu Jan 19, 2017 1:17 pm
by atc98092
suidakra wrote:Ok I must be mistaken then...

Does -
<Video targetContainer="mpegts" targetVCodec="h264" maxVBitrate="12000">

Not mean what it's going to transcode the matches to?


Yes, it does. But if you remove the target video codec then it passes the video through untouched and only transcodes the audio. That's usually referred to as transmuxing. Of course, that particular line does touch the audio either, so in reality you could comment the entire section out. I didn't think that line was video only, so I was assuming you only copied a portion of the line.

What Roku player are you using? Unless you're using an older player like the 2 XS or 2 LT, the max bitrate is probably not needed. For a test, use the generic profile. That transcodes nothing, so you can see which of your videos will play and if there are any playback issues. As I mentioned, new profiles are being developed that better support the newer players.

Re: Roku files being transcoded when they don't need to be

PostPosted: Sun Jan 22, 2017 3:55 pm
by suidakra
Thanks I'll give it a try.

I'm using a Roku 2.

Re: Roku files being transcoded when they don't need to be

PostPosted: Sun Jan 22, 2017 9:06 pm
by atc98092
suidakra wrote:Thanks I'll give it a try.

I'm using a Roku 2.


Unfortunately, there are several different models of Roku 2, so that doesn't precisely tell me which model you have. It makes a difference in its bitrate capacity. Yohu can find out the precise model number in the settings menu, and you can compare it to other versions at https://en.wikipedia.org/wiki/Roku

Re: Roku files being transcoded when they don't need to be

PostPosted: Thu Feb 23, 2017 11:43 pm
by suidakra
It's a Roku 2 (4210)

Re: Roku files being transcoded when they don't need to be

PostPosted: Fri Feb 24, 2017 3:26 am
by atc98092
OK, that has the same hardware as the latest model Roku 3 as well. It should be able to handle a high bitstream as well as my Stick, and I've seen it handle average speeds of 35 Mbps and peaks over 70.

I just looked at the Samsung C/D profile and I think the reason they play with that one is it appears to just be transmuxing the audio, although the exact transcoding profile line is eluding me.

You can completely disable transcoding on the console, but be aware that if you are burning in subtitles it will still transcode even with this box unchecked. And most likely your audio won't work. However, I believe Roku is working on supporting HE-AAC, if it's not already available. If not, you're still going to require transmuxing the audio.

I'm a little stalled right now with the new profiles. Roku had to make a change to their player, and Serviio is also making a change. Once those are completed, I think we'll have some improved profiles to offer fairly quickly.