Jump to content

MPEG2 (ATSC) Playback on Roku Stick / Stick+ is very glitchy


ProperlyFormattedDataFile

Recommended Posts

ProperlyFormattedDataFile

Hi,

 

I'm using Emby 4.1.1.0 on Linux with an HD Homerun for Live TV.  Playing back MPEG2 content without transcoding results in a lot of graphical glitches that aren't present in the recording itself when transcoded to H.264 at a similar bandwidth.  For example frames will freeze, or movement in the frame will leave blocky trails.

 

Other than setting the maximum bitrate below the broadcast bitrate, is there any way to force the Roku client to always transcode to H.264?

 

Thanks

Link to comment
Share on other sites

Yes. You do not have to disturb the quality. Play your LiveTV channel. Press down to open the video player osd. Now use the cog/gear on the video player osd. Once that opens the playback settings menu choose "Playback Correction" you may have to do it twice to force a full transcode. Playback Correction can be used multiple times. This is the best way to get there and not sacrifice quality.

 

Make sure to check your HD Homerun for firmware updates too. The most recent one fixed all the problems I was having on mine with buffering and glitches. Well not all the problems but most of them.

Edited by speechles
Link to comment
Share on other sites

ProperlyFormattedDataFile

Thanks!

 

I can confirm that choosing "Playback Correction" twice (first time doesn't work) fixes the problem for that playback.  Is there any way to persist this setting?  As soon as I hit back, even going back to the same show switches back to MPEG2 video.  I don't think it's feasible long term to have to do this for every show I watch live or before I can permanently transcode to H.264.

 

The HD Homerun is on the latest firmware.

Link to comment
Share on other sites

WGB123

I am experiencing the same behavior on my Roku Streaming Stick.  I was surprised to see, when I enabled "Stats for Nerds," that the server was not transcoding the MPEG2.  According to Roku's website, MPEG2 (H.262) isn't one of the supported media file types for any Roku other than Roku TVs.

 

Even when the bitrate is forced much lower, the picture still experieces macroblocking when the server is sending MPEG2.  When forced to transcode to H.264, the picture is stable at maximum bitrate.  This is when using 5 GHz WiFi approximately four feet from router.

 

Update:  Just purchased a Streaming Stick+.  It can play the MPEG2 Live TV without any problems.  Better WiFi?  Faster processor?

Edited by WGB123
Link to comment
Share on other sites

I am experiencing the same behavior on my Roku Streaming Stick.  I was surprised to see, when I enabled "Stats for Nerds," that the server was not transcoding the MPEG2.  According to Roku's website, MPEG2 (H.262) isn't one of the supported media file types for any Roku other than Roku TVs.

 

Even when the bitrate is forced much lower, the picture still experieces macroblocking when the server is sending MPEG2.  When forced to transcode to H.264, the picture is stable at maximum bitrate.  This is when using 5 GHz WiFi approximately four feet from router.

 

Update:  Just purchased a Streaming Stick+.  It can play the MPEG2 Live TV without any problems.  Better WiFi?  Faster processor?

 

It could be a faster CPU. Are they both running the same roku software version?

Link to comment
Share on other sites

WGB123

It could be a faster CPU. Are they both running the same roku software version?

 

 

Stick: Model 3800X; Software version 9.0.0 build 4142-55

 

Stick+: Model 3810X; Software version 9.0.0 build 4142-50

 

According to Wikipedia, they both have the same CPU, ARM Cortex A53, but the Plus model has twice the memory.  The Plus model also has "advanced" wireless (whatever that means), unlike the standard model.

Edited by WGB123
Link to comment
Share on other sites

 

Stick: Model 3800X; Software version 9.0.0 build 4142-55

 

Stick+: Model 3810X; Software version 9.0.0 build 4142-50

 

According to Wikipedia, they both have the same CPU, ARM Cortex A53, but the Plus model has twice the memory.  The Plus model also has "advanced" wireless (whatever that means), unlike the standard model.

 

 

it isn't as well optimized for that other streaming stick variant. The ending numbers differing on your firmware versions. That last -xx being different means its a different architecture. Roku "rushed" to add MPEG2 support since the patent lapsed/expired. They knew LiveTV requires it and otherwise Amazon/Android was going to eat them for lunch as far as hardware purchases to get there. Roku at least put itself in the ball game. But they did so at the expense of a somewhat mediocre experience on the lower-end Roku models.

 

The older streaming stick cannot push the bits as quickly nor does it have a good antenna or as good a WiFi chipset as the streaming stick+. They have the same chipset but the streaming stick (non plus model) has half the cores disabled. To avoid overheating. The streaming stick+ has all the cores enabled and has better integration on the chip.

 

The Roku2/3 have all 4 cores enabled, but when playing back video it is only at any time using 2 of those cores. They keep 2 cores disabled to prevent those older boxes from overheat. The Roku4 expanded on this and added the fan to compensate. All 4 cores enabled allowed 4k video. People hated it.

 

Roku went back to the drawing board for the later Roku models. Now they keep all cores enabled and use smaller scale circuitry. No fans. More fits on the chip and gets integrated now. They have a full partnership with FoxConn.

Edited by speechles
  • Like 1
Link to comment
Share on other sites

ProperlyFormattedDataFile

I have both a Stick and a Stick+.  I can confirm that the Stick+ is better than the Stick, but it's not perfect.  On the Stick, MPEG2 is pretty much unusable whereas on the Stick+ it mostly works with some glitches that are not present when transcoding on the server.  This is with OTA broadcasts, so it's possible the Roku just isn't as good at error correction as ffmpeg.

 

I'm fully willing to believe that the blame for this crappy MPEG2 implementation is on Roku (the support in Plex is equally glitchy).  However, until it actually works, could you please add an option on the Emby player to disable native MPEG2 decoding?  It just isn't very good, and I'd like to avoid needing to force lower bitrate transcodes or repeat the secret handshake mentioned in the second comment.

 

Thanks!

Link to comment
Share on other sites

  • 3 weeks later...
ProperlyFormattedDataFile

Some more data about what streams play (stats for nerds reports these numbers as MB, but I'm pretty sure it means Mb):

 

On the 3800X running OS version 9.1 (Stick):

20Mb/s 1080@30fps: Video plays back at inconsistent speed, often turns into a cascade of large blocks.  Unwatchable

8Mb/s 720@60fps: From watchable with noticeable glitches to perfect depending on the channel.  The channels the play perfectly seem to come in closer to 7Mb/s in the Streaming Info section of stats for nerds, channels with glitches go above 8Mb/s, but I don't have a large enough sample to say if that's a coincidence or not

2Mb/s 480@60fps: Plays back perfectly

 

For now I have the device set to transcode all steams above 6Mb/s, but that's unfortunate because it plays back 10Mb/s H.264 streams perfectly.  I'd still prefer a setting where I could set the stick to just always transcode mpeg2.  It's a die-roll as to whether an 8Mb/s stream is going to work without glitches, and transcoding a 2Mb/s stream doesn't require many resources on the server.

Edited by ProperlyFormattedDataFile
Link to comment
Share on other sites

roberto188

Yeah Roku blows at Mpeg2 implementation despite the fact the chips support it at 1080p 60fps from Roku 3 all the way up to the lastest models. For info, if you want flawless mpeg2 decoding/deinterlacing buy an old Roku Premiere+ (4630). Works perfectly.

Link to comment
Share on other sites

  • 1 month later...
ProperlyFormattedDataFile

More data: the Roku Express (3900X) also glitches on 8mbps ATSC (MPEG2) streams.

Link to comment
Share on other sites

hmmm.. I wish my LiveTV signal was better. Damn damn. I may have to get a better antenna so I can do more LiveTV trouble shooting. Having poor signal on the backside of the transmitter. It aims towards town and I am 160 degrees out. So it aims sort of away from me the signal. I will try today to get the antenna in a better location so I can work on this LiveTV issues more. The Roku express might also struggle at higher bitrates. Not sure what the bitrates are of the signals here either. Most are low bandwidth so aren't the best candidates to trouble shoot with. I get a total of 12 channels via OTA so not the best amount either. It is what it is. I will put it on the list to check Mpeg2 on the Roku express and bitrate test..

Link to comment
Share on other sites

ProperlyFormattedDataFile

hmmm.. I wish my LiveTV signal was better. Damn damn. I may have to get a better antenna so I can do more LiveTV trouble shooting. Having poor signal on the backside of the transmitter. It aims towards town and I am 160 degrees out. So it aims sort of away from me the signal. I will try today to get the antenna in a better location so I can work on this LiveTV issues more. The Roku express might also struggle at higher bitrates. Not sure what the bitrates are of the signals here either. Most are low bandwidth so aren't the best candidates to trouble shoot with. I get a total of 12 channels via OTA so not the best amount either. It is what it is. I will put it on the list to check Mpeg2 on the Roku express and bitrate test..

 

It looks like you can do this with just plain mpeg2 videos reencoded with ffmpeg.  The behavior is exactly the same as TV broadcasts, so it's not that Roku is bad at error correction, it's just that it's bad :)

 

ffmpeg -i <some-random-video> -vf scale=1280:720 -codec:v mpeg2video -codec:a mp2 -b:v 6000000 <output.mkv>

 

In my testing, it works on 2mbps, but does not work well on 4mbps and higher.  I can send you some public domain clips I've reencoded to test if that would be useful, but it looks like video uploads aren't allowed to this forum.

Edited by ProperlyFormattedDataFile
Link to comment
Share on other sites

  • 1 month later...
roberto188

No need to look into it. Roku has pretty explicitly said they don't give a shit about mpeg2 implementation. Some devices can do it pretty well, the preimere+ 4630 others only do it partially. The Roku 3 decodes mpeg2 but doesn't interlace, the sticks only do it at low bitrates. It's random bag of performance. Simply can't rely on Roku's for any reliable mpeg2 decoding/deinterlacing. 

Link to comment
Share on other sites

ProperlyFormattedDataFile

No need to look into it. Roku has pretty explicitly said they don't give a shit about mpeg2 implementation. Some devices can do it pretty well, the preimere+ 4630 others only do it partially. The Roku 3 decodes mpeg2 but doesn't interlace, the sticks only do it at low bitrates. It's random bag of performance. Simply can't rely on Roku's for any reliable mpeg2 decoding/deinterlacing. 

 

What I'm asking for from the Emby team in this thread is that they implement an option to always transcode mpeg2 when serving Rokus without needing the ridiculous hacks like hitting "Playback Correction" twice or artificially limiting the bitrate to something well below what the Roku/network can handle for H.264 streams.  If they're willing to do that based on our reports alone, that's great.  If they want to try it out themselves before they're willing to make this change, I've got samples to send them or commands they can execute above.  FWIW, I've never had issues playing 2mbps streams personally, but from what you're saying it sounds like they should just give us the option and not waste their time debugging the degrees of brokenness of each model.  I'm totally with you on that, but I'm also willing to do whatever it takes to get the Emby dev team with you on that :)

Link to comment
Share on other sites

We could consider an option when playing liveTV that would always transcode the video stream. But that may not resolve the issue alone. It would just give you another way to try to alleviate issues. This might be possible. We do want you to be able to have your media your way. But at the same time it is hard to explain options to people and they go WHY DOES LIVETV ALWAYS TRANSCODE? .. and they turned on the setting that makes it do that. Turn that off. So we will get complaints even with the setting. That is what I am trying to explain. We should have a setting like this just so you can use it for troubleshooting purposes and to get problematic periods with high/low radio skip interference less problematic. 

 

It is difficult adding options because we now use multi-language and more text means of course more words that need to be translated. This LiveTV setting would be unique text to the Roku. Languages fully translated already would notice this new English text as the setting would appear in English first before it gets translated. Also have to consider this when adding settings.

 

We will try in one of the upcoming releases to get something into the app setting wise to address this problem. Please stay tuned. We are listening to feeback and all feedback is saying "GIVE ME A SETTING!" Heard loud and clear. :)

  • Like 1
Link to comment
Share on other sites

bizarro252

@@speechles

Thanks, we have discussed this same thing before as I am also still having to use playback correction to play live tv.  Is this setting perhaps something that should be server side within the live tv settings?  To either enable always transcode, always ask to transcode, or never transcode?  Just wondering if that may be a better place for it than within the APP or are we leaning towards in the APP since this seems to be Roku specific?

 

Thanks!

Link to comment
Share on other sites

@@speechles

Thanks, we have discussed this same thing before as I am also still having to use playback correction to play live tv.  Is this setting perhaps something that should be server side within the live tv settings?  To either enable always transcode, always ask to transcode, or never transcode?  Just wondering if that may be a better place for it than within the APP or are we leaning towards in the APP since this seems to be Roku specific?

 

Thanks!

 

I believe we need to have this in the same place as the other LiveTV settings. Inside the Roku app settings. If we detect the user has premiere and access to LiveTV we show these settings. There is a setting to control DirectStreaming of in-progress recordings. In the same way we can allow or not DirectStreaming of LiveTV entirely. This seems the best way to go about it with the least amount of disruption to users. Those who want to transcode LiveTV to eliminate the hiccups can. Those who don't want to even know the setting exists never need to know they can just keep on direct streaming. This seems the best way to keep everyone happy at the same time. Let me get with the team and see what we can do to make this happen.

Edited by speechles
  • Like 1
Link to comment
Share on other sites

bizarro252

@@speechles

It sounds like you also have a rokuTV and an HDHomerun. Same setup as me. While forcing transcoding via the playback correction works it will lock up that tuner until I reboot the emby server. Please include that in your testing when looking to expand this feature :)

Link to comment
Share on other sites

@@speechles

It sounds like you also have a rokuTV and an HDHomerun. Same setup as me. While forcing transcoding via the playback correction works it will lock up that tuner until I reboot the emby server. Please include that in your testing when looking to expand this feature :)

 

We are doing that today. Thank you for the information. That will indeed be part of the testing. It needs to free the tuner when the Roku mysteriously vanishes. It also must clear the active transcode session so the segemented .ts files are deleted. This is all part of the plan. We are actively working on this today.

 

I have an HD Homerun with TCL Roku TV, Roku Ultra (4660 and 4640), Roku Express, Roku Streaming Stick+, Roku 3, and Roku 2 XD. I can test for all these devices. I have a new Roku Ultra version on preorder as well. May also get the Roku Ultra LT version if it really is different.

Edited by speechles
  • Like 1
Link to comment
Share on other sites

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