Jump to content

Issue playing M3U8 stream on Roku


Recommended Posts

Posted

Thanks for following up.

  • 1 month later...
AmericanMike
Posted
On 7/12/2024 at 9:35 AM, utiac said:

So that was it. Changing that line in /opt/emby-server/bin/emby-vainfo from"

exec $APP_DIR/bin/vainfo "$@"

to:

exec $APP_DIR/bin/emby-vainfo "$@"

has solved the problem at least for my version: emby-server-deb_4.8.8.0_amd64.deb

Streams play fine now.

 

how can we apply this to the Windows build?

Posted

Updating the situation for us, I would say the solution just above was not definitive. There was definitely a script error in executing the correct "vainfo" which collects information about the VA API driver installed in the system, however, this may or may not be of consequence depending on your OS and/or graphics subsystem.

I'm coming to the conclusion that either Roku is simply not a robust enough operating system to handle the task of playing Emby delivered video, or the Emby Roku client still has some issues. We have also tried setting the Roku refresh rate (which is preset to 60fps) to match the output of the native video format, but that has not proven effective:

Settings -> System -> Advanced system settings -> Advanced display settings -> Auto-adjust display refresh rate -> Enabled

The constant timeouts trying to play streams that otherwise play fine in other apps is disappointing and I'm not sure where to go from here. We watch most of our media via a 4K Roku TV so it's too bad we can't get good results with the Emby client.

  • 1 month later...
AmericanMike
Posted

Hi Guys,

I'm still wrestling with playback quality when streaming.  When I choose a channel it will play for about one minute then repeat itself and run okay for several minutes.  In the logs I'm posting the stream ran for 1 minute, repeated itself then ran for several minutes before it looks like it buffered or reloaded but with no lost of content.  I can get this to repeat throughout the show where by the end of an hour show the content is about 5 minutes behind.  I have also experience issues where video would be out of sync with audio by up to 9 seconds or in some cases audio is slowed down where everyone is speaking like Darth Vader.  :)  I have found that this is consistent over my various models of Roku but is not repeatable on the Web version.

thanks for all you do.  Mike

embyserver.txt ffmpeg-transcode-ff5caa9f-d83f-477c-89ba-af99008c039f_1.txt

Posted (edited)

@AmericanMikeI see why this happens.

 

"AverageFrameRate":59.94006,"RealFrameRate":59.94006

10:03:48.370 elapsed=00:00:01.03 frame=  229 fps=222 q=31.0 size=N/A time=00:00:03.75 bitrate=N/A throttle=off speed=3.64x    
10:03:49.044 elapsed=00:00:01.70 frame=  259 fps=152 q=31.0 size=N/A time=00:00:04.26 bitrate=N/A throttle=off speed= 2.5x    
10:03:49.591 elapsed=00:00:02.25 frame=  289 fps=128 q=31.0 size=N/A time=00:00:04.77 bitrate=N/A throttle=off speed=2.12x    
10:03:50.137 elapsed=00:00:02.80 frame=  306 fps=109 q=31.0 size=N/A time=00:00:04.99 bitrate=N/A throttle=off speed=1.78x    
10:03:50.681 elapsed=00:00:03.34 frame=  337 fps=101 q=31.0 size=N/A time=00:00:05.50 bitrate=N/A throttle=off speed=1.65x    
10:03:51.229 elapsed=00:00:03.89 frame=  377 fps= 97 q=31.0 size=N/A time=00:00:06.14 bitrate=N/A throttle=off speed=1.58x  

When your CPU starts off it goes pretty good. High FPS but slowly goes down. Until it falls down here which must be due to thermal throttle.

10:04:09.896 elapsed=00:00:22.55 frame= 1288 fps= 57 q=31.0 size=N/A time=00:00:21.39 bitrate=N/A throttle=off speed=0.949x    
10:04:10.549 elapsed=00:00:23.21 frame= 1319 fps= 57 q=31.0 size=N/A time=00:00:21.90 bitrate=N/A throttle=off speed=0.944x    
10:04:11.105 elapsed=00:00:23.76 frame= 1360 fps= 57 q=31.0 size=N/A time=00:00:22.59 bitrate=N/A throttle=off speed=0.951x    
10:04:11.665 elapsed=00:00:24.32 frame= 1384 fps= 57 q=31.0 size=N/A time=00:00:22.93 bitrate=N/A throttle=off speed=0.943x    
10:04:12.223 elapsed=00:00:24.88 frame= 1415 fps= 57 q=31.0 size=N/A time=00:00:23.48 bitrate=N/A throttle=off speed=0.944x    
10:04:12.797 elapsed=00:00:25.45 frame= 1456 fps= 57 q=29.0 size=N/A time=00:00:24.12 bitrate=N/A throttle=off speed=0.948x

Once it gets here you are no longer transcoding in real time and things go off the rails at this point. It might be buffering hell, lipsync fails, all sorts of other weird behavior.

 

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

>>>>>>  FindVideoDecoder - MediaType: h264, UseHardwareCodecs: True, HWA-Mode: Disabled
Info    Checking: 'Automatic software decoder'
Info    Check successful - selecting 'Automatic software decoder'

 

The CPU processor in the server is not powerful enough to do this in real time using software only.

 

---> TranscodeReasons=ContainerBitrateExceedsLimit

If you change the Video Bitrate to something much higher than it is. Do not use Auto but go high as you can or just choose the highest possible and see if the issue happens again.

10:03:47.336   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
10:03:47.336   Stream #0:1 -> #0:1 (copy)

The audio is supported. Only reason that h264 isn't supported on Roku is the bitrate. Once you raise that limit it will play flawlessly like it does on the web app.

 

 

Edited by speechles
AmericanMike
Posted
52 minutes ago, speechles said:

@AmericanMikeI see why this happens.

 

"AverageFrameRate":59.94006,"RealFrameRate":59.94006

10:03:48.370 elapsed=00:00:01.03 frame=  229 fps=222 q=31.0 size=N/A time=00:00:03.75 bitrate=N/A throttle=off speed=3.64x    
10:03:49.044 elapsed=00:00:01.70 frame=  259 fps=152 q=31.0 size=N/A time=00:00:04.26 bitrate=N/A throttle=off speed= 2.5x    
10:03:49.591 elapsed=00:00:02.25 frame=  289 fps=128 q=31.0 size=N/A time=00:00:04.77 bitrate=N/A throttle=off speed=2.12x    
10:03:50.137 elapsed=00:00:02.80 frame=  306 fps=109 q=31.0 size=N/A time=00:00:04.99 bitrate=N/A throttle=off speed=1.78x    
10:03:50.681 elapsed=00:00:03.34 frame=  337 fps=101 q=31.0 size=N/A time=00:00:05.50 bitrate=N/A throttle=off speed=1.65x    
10:03:51.229 elapsed=00:00:03.89 frame=  377 fps= 97 q=31.0 size=N/A time=00:00:06.14 bitrate=N/A throttle=off speed=1.58x  

When your CPU starts off it goes pretty good. High FPS but slowly goes down. Until it falls down here which must be due to thermal throttle.

10:04:09.896 elapsed=00:00:22.55 frame= 1288 fps= 57 q=31.0 size=N/A time=00:00:21.39 bitrate=N/A throttle=off speed=0.949x    
10:04:10.549 elapsed=00:00:23.21 frame= 1319 fps= 57 q=31.0 size=N/A time=00:00:21.90 bitrate=N/A throttle=off speed=0.944x    
10:04:11.105 elapsed=00:00:23.76 frame= 1360 fps= 57 q=31.0 size=N/A time=00:00:22.59 bitrate=N/A throttle=off speed=0.951x    
10:04:11.665 elapsed=00:00:24.32 frame= 1384 fps= 57 q=31.0 size=N/A time=00:00:22.93 bitrate=N/A throttle=off speed=0.943x    
10:04:12.223 elapsed=00:00:24.88 frame= 1415 fps= 57 q=31.0 size=N/A time=00:00:23.48 bitrate=N/A throttle=off speed=0.944x    
10:04:12.797 elapsed=00:00:25.45 frame= 1456 fps= 57 q=29.0 size=N/A time=00:00:24.12 bitrate=N/A throttle=off speed=0.948x

Once it gets here you are no longer transcoding in real time and things go off the rails at this point. It might be buffering hell, lipsync fails, all sorts of other weird behavior.

 

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

>>>>>>  FindVideoDecoder - MediaType: h264, UseHardwareCodecs: True, HWA-Mode: Disabled
Info    Checking: 'Automatic software decoder'
Info    Check successful - selecting 'Automatic software decoder'

 

The CPU processor in the server is not powerful enough to do this in real time using software only.

 

---> TranscodeReasons=ContainerBitrateExceedsLimit

If you change the Video Bitrate to something much higher than it is. Do not use Auto but go high as you can or just choose the highest possible and see if the issue happens again.

10:03:47.336   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
10:03:47.336   Stream #0:1 -> #0:1 (copy)

The audio is supported. Only reason that h264 isn't supported on Roku is the bitrate. Once you raise that limit it will play flawlessly like it does on the web app.

 

 

thanks for the quick answer.  I have made the change on one of my ROKUs and we'll see how it goes for a few days.

  • Thanks 1
  • 3 months later...
Posted

Any update here on the server side?

AmericanMike
Posted

dang, I should have posted an update......thought I did.

So, I run Server 4.8.10.0 on Windows and since I have turned off "Auto" on the qualit setting but use the highest available I have had very few problems on my Ultra or my Stick. When I have an issue (rarely) I take @Luke's advice and refresh the guide.   On my Roku 2 I do notice more frequent issues that I believe are device related and do have to restart the device to have it work.

All in all my initial issues I had when I created this post have dramatically reduced and I can live with the small glitches that I do experience when I actually do experience them.  The frequency is probably 1 a week at the most and that is with the TV on it at least of of four devices for 12 hours a day.

  • Thanks 1

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...