Roku MKV Movies buffering for 4 seconds when switching chapters or Fast Forward

Server Version#: 1.18.3.2156
Player Version#: Roku 9.2Plex Media Server Logs_2019-12-28_13-18-34.zip (5.5 MB)

I am running Plex server on Synology NAS 918+. I have wired and wireless connected Roku Ultras on different TVs.

I’m not sure if this is normal or not, but when I play Movies 1080p or 480P the playback is not smooth. It typically buffers for around 4 seconds when initially loading, or when switching chapters or Fast Forwarding. This happens on both the wired (Cat 6) and wireless. I’m getting 60mb throughput on wired, and 48mb on wireless roku when checked via settings.

Additionally, the same thing happens when playing movies through the web player in Chrome on my desktop computer (Gigabit etherent). I noticed that when playing MKV movies in VLC on my desktop, changing chapters was instantaneous. By reading through the support forum, someone who had a similar problem with the web player in Chrome, got rid of the buffering problem by installing the Plex Windows App. So I did the same on my desktop, and the buffering was gone completely on my computer.

Since then, however, I have not been able to get rid of the 4 second buffering time from playing movies back on the Roku Ultras (both wired and wireless), even though I’ve experimented with the direct play and allow direct stream (both turned on and off). i even installed a old “test version of plex” that someone mentioned got rid of the problem. But that didn’t solve my issue either.

Is it “normal” to have to buffer for 4 seconds to switch chapters on movies (even 480p moves) given my setup? logs are attached.

I think so. Playing a file through VLC (= VLC opens the movie file itself on the disk) OR using a STREAMING approach (Plex) are 2 completely different things for sure.
Now … in the logs I find the keywork “transcode” quite some times, so If your media is transcoding it is obvious a delay is present!
VLC probably simply reads & plays the file locally so quicker…

So I don’t get any delay or buffering when playing through the Plex Windows App on my desktop. Isn’t that the same thing as playing through the Roku Plex App? Both are streaming, correct?

Both are “streaming” yes, but perhaps the ROKU things does some TRANSCODING and the Windows app probably not. The only way to find out is to play the 2 movies on both the ROKU and the Windows app, then open the Dashboard on the PMS and see what the clients are doing in terms of streaming : Direct Play , Direct Stream or Transcode for the video/audio part.

Eg some info

Ok, I’ve read the link and I see the dashboard, but I’m unsure the exact steps required to see what they are doing in terms of Direct Play, Direct Stream or Transcode. I don’t see those things being monitored or reported on. So if you can give me a quick example on what to look for, and how I would test, that would be great. thanks!

As per attachment when playing something, in this case via a Browser

ok, thanks. I didn’t see that. Yes, so the results are as follows for the 3 different environments. Wired Roku - Plex Desktop App - Plex Web via Chrome. The roku and Chrome player both have delays. Any advise on if there is anything I can do. should I try and force Direct Stream on Roku?

Your Chrome browser will NOT Direct Play an MPEG-2 stream. Period.
Plex for Windows will. It’s muxing containers in that ‘Direct Stream’, but that’s not a problem.

Your Roku should Direct Play (or Direct Stream) an MPEG-2 stream - if you have ‘Allow MPEG-2’ enabled in the app settings. You also need to have the Quality set to original.

Why you have a 480i 11MBps stream is beyond me, but you do so you have to open the quality wide open - or Plex will transcode the quality you have set.

ok, thanks. I will try that on Roku when I get time and see if that does that trick. Regarding the 480i 11MBps stream, I can’t understand why I have that either. It is a dvd ripped via makeMKV. Not sure if I did something wrong…

Well, that actually makes sense. DVDs are often MPEG-2 and interlaced. That could be the reason for the transcode, but we’ll have to see what happens when you ‘Allow MPEG-2’.

MakeMKV is great and all, but sometimes - if you don’t want a lot of transcoding and buffering - You have to employ Handbrake to encode compatible videos for Direct Play. <— or let Plex ‘Optimize’ versions for you.

thanks for the help today, I will need to get back to this tomorrow.

1 Like

So I did the following on the Wired Roku: Checked the box to “Allow MPEG-2”. Set the Quality to “Original”.

The results are as follows.

It seems that this has cut in half the time to switch chapters for lower bitrate movies. The higher bitrate movies still take 4 seconds.

What is odd is that the higher bit rate movies now play flawlessly, yet the lower bit rate movies stutter during playback. Very odd. so these settings will not work.

If there is nothing else I can do to fix this, maybe you can you explain or provide link on how to best encode compatible videos for Direct play using handbrake? maybe that’s the best way to solve this lag issue.

480p

1080p

You don’t get Direct Play - ever.
There’s your delay.
It takes time to mux those streams into a new container and nobody does it more than Roku, for some reason. It takes more time to mux the video into a new container while transcoding a high bit-rate item’s DTS audio track into E-AC3.

Before diving head first into the shallow end of the HandBrake Learning Pool - why not let Plex ‘Optimize’ a version of your ‘slow’ media, play that and see what happens.

Note:
I, right now, have 2 items in my Handbrake Queue and if things go well today I’ll have Season 03 of The Cisco Kid and Season 6 of Ray Donovan on the server ready to be Direct Played by everything in my Plexiverse.

That kind of ‘preventative maintenance’ isn’t for everybody. In fact, that kind of ‘care and feeding’ of media isn’t for hardly anyone. I don’t mind, 'cause my hate of Plex’s Transcoder outweighs any inconvenience realized by encoding (or altering for Direct Play) everything that goes in my Plexiverse. I’m a rare bird.

ok, so I hear you, and will try the optimize function on some select videos. It seems there are a several options. I’m assuming I should be using the “Optimized for TV” setting, although there is a custom setting with various bitrate options. What would be best optimize settings for my particular situation.

Well, the choices are a bit odd, but I’d pay more attention to bit rates and resolutions.

Select a short 480i item - see if you can halve it’s bit rate while keeping it in 480. See what one of those looks like. Shouldn’t take too long - you’ll see how it’s going in the Dashboard.

Ok, so I did 2 optimizations.

Optimize for TV (before I saw your reply) and 1.5mb, 480p. I probably need to continue to experiment and do something in between. I’ve provided what the results were below from the dashboard.

My observations. I see now this is creating additional mp4 files (I should have known that). Not really ideal. Original file was 3 GB, TV one is 1 GB, and the 480p one is 667k.

Either way this DOES solve my problem of chapter skipping taking too long… now chapter skips (on either version) only take a fraction of a second. This does solve my problem, although I’m guessing I’m losing image quality.

However, my hope would be to simply have one file, with no quality degradation. (I always assumed I would be able to achieve this). The other reason for me starting this thread is that I need to convert 100 Music DVDs to MKVs (or I guess maybe Mp4s too) These music DVDs are ones where i use chapter skip frequently. So in the end, Ideally I wouldn’t need or want to have 200 files (for space and management reasons). But if that’s the cost of what I need to do, so be it. Sigh. I’ve also considered slicing each of these DVDs concerts into separate files for each Song played. not sure that’s practical, but I’d love to do that. Nothing is ever easy, is it. I guess no matter what I do, I need to first rip the dvds to MKV, and then either optimize or consider Handbrake. Any other thoughts on this would be appreciated.

1.5mbs

tv

So is there anyway to Direct Play .mkv files, or am I stuck having to make multiple versions of each in mp4 format? That’s what I’m unclear on. In my perfect world I could rip new or alter my existing .mkv files to work instead of using the optimize function with multiple files. Any help here would be appreciated. thanks! I think it was suggested above that this is possible via Handbrake…

MKV files will be fine - in fact, I prefer them.

  1. they aren’t affected by the default position of Local Media Assets
  2. they are more versatile
  3. your Roku will accept either
  4. all the neat tools - you’ll eventually need - work ONLY, or BETTER with MKV files.

Here’s how I do it:
I first rip everything with MakeMKV - removing embedded metadata before the rip - before it ever becomes a problem. <— when you show up in MakeMKV the Title in the right pane is going to be the Embedded Title! Delete it and hit enter and you’ll see that every line on the left changes to it’s ‘naked’ version - without a Title. Congrats, you now know more than 98% of the MakeMKVing Public - and apparently ALL Plex users…lol… let’s continue.

I settle on a bit rate, determined by testing ‘Handbrake Previews’ - you don’t need to test each one. If your file sizes are large, loading and buffering is always longer so your goal should be to make the smallest file you can.

A bit rate of 2450kbps for a DVD (480p) is about twice what I use (and half of the original) - and my eyeballs can’t see enough difference in the original to matter. You should do numerous previews until you finally decide on what ‘Your Bit Rate’ should be. Then you can always use that bit rate and you can stop worrying about it.

‘Average Bit Rate’ does lock Handbrake into a set file size - and I like knowing how big my files are going to be. If they all have the same bit rate, they’ll be of a predictable size… easy.

This thread lays out my settings exactly, so I would suggest you start with my settings exactly - then make small adjustments to the bit rate until you find yours… then go with it:

HD (1080p) will be first - then DVD (480p) is in the lower section.

If your material is Interlaced (MediaInfo will tell you) do absolutely fix that in HB’s Filters. The Default Yadif with no detection works a treat. Live action can be sharpened up with the LapSharp Filter’s default setting, UnSharp - default - works better on animation (I have recently discovered).

If I have set any links to tools - get those, if they’ll work on your OS - 'cause eventually you’ll probably have need of them.

Handbrake will preserve the chapters in an original, but you may (probably will) need to fiddle with the naming of them - or you can do that later with one, or more, of the ‘handy tools’. When you get your chops down, you’ll be doing things on the ‘first pass’ more often, so don’t sweat the little things for now.

Create an audio track, or tracks, that will Direct Play. Period. Don’t create DTS, ATMOS or ANDY 7.1 tracks you can’t use, for instance. Handbrake will do a pretty nifty job of a downmix, but Xmedia Recode will do a better one later - he’s gonna be in one of those ‘handy tool’ links - so you can let HB do the downmix or you can ‘Pass it through’ untouched to fiddle with later. <—my method.

I’m sure a LOT of people would love to use Plex’s Optimizer. Unfortunately it is poorly designed and it’s even poorer execution leaves little doubt you’re gonna need to tackle this one on your own. <—if you optimize a nice version, then try to delete the original - Plex deletes everything… Genius Design? Plex thinks so, but Users have a different view.

Overwhelming? Just remain calm and proceed slowly following all the instructions. Soon you’ll be an old hand and be giving others advice.

Excellent, thanks for the help. I’m looking forward to becoming the old hand. I have the patience to get this right, and yes, help others when the time comes. I’m going to play around for a few days and then report back. Thanks again! Exactly the type of help I was hoping for.

1 Like

Looking forward to your reports. If you have questions I’ll be around - somewhere.

Set HB to create 240 second previews. 4 minutes will give you a few scenes to look at - and also give you an idea how long the encode will take. I ALWAYS use 2 pass with turbo and Average Bit Rate. When you’re constricting HB to a set bit rate, letting it think about what it wants to do with all the dots on the first pass, then putting them there on the next one - works wonders.

De-interlacing tip:
Any De-interlacing will ‘soften’ the image, sometimes a bit, sometimes a lot. Live action can be made a bit ‘crisper’ with a LapSharp default, offsetting some of the ‘softening’ in the De-Interlacer. Preview for yourself. The ‘default’ is fine. It’s just enough to work, and not enough so you can really see what happened - just like it should.

Carry on…