Jump to content

Any way to play 4K IPTV stream on Roku TV?


Recommended Posts

flashls82
Posted (edited)

I've been fiddling around with IPTV in exploring that as a longer-term solution for some stuff. It works pretty well straight out of the box on my Roku TV (i.e. just with a filtered m3u) with all except the handful of 4K channels, which always get into a transcoding loop that eventually fails. 720p/1080p channels seem to transcode as well, but they work fine. This is from a TS source coming from the IPTV provider, everything running on a UGREEN NAS via Docker with Intel QuickSync hardware acceleration working fine. Also tried running it through Threadfin/setting up as an HDHomerun tuner to see if that'd help, but had the same problem. These same 4K channels play fine on my laptop and on my iPhone/iPad, so this is purely something about getting the format the Roku TV will play.

I am guessing the problem here is that Roku TV wants 4K stuff in an H265 container, for whatever reason it can't handle the original TS file, Emby wants to put it into an H264 container, and it never works. 

But... has anyone had any success playing 4K IPTV files on the Roku app? Any ideas for things to try (e.g. in any processing I could have Threadfin do pre-Emby)? This isn't a huge deal but mildly annoying. 

Edited by flashls82
Edit to clairfy that these streams work on other devices
Posted

@ebrSure, here's a few transcode logs from trying to play one of the channels in question on my Roku TV, and a photo of the "stats for nerds" from my playing the same channel on my iPhone 30 seconds later (where it's doing a total direct stream).

unnamed.png

ffmpeg-transcode-dae204e7-1a3c-438d-9bea-76df2f706853_1.txt ffmpeg-transcode-69510d53-9952-41cd-aa30-cc057298b10b_1 (1).txt ffmpeg-transcode-69510d53-9952-41cd-aa30-cc057298b10b_1.txt

Posted

I would try using VAAPI instead of QSV for your transcoding, just as a test.

To see if that will help with transcoding issues.

>>>>>>  User policy for Andy
        Enable Playback Remuxing: True
        Enable Video Playback Transcoding: True
        Enable Audio Playback Transcoding: True

>>>>>>  Hardware Decoders for hevc
        [X] QuickSync Alder Lake-N UHD Graphics - H.265 (HEVC)
        [ ] VAAPI Alder Lake-N UHD Graphics - H.265 (HEVC)

>>>>>>  Hardware Encoders for h264
        [X] QuickSync Alder Lake-N UHD Graphics - H.264 (AVC)
        [ ] VAAPI Alder Lake-N UHD Graphics - H.264 (AVC)
 

Because of these speeds, they should be over 1.0 just to keep up.

22:22:39.864 elapsed=00:00:00.03 frame=    1 fps=0.0 q=0.0 size=N/A time=00:00:00.00 bitrate=N/A throttle=off speed=   0x    
22:22:40.199 elapsed=00:00:00.54 frame=   24 fps=0.0 q=25.0 size=N/A time=00:00:00.15 bitrate=N/A throttle=off speed=0.293x    
22:22:40.710 elapsed=00:00:01.05 frame=   55 fps= 52 q=14.0 size=N/A time=00:00:00.69 bitrate=N/A throttle=off speed=0.656x    
22:22:41.223 elapsed=00:00:01.56 frame=   84 fps= 54 q=8.0 size=N/A time=00:00:01.11 bitrate=N/A throttle=off speed=0.715x    
22:22:41.719 elapsed=00:00:02.08 frame=  110 fps= 53 q=8.0 size=N/A time=00:00:01.56 bitrate=N/A throttle=off speed=0.753x    
22:22:42.240 elapsed=00:00:02.58 frame=  138 fps= 53 q=8.0 size=N/A time=00:00:02.07 bitrate=N/A throttle=off speed=0.805x    
22:22:42.753 elapsed=00:00:03.09 frame=  165 fps= 53 q=8.0 size=N/A time=00:00:02.50 bitrate=N/A throttle=off speed=0.81x

Posted (edited)

image.thumb.png.bd38f857f1a3e570d09efe5906f37ba2.png

What do you have set for this option? It will default to 30. If you change this option to Yes does it start to work the same as iOS? The framerate of your media is 59.94 which is above the 30 the setting will start at as default.

Edited by speechles
Posted

@speechlesI did try setting this to "yes" and it still got stuck in a transcode loop. Honestly forget whether I had switched it back before I ran the test that generated the logs above but I can share some where it's definitely allowing 60fps if that might help. 

It's transcoding 1080p and 720p channels, too, though, and I'm not clear why it should need to especially since I'm now feeding it HLS to start with (the diffrence is at least those transcodes work fine).

Posted

@NeminemI'll try that and report back. Do you have any idea why it needs to transcode in the first place, though? I thought Roku TV could do HLS 4K HEVC just fine.

Posted
13 hours ago, flashls82 said:

I'm now feeding it HLS to start with

Emby live TV will work much better if you can get the source in TS instead.

Posted

@ebrI can, although was the same result with these 2160p streams on the Roku.

Posted (edited)
Quote

22:22:43.258 elapsed=00:00:03.61 frame=  192 fps= 53 q=13.0 size=N/A time=00:00:02.93 bitrate=N/A throttle=off speed=0.812x    
22:22:43.778 elapsed=00:00:04.12 frame=  221 fps= 54 q=8.0 size=N/A time=00:00:03.46 bitrate=N/A throttle=off speed=0.84x   

This isn't creating at least 1x speed. It isn't in real time. When it is below 1x it is likely stuck in what I like to affectionately call "buffering hell". Where even when it does play it only does so for a few seconds, then it spends 5x that buffering, until you get another 2-3 seconds of playback, then back to buffering. Endlessly. Like this is your punishment in hell. For eternity. It would keep doing it at least until the player either gives up because of endless buffering, or you give up and stop playback, or the end is reached several days/weeks later. Watching a 2 hour movie takes 13 days. The horror. It could be an inspiration for a movie of itself. 

Quote

&hevc-maxframerate=60&hevc-codectag=hvc1,hev1,hevc,hdmv,dvh1,dvhe&

From the log I can see it is indeed allowing 60 fps.

Quote

Stream #0:0: Video: h264, qsv(progressive), 3840x2160 [SAR 1:1 DAR 16:9], q=2-31, 60000 kb/s, 60 fps, 90k tbn

It also is encoding this back at 60 fps. You might test this with VAAPI and see if it can do it faster and in more real time.

If this were a TS file instead you would have much better luck. With the TS file the transcoding should be able to copy both the video/audio streams with a remux. The video stream wouldn't need to become h264. If this is Live TV make sure in the playback settings of the Roku you have the "Enable direct stream of Live TV" set to Yes.  This should still produce a log, but it should either be a Remux or Direct stream rather than Transcode log.

If you just want this to work. 4K to playback you can try to force 30 fps. In playback settings find the "Limit framerate 30fps" and switch it to Yes. This is the global switch to force 30 fps for all video codecs. Remember it is on when later you want to play back something other than that stream in the normal 60 fps directly. This should double your encoding speed from 0.84 to 1.6ish which is above real time. You will be able to watch without endless buffering hell.

Edited by speechles
Posted

@speechlesTried with VAPI and it was stalling out again -- three logs attached that start with "ffmpeg."

However, tried it on a second Roku TV I happen to have downstairs and it worked. Log for that one attached (4k - works.txt). Same source, same transcode settings. Any idea what's going on there/what I could do to recreate the success on my main TV? They're both TCL TVs from around the same time, although not identical models.

Really appreciate the troubleshooting here.

ffmpeg-transcode-8d6759d5-d335-45c0-8cd2-d43f1ce1b37e_1.txt ffmpeg-transcode-d8d29cef-9069-4f5e-9151-96b46947743f_1.txt ffmpeg-transcode-e12cc314-e895-43fa-9b80-ae2816dba1fd_1.txt 4k - works.txt

Posted
Quote

Info    Previous transcoding attempt failed. Falling back to software transcoding.

>>>>>>  FindVideoEncoder - MediaType: h264, UseHardwareCodecs: False, HWA-Mode: Advanced
Info    Checking: 'x264'
Info    Check successful - selecting 'x264'

>>>>>>  FindVideoDecoder - MediaType: hevc, UseHardwareCodecs: False, HWA-Mode: Advanced
Info    Checking: 'Automatic software decoder'
Info    Check successful - selecting 'Automatic software decoder'
Info    Tone Mapping would be desired, but software tone mapping is disabled

The streams that do not play have problems loading for some reason. Maybe a timeout? Does you IPTV provider impose limits on how many concurrent streams you can have? I mean, of course they do. But do you know what those limits are? Is it just 1?

When playback recovery happens on the Roku it is possible that might cause your issue. You might do better with "Direct Stream Live TV" option set to No. That way you reduce the amount of playback recovery changes that will happen. When you set that to No you might get proper playback. It is because the initial stream cannot playback in the original HEVC stream. Playback caused an error which it is able to recover from., When the Roku playback fails directly it immediately tries again with transcoding. But it might do this too quickly. The subscriber count on your IPTV stream might get to 2. Before they can close the last stream that you couldn't play on their end it sees you request another. Do you know how many concurrent subscriber counts you get on that IPTV stream? If it is indeed just 1 The Roku that works might already have this option set to No. The problem is likely the provider only allows so many concurrent streams. When you change that option to No to direct stream it will immediately start with transcoding rather than even try to direct stream. 

If you change that direct stream Live TV option to No does the Roku that couldn't play before now able to play?

flashls82
Posted
On 6/16/2026 at 9:26 AM, speechles said:

The streams that do not play have problems loading for some reason. Maybe a timeout? Does you IPTV provider impose limits on how many concurrent streams you can have? I mean, of course they do. But do you know what those limits are? Is it just 1?

When playback recovery happens on the Roku it is possible that might cause your issue. You might do better with "Direct Stream Live TV" option set to No. That way you reduce the amount of playback recovery changes that will happen. When you set that to No you might get proper playback. It is because the initial stream cannot playback in the original HEVC stream. Playback caused an error which it is able to recover from., When the Roku playback fails directly it immediately tries again with transcoding. But it might do this too quickly. The subscriber count on your IPTV stream might get to 2. Before they can close the last stream that you couldn't play on their end it sees you request another. Do you know how many concurrent subscriber counts you get on that IPTV stream? If it is indeed just 1 The Roku that works might already have this option set to No. The problem is likely the provider only allows so many concurrent streams. When you change that option to No to direct stream it will immediately start with transcoding rather than even try to direct stream. 

If you change that direct stream Live TV option to No does the Roku that couldn't play before now able to play?

Don't think that's it; it works fine with two simultaneous streams but at any rate I have hls-proxy set up as the intermediary and it strictly enforces the connection limit (since I noticed Emby struggles with that). But I did change this setting and no dice; as I think we've seen the problem is it's trying and failing to transcode for this particular TV.

Any other ideas welcome, but sounds like maybe this just isn't going to work with this particular Roku TV? I am confused about why the transcode isn't keeping up for this one, if that is the problem based on the logs, when it is transcoding the same stream to basically the same format just fine for the other tv (i.e. it doesn't seem like this is a processing power issue to me).

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...