Channels for Roku?

Hey… I’ll join the beta test for this Roku app as well, if you don’t mind. The Amazon app has been working fine now that I moved my DVR to a capable box, so transcoding works great. I just picked up a cheap Roku TV so I have yet another room to try Channels!

To join the beta, use the link in the first post.

Sorry for another question :). I have two Roku Streaming Stick+ that I was going to replace. Is this Beta far enough along that I should consider keeping them? Application is live TV and DVR with HDHR Prime.

No, this beta is a very early prototype. Might even be better described as an alpha.

1 Like

Downloaded the Roku channel this week and it seems to be working mostly great with a couple of exceptions. I am getting a strange audio distortion with voices (worse with deep voices) on certain content. Is the audio normalized when it is downmixed? It almost sounds like the audio is clipping…

Also are the “up next” or “movies” buttons supposed to do anything or they are not implemented yet? For me nothing loads with those.

So I figured out the up next and movies is for recordings (should have read, doh!).

I have narrowed the sound issue down to being a Roku specific problem, as it doesn’t happen on the web player or when airplayed to one of my older apple TV’s. Is there any way you could let me know what audio settings are being used so I can see if maybe I can reproduce the problem manually converting a file, and then I can see what changes might fix it?

I also have a video of the issue if that might help narrow down what is going on, although I feel like one or two small tweaks to the encode profile for the roku will be enough to probably get rid of it.

@tmm1, are you the right person to ask about this? I would love to try and pin down what causes this issue because It’s the only thing preventing me from using the Roku app on my secondary TVs

Is the audio issue on all channels? What hdhomerun model?

The same encode profile is used for roku, web player and airplay so I’m surprised only one is experiencing issues.

I see it on all channels yes, but certain material is especially bad. The local news (all affiliates) especially the weatherman for some reason is probably the worst offender. But it is definitely present on most programs. I have tested on a Roku 2, 3 and two generations of streaming sticks (the current and previous generation). I am using an HDHR Prime with Comcast. I also brought my HDHDR to another location with Cox and rented a cablecard just to see if it was a Comcast thing, but I had the same issue there.

I have also seen some threads over on the Plex forums with people who seem to be having a similar issue and it seems to be related to something with AAC audio encoding settings. Here is one of them: https://forums.plex.tv/discussion/254084/garbled-aac-stereo-stream-with-direct-play-on-roku-3/p1

I was not able to find a response from Plex in any of these threads (which seems to be the norm over there these days unfortunately) but I do also have a similar issue when watching any material in Plex that has to be transcoded to two channels on those rokus, although I do not have the issue with other material (Amazon, Netflix, etc…)

Happens on both recorded and live?

Yea, same behavior for recorded or live tv

Is there any way you could change the profile for just Roku devices, maybe increase the bitrate and see if that fixes it?
If you are able to tell me the encode settings you are using currently I could go about encoding problematic material myself and then making changes until the issue is resolved, then I can let you know what worked…

The encoding Settings used depend on what you have the “web player” set to. You can run “ps aux | grep ffmpeg” to see the transcoder options being used, or look at http://x:8089/hls

Thank you! I was able to run through a few encodes of an especially problematic piece of programming that would guarantee the issue would crop up. The issue is very clearly with the ffmpeg default aac encoder.

It looks as though the native aac encoder in ffmpeg does not play well with roku. I tried disabling a number of options, changing profiles for the aac codec, and increasing the bitrate (all the way to 320kbps) and all the options resulted in the same popping and clicking audio with extremely low quality on all rokus.

Beyond that, (but of less importance to the issue here) the ffmpeg native aac encoder always encodes in vbr, even if you try to force cbr. The ffmpeg website actually lists the vbr mode of their aac codec as experimental and does not recommend it, so that there could be part of the issue. Perhaps the apple devices more gracefully handle the encoding errors introduced by the encoder?

Either way, I was able to eliminate the issue two ways. First was using the fdkaac library that can be built into ffmpeg and encoding in he-aac. The second was using the lame codec and just doing vbr mp3. libfaac also seems to not have the issue when played on my rokus, but that isn’t supported in ffmpeg anymore, I guess because they are all excited about their “amazing” new native aac codec.

I’m guessing there would be licensing issues for you if you tried to use the fdkaac library, so is there any way you could send audio to rokus as MP3, or maybe add an option to use mp3 audio for the transcoder in the settings? This would immediately fix my problem until ffmpeg admits there is a problem with their codec and fixes it.

1 Like

Thanks for investigating.

I’m surprised to hear the ffmpeg aac encoder is at fault, since I would assume someone else would have noticed this already.

I’d prefer not to have to include another library like lame or fdk if possible.

I wonder if the issue is fixed already in newer versions of ffmpeg. What version did you run your tests with?

I used version 2.8.11 which is older, but I assume if the issue is showing up in channels for me it is still present at least on the version you are using right?

EDIT: Here is a thread on the plex forums with a few people having a similar issue:

Plex actually uses AAC-LC for all transcoding to rokus that are set to stereo now, and I see the same issue with ALL of the material I watch through plex. Which further leads me to think the issue is ffmpeg since they use a modified version as their transcoder. And also to note, I tried resampling to 44.1 khz and that did not stop the issue for me…there is also a thread there with a bunch more people talking about the same issue, but it is plex-pass only so its not publicly viewable

ffmpeg 2.8 is ages old. We use ffmpeg 3.3, but 3.4 is available and 4.0 is going to be released soon.

I work on ffmpeg, so I would like to narrow down this issue and get it fixed in ffmpeg.

What’s weird is no one else here (including me) noticed this on their Rokus. It sounds more like the AAC decoder is broken on some Rokus… what model are you using?

I see the issue on:

Roku 2 (4210)
Roku 3s (4200 and 4230)
Streaming Sticks (3600)

I admit it is strange to me as well that no one else has noticed this. It is really most obvious on local news programming to the point where it drives me nuts, but now that I have heard it, I recognize it pretty frequently in other programming (but again only on rokus…I have tried very hard to hear it on iPhones or ATV and it’s not there).

I do not hear it in on the roku in any other app except channels & plex (which again, also uses ffmpeg as far as I know). Netflix, amazon youtube, etc. are all fine.

Thank you for continuing to investigate this, if it is indeed something that can be fixed in ffmpeg that would be great since it might fix the issue I’m having in plex at the same time. I am more than happy to test things out and provide more help where I can.

I found some references about Rokus not being able to handle 5.1 AAC. However, we’re using -ac 2 to downmix to stereo before encoding to aac, so I don’t think that’s the issue.

Just to confirm, the same aac encoded file plays back fine on a computer or other device via VLC etc, but has distorted audio when played back via the Roku?

Can you email me a short sample file from the channel that’s having issues to [email protected]

I just used the latest git build, with the same settings, and the issue is DRASTICALLY improved. At 192kbps CBR I can actually get the popping and clicking to disappear. There is definitely still some sort of issue with the roku’s decoding of AAC-LC from ffmpeg though. Even though the pops and clicks are gone, a 128kbps VBR mp3 encoding of the same material is of noticeably higher quality than the 192kbps AAC-LC. The AAC files have that “underwater” sound to them, no matter what the bitrate is set at.

1 Like