Channels for Roku?

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

Thanks for trying ffmpeg from git. Good to hear the situation has improved.

I guess adding mp3 support is probably the best path forward. I’ll try to find some time next week to wire that up. Ping me in case I forget.

Ok great. Yes, for now at least I think mp3 is the only codec the Roku seems to really like. I am sending you a few sample files now, and the original (clipped) mpeg2 recording they were created from. CRF was set at 30 to make them smaller :grin:, since all we care about is the audio. Thanks again.

If you get a chance, see if any of the rokus can decode ac3 directly.

This got me excited, but after trying it unfortunately it doesn’t work. Even with 2ch ac3 I get no sound to the TV. Roku’s guidelines say that the Roku Ultra can decode ac3 but all other Rokus just pass it through, and apparently that includes 2ch.

I did some further testing to confirm the mp3 solution, since I can directly edit the Roku transcoding profile in plex. By removing AAC as a possible transcode option and forcing mp3 for all two channel downmixes, the problem is completely gone. I can even go back and forth on the same channel between plex and channels and immediately compare. No popping/clicking with mp3, and honestly the sound quality is perceivably better all around for me when using mp3.

Clearly Roku does not like that ffmpeg AAC encoder for some reason.

Hi, just downloaded your app. It is giving the “can’t find DVR” when I first load it from the Roku on my TV. I have an HDHomerun DVR, do I need to do something to the HDHomerun to get it to be recognized?

The app only works with Channels DVR. We do not support hdhomerun dvr.

I have the Channels app setup on my two Apple TVs and they work great, but the Roku TV Channels app isn’t loading any content. I don’t get any errors, just a gray grid. Plex works with live tv, but I like the Channels interface better. Any ideas how to fix this?

The Roku app only works with the Channels DVR running.

I would consider replacing it with an AppleTV or Android/fireTV if you want to have MPEG2 streaming.

It only works if I subscribe to the DVR service? It doesn’t do live tv? It’s a Roku TV, so I’m not replacing it. Plex works for live tv, but was hoping to use Channels.

Correct. That’s what it says in the title of this thread and the first paragraph.

Ok, tmm. I get that this is the thread, but I see a lot of talk about live tv and what the Roku can do, so I was just curious. The thread started in May of last year, so forgive me for asking. And I can stream HDHR from the Roku Media App on the Roku.

The experimental Roku app lets you watch live tv and recordings, but it only works if you have Channels DVR.