Jump to content
Sign in to follow this  
TrishyMouse

EMBY Theater MP4 Playback Pauses or Freezes

Recommended Posts

TrishyMouse

Greetings,

 

A couple months back I started having a problem on all of my machines running EMBY Theater when attemping to play MP4 content.  The problem is the MP4 content, no matter the application that created it frequently pauses or freezes making the content unwatchable.  The same content plays back just fine on the same PC's using the Edge browser and also plays back just fine on other devices such as our iOS, Android, and Fire Cube devices.

 

The EMBY Theater machines are all Windows 10 Pro with nothing else installed on them.  Some are completely fresh installs, others have been running for years.  Hardware ranges from hex core Xeon to various i7 and i5 configurations.  GPU's are either nVidia or Intel.  The sever is dedicated and is more than ample for the task at hand.  I tend not to think this is hardware related since the same machines playback the same content flawlessly when playing thru a browser.  EMBY Theater plays back other content types just fine, such as MKV.

 

I've ensured both the server and the EMBY Theater clients are always running the latest EMBY software.  So far none of the updates that have come have helped the problem.  I also keep up with Microsoft updates on all of the machines.

 

I have not yet tried converting the MP4's to other content types as there simply too many MP4 videos to make it practical.

 

Thank you for your help and consideration.

Share this post


Link to post
Share on other sites
Guest asrequested

Is this the store app or from the Emby website?

Share this post


Link to post
Share on other sites
TrishyMouse

This is EMBY Theater from the website

Share this post


Link to post
Share on other sites
TrishyMouse

Please find attached the mpv log file with audio and video settings screen caps from my main (high end) theater PC.  I can also post the same from one of the laptops that runs EMBY theater elsewhere in our home if it would be helpful.

 

I'll follow up with the server logs shortly.

 

Thank you for your help

Theater mpv log.txt

post-107556-0-87773900-1554764136_thumb.jpg

post-107556-0-38761100-1554764146_thumb.jpg

post-107556-0-17692700-1554764157_thumb.jpg

post-107556-0-45554300-1554764164_thumb.jpg

Share this post


Link to post
Share on other sites
TrishyMouse

Please find attached the server log file shortly after reproducing the problem.

 

More thank you's...

embyserver.txt

Share this post


Link to post
Share on other sites
Guest asrequested

Ok, so it looks like you are playing the videos, remotely. And seeking is failing, and the stream, ends.

[  41.114][d][ffmpeg] tcp: Starting connection attempt to [I removed the IP] port 8096
[  41.115][v][cplayer] EOF code: 4  
[  41.115][v][ad] Uninit decoder.
[  41.115][d][ao/wasapi] Thread Reset
[  41.115][e][ffmpeg] Seek failed
[  41.115][v][cache] Seeking underlying stream: 52746087 -> 242431
[  41.115][v][vd] Uninit decoder.
[  41.115][d][ffmpeg] tcp: Starting connection attempt to [I removed the IP] port 8096
[  41.115][e][ffmpeg] Seek failed
[  41.115][e][cache] Seek failed
[  41.116][d][cache] request seek: 242431 <= to=52737895 (cur=242431) <= 242431  
[  41.116][v][cache] Dropping cache at pos 52737895, cached range: 242431-242431.
[  41.116][v][cache] Seeking underlying stream: 52746087 -> 52737895
[  41.116][e][ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: stream 0, offset 0x3b2ff: partial file
[  41.116][w][lavf] error reading packet.
[  41.116][v][lavf] EOF reached.
[  41.126][v][cache] Terminating cache...
[  41.126][v][cache] Cache exiting...
[  41.135][d][ffmpeg] AVIOContext: Statistics: 29504643 bytes read, 853 seeks
[  41.135][v][cplayer] finished playback, success (reason 2)

So it looks like the connection is lost. Is this your server, or somebody else's?

Share this post


Link to post
Share on other sites
TrishyMouse

It's my internal server, gigabit wired ethernet to all clients.  No connectivity problems being experienced by other programs or file types.  The catch though, if it were a connectivity issue I would expect Theater to have the same problem with any media type and that using Edge or Chrome to browse the server and play the same MP4 file on the same PC would not work.

 

It pays to note the pause/freezes happen at different points in the mp4 each time we play it/them.

 

Attached to this post is the mpv log from a different machine same problem with mp4 files and a log of the same machine playing an mkv with no problem.

 

Also the server log covering that time frame.

 

Thank you for your continued help

Theater mpv log.txt

Theater mpv log (mkv).txt

embyserver.txt

Share this post


Link to post
Share on other sites
Guest asrequested

Ok so what may be happening is that Theater doesn't have direct access, and everything is going through the server. When you play the files that experience this, pull up the stats for nerds and grab a screenshot. The server shouldn't be getting involved, but for some reason, it is. Post the screenshot of the stats.

Share this post


Link to post
Share on other sites
Guest asrequested

The mkv isn't direct, either. Everything is going through the server. You may want to check network permissions and how you have your library set up

Share this post


Link to post
Share on other sites
TrishyMouse

Stats for Nerds reports Direct Play.  On the laptop I did these captures on I am administrator and am administrator on the server too.  StatNerdMP4-2 is from our primary Theater PC.  On the theater PC the logged on user has local admin but no NT file level access on the server to prevent children and guests from causing problems.

 

I'll try taking ownership of some of the affected MP4's on the server and see if it makes a difference.

 

As always thank you for your help

post-107556-0-44801200-1554833180_thumb.jpg

post-107556-0-88174400-1554833189_thumb.jpg

post-107556-0-21338700-1554833477_thumb.jpg

Share this post


Link to post
Share on other sites
Guest asrequested

This is curious. In the first image it's an mkv stream, with the others it's file. You've got something set up differently, between them. Are they all in the same location? Unfortunately I can't dig too deep, right now.

Share this post


Link to post
Share on other sites
TrishyMouse

They are all in our home on gigabit wired ethernet, we do not allow any connectivity from the outside.  The problem seems to persist if I try via Wi-Fi as well, and its just MP4 files that have the problem.

 

Interestingly I learned that the EMBY Theater version from the Microsoft Store can play MP4's from our sever just fine though I noted it uses Windows Video Player rather than MPV.

 

Unfortunately the store version while it plays the MP4 files fine it seems to want to transcode anything with more than 5.1ch audio down to 5.1 

 

I've also recently tried on a machine that is a member of the NT domain verses one that is not, same problem either method and persists whether I'm logged in as a domain admin or a local only user.

Share this post


Link to post
Share on other sites
Guest asrequested

That's not what I meant. Are they all in the same network location? Same folder? Same drive? This all looks like a network issue. Are you using a NAS?

Share this post


Link to post
Share on other sites
TrishyMouse

Taking ownership of the MP4 files and making sure "everyone" has full control of the files at the NTFS file level did not improve the problem with the MP4 file playback either.

 

At the moment it seems like something to do with the mpv player that the desktop version of Theater uses. 

Share this post


Link to post
Share on other sites
Luke

How have you configured video settings in the app?

Share this post


Link to post
Share on other sites
Guest asrequested

How have you configured video settings in the app?

There are screenshots, above.

Share this post


Link to post
Share on other sites
Luke

Have you tried turning off interpolation and/or going back to defaults?

Share this post


Link to post
Share on other sites
Guest asrequested

Oh hey, I just noticed you've got your display at a non standard resolution. And there's no hardware acceleration. That's some odd upscaling. Can you try changing your resolution to something standard. What GPU do you have? Is this a gaming rig?

Edited by Doofus

Share this post


Link to post
Share on other sites
TrishyMouse

ok, just saw your last post.  They are all on the same standalone Windows 2016 Server which is dedicated to EMBY Server. It runs a pair of Intel Xeon E5-2670 CPU's @ 2.6Ghz (16 physical cores, another 16 hyperthreading cores) with 64GB of RAM.  All of the media files, no more matter the type exist locally on that server on a RAID6 array of 12 drives, the array controller is an LSI 9280 MegaRAID SAS controller.  There is a separate array of SSD's dedicated to transcoding and a separate array for the operating system.  Server side performance has never really been a problem...

 

The server has a 2Gbps load balancing fault tolerant link to our core switch, the clients all get gigabit ethernet from there.  There are no apparent errors logged event viewer and performance monitoring hasn't revealed anything unusual on the server or switch.

 

Clients typically run 30-70Mbps playing back a 4K MKVto a 4K screen, very low cpu utilization 2-4%, gpu 20-30%.  When the EMBY Theater client freezes playing back a 1080p mp4 to any resolution screen client cpu gets up to 5%,GPU up to 30%, LAN drops to 0 then spikes to 700-800Mbps for a few moments then the EMBY client recovers, the LAN then levels out to normal until the playback freezes again.  But its only MP4 file playback that does this and only under Theater.  Other players play the same mp4 file cleanly. 

 

I could see that being interpreted as a network problem however even when I pause playback of the MP4 electron>mpv processes keep spiking the LAN , presumably building up a local cache?  That spiking behavior does not occur when playing back other file formats, just MP4's.  I can manually copy a 35GB file from the server to the client using Windows Explorer and there is no pausing, just a clean transfer.  My ethernet cabling passes all physical tests and is CAT6.

 

(I used to be a server admin before I retired, the server used to host VM's and was my test bed for learning new technologies, now it has a peaceful, sedate life as my families internal media server.  We started using EMBY as I was tired of my kids scratching or losing our discs...)

 

If it's network, why would it only be MP4 files and only on EMBY Theater for desktop clients?  If there were server performance issue I'd expect all file formats to exhibit the problem and I'd expect to see it on all client types too.

 

Don't worry about getting too technical in explanation, if I see something I don't understand I'll look it up or ask.

 

Thank you

Share this post


Link to post
Share on other sites
Guest asrequested

In the bottom screenshot of the stats, you have it at a standard resolution, hwa is being used but you have display sync, enabled. Try turning that off. I'm gonna take a much closer look at this, tonight. Just to make sure, you aren't using an mpv.conf, correct? And you installed directly from the Emby site and haven't used a different mpv build?

Share this post


Link to post
Share on other sites
Guest asrequested

It's actually very easy to test mpv directly, and see if the problem lies there. In the Theater installation directory, look for the mpv folder, in there you'll see mpv.exe, double click and drag a movie on it. It will play. Double click again to maximize it. And see what happens.

Share this post


Link to post
Share on other sites
TrishyMouse

Oh hey, I just noticed you've got your display at a non standard resolution. And there's no hardware acceleration. That's some odd upscaling. Can you try changing your resolution to something standard. What GPU do you have? Is this a gaming rig?

 

The nonstandard resolution I think you're seeing is one set of logs and captures came from my laptop.  The problem persists on our other machines, desktop class connected to either 1080P or 4K TV screens so its not upscaling on the 1080P screen system.  The laptop I'm on has an nVidia GTX1050 GPU (this one is defaults, not setup for acceleration, the Xeon desktop has an nVidia GTX 960 GPU (this one drives our 4K TV), the laptop that drives the screen in the bedroom is using the Intel i5 on CPU GPU (this one drives our 1080P TV).

 

I've tried different acceleration settings on the Xeon desktop, it didn't make a difference.

Share this post


Link to post
Share on other sites
Guest asrequested

The thing with mpv is that just because you turn something on, doesn't always mean it's actually being used. If the conditions aren't met, it will silently disable some things. This is an interesting problem. Tonight I will dig into what is happening. And I'll may have you change some things and test. mpv has had many updates that aren't in theater yet. But we'll look at that, later.

Share this post


Link to post
Share on other sites
TrishyMouse

Have you tried turning off interpolation and/or going back to defaults?

 

I have tried turning off interpolation, no effect on the problem.  I've even tried the nuking from orbit approach, reinstall Windows 10 from scratch(applied all updates) and run with a fresh default setting install of EMBY Theater. Still no love playing back our MP4's.  One thing that's bugging me is it used to work, same machines, same mp4 files.  Somewhere something changed and haven't been able to pin it down, something Microsoft did in and update?  Something changed in EMBY Theater for Desktop?  For a second I was going to include nVidia however one of the machines is only running an Intel on CPU GPU and it has the MP4 problem too.

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...