Jump to content

Emby Theater jerky playback 4K video.


marriedman

Recommended Posts

marriedman

I have one 4K video in my entire library. And this naturally the only movie that has always played with 1960's stop motion animation smoothness. It doesn't matter if I am using a Firestick, Vero4k+, or computer (web browser or embytheater) - it's always jerky. I've tried several different versions of the file, ranging from 5 to 14 GB and it's always the same. The network utilization is never saturated. The only client that will play this video smoothly is my LG TV (that was a shocker). 

I have noticed that if I use the browser or theater in a maximized or fullscreen state, the jerky playback is at it's worse. If I have it restored or at any window size other than fullscreen, the playback is smoother.

Technical data
    Emby Server Version 4.7.11.0 running on QNAP TS-451+
Clients
    LG-75NANO91ANA (TV)
    Firestick
    Firestick 4K
    Vero4K+
    3 coumputers with 8th generation i5's and minimum 4GB RAM, no dedicated video cards.

The only thing I can think that could be the cause is the display on most clients are 1080. However, while troubleshooting this last night, I changed one computer to a outdated Sony Bravia's native resolution (4K) and the problem still persists. 

I have attached an excerpt from the embyserver log. I removed the subtitle search that it does over night and my wife's binge watching background noise. There were no ffmpeg-transcode log, so I didn't have one to attach. Any help appreciated. 

embyserver_2023-03-20.txt

Link to comment
Share on other sites

visproduction

LG TV has a smooth playback option from 2020 for 4K TV's.  You may be using this feature and maybe that explains why LG works better.
See:https://www.lg.com/us/business/press-release/lg-smart-tvs-now-feature-auto-switching-filmmaker-mode-prime-video-content
 

I wonder if Firestick has some firewall type filter built in to check TCP packet traffic.  I remember reading that some Wifi hardware plug in to the TV checks for incoming packets that could be interference coming from printers or other wifi networks.  This feature upgrade was to help users get smoother wifi traffic to the TV.  There was some discussion about turning this feature off to help media server playback.  Sorry, I can't find the the exact info.  I choose to hardwire Ethernet to any setup I work on and bypass Wifi delivery completly.  That could be a quick test to see if Firestick is part of the problem.  Run a temporary Ethernet connect and see if the stuttering stops.

Hope that helps.


 

Link to comment
Share on other sites

rbjtech
23 hours ago, marriedman said:

I have one 4K video in my entire library. And this naturally the only movie that has always played with 1960's stop motion animation smoothness. It doesn't matter if I am using a Firestick, Vero4k+, or computer (web browser or embytheater) - it's always jerky. I've tried several different versions of the file, ranging from 5 to 14 GB and it's always the same. The network utilization is never saturated. The only client that will play this video smoothly is my LG TV (that was a shocker). 

I have noticed that if I use the browser or theater in a maximized or fullscreen state, the jerky playback is at it's worse. If I have it restored or at any window size other than fullscreen, the playback is smoother.

Technical data
    Emby Server Version 4.7.11.0 running on QNAP TS-451+
Clients
    LG-75NANO91ANA (TV)
    Firestick
    Firestick 4K
    Vero4K+
    3 coumputers with 8th generation i5's and minimum 4GB RAM, no dedicated video cards.

The only thing I can think that could be the cause is the display on most clients are 1080. However, while troubleshooting this last night, I changed one computer to a outdated Sony Bravia's native resolution (4K) and the problem still persists. 

I have attached an excerpt from the embyserver log. I removed the subtitle search that it does over night and my wife's binge watching background noise. There were no ffmpeg-transcode log, so I didn't have one to attach. Any help appreciated. 

embyserver_2023-03-20.txt 229.52 kB · 1 download

So what we really need is a 'MediaInfo' extract of the file that has the issues.

It may be the source file if poorly encoded or simply has a very low framerate.  The LG may be inserting frames to make it look better.

Also ensure your TV clients are set to match the video framerate where possible - so if it's a 23.976fps file, then your TV should switch to a 23.976 frame rate.   I don't believe this is your problem, as this is only usually apparent during smooth 'panning'  shots when the mismatch of timing makes things look a little jerky on various frames.

 

 

Edited by rbjtech
Link to comment
Share on other sites

marriedman
4 hours ago, visproduction said:

Run a temporary Ethernet connect and see if the stuttering stops.

Wired connection to my desktop and emby theater still stutters. SMPlayer works fine though.

 

1 hour ago, rbjtech said:

So what we really need is a 'MediaInfo' extract of the file that has the issues.

It may be the source file if poorly encoded or simply has a very low framerate.  The LG may be inserting frames to make it look better.

Also ensure your TV clients are set to match the video framerate where possible - so if it's a 23.976fps file, then your TV should switch to a 23.976 frame rate.   I don't believe this is your problem, as this is only usually apparent during smooth 'panning'  shots when the mismatch of timing makes things look a little jerky on various frames.

I'd be happy provide a MediaInfo extract. How exactly do I do that? As for the TV's, most of them are pretty old and I have no idea where to find that information. I will have to poke around in the menus and look for that.

Link to comment
Share on other sites

marriedman

Just a few more details to add from this evenings tinkering. I watched the CPU usage and network usage on my QNAP. Wasn't even breaking a sweat. less than 15% CPU the entire time. Network adapter never went above 31Mbs. So the video file is not taxing the server hardware at all. Even though the file was a direct play with no transcoding, I tried turning off the subtitles, but that did not have any effect either.

Really got my head scratching on this one.

Link to comment
Share on other sites

visproduction

Maybe the problem media has many subtitles.  Where did you turn subtitles off?  I think turning subtitles off, just means that they are not shown.  Subtitle data is still inside the file.  Does someone know exactly what happens with this issue?

Link to comment
Share on other sites

marriedman
1 hour ago, visproduction said:

Maybe the problem media has many subtitles.  Where did you turn subtitles off?  I think turning subtitles off, just means that they are not shown.

Excellent observation! The file does have english, french, & spanish subtitles as well as the SRT text based that I always use. From the movie information page I turned off the subtitles. I guess I could try disabling subtitles at the server level somewhere. I'll poke around and test that tonight after work.

Link to comment
Share on other sites

visproduction

MM,

I can remove subtitles by copying both audio and video into a new media copy using a program like AVIDemux.  A command line in ffmpeg would also work.  The new media copy is more of a remux and all subtitles are removed.  There are some other apps that can do this.  I think some video utilities just turn the subtitles off, which is perhaps not the ideal option.  Some people like MKVToolnix or MP4Box.  I don't see a way to remux with these tools and remove the subtitles.  Does anyone know how to do this with these tools?

When you are copying (remuxing) audio and video, a 2 hour 1080P media only takes about 2 minutes on a current workstation.  With a correct ffmpeg remux command line like ffmpeg, you could run from a script for 100 videos to clean up subtitle problems in probably under 3 hours.  You would just need to create a ffmpeg command line, per film, and then copy paste the entire code file into a command window in a directory that ffmpeg can run.  

If I want subtitles for a media, I search and find the file online and download a srt, clean it up, if necessary, adjust the timing and rename it as:
 'Foreign film name (2024) - 1080P.en.srt'  

The subtitle pull down will appear inside the Emby media page and match the video with a name:
  'Foreign film name (2024) - 1080P.mp4'

This is a lot extra custom steps and not automated like a plug in, but it works well.

Subtitles are around. I like this site:
Subscene.com
Adjusting the timing can be done:
Sync Shifter

It's sort of tricky work to tweak a subtitle timing to be correct.  Some files are really far off and would take too many corrections.  It's easier to keep searching for a subtitle that fits your media.  When you have a well timed .srt file, the sync doesn't need any playback adjustment.

Do we have a forum post about subtitles?  I am guessing we do not really want to post, even the text of media, in the forum?

Anyway, hope that helps.

Link to comment
Share on other sites

rbjtech

I'm unsure why we are on the topic of subtitles ?

The subtitle's are just muxed into the normal Audio and Video interleave - they are very unlikely to have anything to do with the jerky video if direct playing ? 

You need to test with more 4K videos - The issue may well be the file you have.

  • Thanks 1
Link to comment
Share on other sites

pwhodges
1 hour ago, visproduction said:

Some people like MKVToolnix or MP4Box.  I don't see a way to remux with these tools and remove the subtitles.  Does anyone know how to do this with these tools?

With MKVToolNix GUI it's as easy as: (1) drop file on icon to open program with it loaded; (2) untick the subtitle stream; (3) Click the "Start Multiplexing" button.

Paul

  • Agree 1
Link to comment
Share on other sites

marriedman
14 hours ago, rbjtech said:

I'm unsure why we are on the topic of subtitles ?

I brought the subject up because of the setting under Transcoding:

Quote

Allow subtitle extraction on the fly
Embedded subtitles can be extracted from videos and delivered to Emby apps in plain text in order to help prevent video transcoding. On some systems this can take a long time and cause video playback to stall during the extraction process. Disable this to have embedded subtitles burned in with video transcoding when they are not natively supported by the client device.

*Emphasis mine.

I got home really late last night, so I will try out another 4K file before looking into remuxing applications. @visproductionI usually get my subtitles from opensubtitles and Addic7ed. I never really had good luck on Subscene. Have they gotten better in the last 5 years?

 

  • Like 1
Link to comment
Share on other sites

marriedman

OK, I obtained another 4K movie and the situation is pretty much the same. It's still very choppy, but it definitely moves faster than my first. I have attached the media information from the info screen of the original and new files for testing purposes. Oh, I also used avidemux to convert from MKV to MP4 with no embedded subtitles. The only thing jumping out to me is the bitrate is pretty high at 5 mbps video / 818 kbps audio for the original and 7 mbps video / 320 kbps audio for the new file.

If I show the Stats for Nerds, I do see it dropping frames like crazy. So I am guessing that is the issue? What I don't understand is that if I watch this on the exact same hardware with VLC or SMPlayer, there is no issue. There has to be a setting somewhere that I have missed.

Original File

 

Original file.png

New File

New file.png

 

Edited by marriedman
clarification
Link to comment
Share on other sites

rbjtech

Not sure why you are running it though avidemux ?

The original mp4 should just play - did you try that ?

A 5Mbit/sec 4K file is a very low bitrate - full 4K bitrate is 80-100Mbit/sec - and these play just fine.  So something is very wrong if it's dropping frames.

Link to comment
Share on other sites

marriedman
1 minute ago, rbjtech said:

Not sure why you are running it though avidemux ?

The original mp4 should just play - did you try that ?

A 5Mbit/sec 4K file is a very low bitrate - full 4K bitrate is 80-100Mbit/sec - and these play just fine.  So something is very wrong if it's dropping frames.

The original file was a MKV file that did not play back well anywhere except on my 2020 LG smart TV, hence the start of this thread. I used avidemux to remove embedded subtitles in case extraction was causing the issue.  I just chose to use the MP4 container instead.

Link to comment
Share on other sites

rbjtech

.. but MKV's play fine on any device - so I'm confused why you are attempting to convert it ?

The transcoding 'may' be caused by the embedded subs - but if you don't select them when you play it back - then this won't happen - it will direct play.

 

Link to comment
Share on other sites

marriedman

This file was causing problems and I was attempting to rule out anything that was abnormal. MKV are supposed to play fine, but then again so are 4K movies. I already attempted just turning off subtitle, that didn't work. Removing them completely seemed the logical next step. 

Link to comment
Share on other sites

visproduction

I think Audio AAC LC 320 kbps can cause playback failure.  LC works better only up to 128 kbps, or use an different audio encoding profile type.  I use Audio Profile HE-AAC and a bit rate of 640kbps, (if you use AVIDemux - check the Afterburner box).  All media, with this encoded audio setting, plays back fine on all browsers.

Hope that helps.

Edited by visproduction
Link to comment
Share on other sites

rbjtech
45 minutes ago, visproduction said:

I think Audio AAC LC 320 kbps can cause playback failure.  LC works better only up to 128 kbps, or use an different audio encoding profile type.  I use Audio Profile HE-AAC and a bit rate of 640kbps, (if you use AVIDemux - check the Afterburner box).  All media, with this encoded audio setting, plays back fine on all browsers.

Hope that helps.

AAC LC @ 320 Kbps works just fine on everything I play ... 

I'm a little lost on this thread.

Lets start again - does a normal 4K MKV playback on the the FireTV devices ?

I understand emby to be running on the qnap NAS.

 

 

Link to comment
Share on other sites

marriedman

Went through the devices in the house. LG TV and Firestick's are playing smoothly. Emby Theater and broswer playback are still choppy and are dropping frames regardless of subtitles and MP4 or MKV file format. The Emby Theater PC's are the 8th generation i5's, one being wired and the other wireless.

Link to comment
Share on other sites

rbjtech
34 minutes ago, marriedman said:

Went through the devices in the house. LG TV and Firestick's are playing smoothly. Emby Theater and broswer playback are still choppy and are dropping frames regardless of subtitles and MP4 or MKV file format. The Emby Theater PC's are the 8th generation i5's, one being wired and the other wireless.

This is really really strange - if the files are playing smooth on the firesticks, then there is clearly nothing wrong with either the files or your qnap.

So why are the PC's with ET or a browser having an issue with the same files .. hmm.  

Are the firesticks on the same LAN (either Ethernet or Wifi) as the ET/PC's ?

If you do a 'stats for nerds' on the ET/browser vs the Firesticks - is anything different ?  Do they all show 'Direct Play' ?

Link to comment
Share on other sites

marriedman

Here on my desktop I ET shows Direct Play.  Browser shows transcoding both video and audio.

On the firestick, playback is smooth but it says that it is transcoding because of a "Direct Playback erro..."  For some reason the Stats for Nerds is on the right side of the screen and it truncates the information. I never use the firesticks. I am only really interested in Emby Theater and browser playback playback.

Screenshot_20230324_160752.png

Link to comment
Share on other sites

rbjtech

ok - so there are various issues -

a) The video is only transcoding @ 8.1fps - this is not enough to sustain the playback.  You need a minimum of the framerate - so 24fps - ideally 30+

Your qnap is simply not powerful enough to transcode 4K material - you NEED to direct play

It is transcoding because the browser does not support HEVC - only MS Edge does.

b) is the audio - this is AAC7.1 - and only a handful of players or AVR's will play this.

c) HDR - does your browser and monitor used ET have HDR ?  If not, you are not going to get HDR colours... without tonemapping - and your qnap is not powerful enough for that.

 

Now ET - SHOULD direct play these files without any issues ..

So as an example - this is ET from my machine - it's playing a nearly 60Mbit 4K HEVC file without issues (it dropped 2 frames while it was starting).

But the key thing is - Direct Play - my emby server is having to do no extra work to transcode the video nor the audio.

 

image.png.b74d2d8f1f76911f02fc30c2a8fc378e.png

in ET - check that you have 'Quality' set to match your playback - I would set it to 4K - 100Mbps

image.png.e76b4acaeb267be6ce80beef156b5f98.png

 

So unless you can get Direct Play - I don't believe you will be able to play 4K files without issues.

 

 

Link to comment
Share on other sites

marriedman

Ah, I think I understand what you are saying. Since my QNAP can't do it, it doesn't even try, hence the CPU utilization never going above 15%. I will install emby server on one of the i5 machines and mount the shares and try that.

Wife is home now, so I will have to report back probably tomorrow. Thanks for the help so far.

Link to comment
Share on other sites

rbjtech
1 minute ago, marriedman said:

Ah, I think I understand what you are saying. Since my QNAP can't do it, it doesn't even try, hence the CPU utilization never going above 15%. I will install emby server on one of the i5 machines and mount the shares and try that.

Wife is home now, so I will have to report back probably tomorrow. Thanks for the help so far.

The i5 windows machine will likely be a lot more successful if transcoding is required - but you need to focus on getting it to direct play.   If you can get that bit fixed or understand the reasons why its transcoding - then it work perfectly well from the qnap tbh.

Link to comment
Share on other sites

GrimReaper

I'm having problems following this thread, and the conclusion you've come to personally doesn't seem right nor like a solution; I might be wrong, though:

Topic title: Emby Theater jerky playback 4K video

3 hours ago, marriedman said:

LG TV and Firestick's are playing smoothly.

 

3 hours ago, marriedman said:

Emby Theater and broswer playback are still choppy and are dropping frames

 

1 hour ago, marriedman said:

Here on my desktop I ET shows Direct Play.

 

1 hour ago, marriedman said:

Browser shows transcoding both video and audio.

 

1 hour ago, marriedman said:

On the firestick, playback is smooth but it says that it is transcoding because of a "Direct Playback erro..."

Meaning:

ET (on an 8th gen i5) is already DirectPlaying - and having issues. 

Browser is Transcoding - and having issues

Firestick is Transcoding - and not having issues. 

Ensuring DirectPlay (already happening on ET and being the reason for this whole topic as per OP's statement) will not sort that.

Btw, R, not only Edge - Chromium Marmaduke has been direct playing HEVC for quite some time now, Chrome since recently as well. 

Edited by GrimReaper
  • Thanks 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...