Jump to content

Video stalling for minutes after a few minutes of playback.


HodgeN

Recommended Posts

HodgeN

I've been frustrated by an issue that's been plaguing me for some time now in which playback seems to stall after a couple of minutes and can remain that way for upwards of 5 or 6 minutes before resuming.  This seems to repeat throughout playback of most media I have.

 

I've been happily running Emby for years on FreeNAS (Currently 11.2-U4.1) on an Asrock c2550d4i with 16GiB of memory and I haven't had issues until the last couple of months.

In an attempt to fix issues with playback, I recently reinstalled Emby (Currently Version 4.1.1.0), using makarai's suggested install as follows:

  1. cd /tmp
  2. wget https://raw.githubusercontent.com/ma-karai/iocage-plugin-emby/master/emby-server.json
  3. iocage fetch -P dhcp=on vnet=on bpf=yes allow_raw_sockets=1 -n emby-server.json --branch 'master'

Installation seems to go perfectly, but the playback issues persist.

 

I have tried playback in both chrome and firefox browsers on Windows and Linux, as well as Emby Theatre on my Windows 7 media PC.  When and for how long it pauses seems to fluctuate, but can't pin down a pattern. 

 

When transcoding, it looks from the dashboard like plenty of buffer is created, and doesn't seem to influence the issues at all.

 

I have a gigabit LAN and direct download using the "3 dots" is fast at over 110 MB/sec.  Playing the videos in VLC locally or over the network through SMB is flawless.  I am the only user and only one stream would ever be used.

 

My FreeNAS server has several other jails, but problems remain when they are all shut down.  Reports of cpu load and memory don't seem obviously problematic. 

 

I find the logs a little dizzying to sift through, but I can't see anything that would be causing the problem.  I'm hoping that someone here can help me out.  I'm clearly in over my head and my wife is getting frustrated.

ffmpeg-remux-d2ba8556-9ff2-4e9c-836d-612e0c23a3f2_1.txt

embyserver.txt

Link to comment
Share on other sites

makarai

Hi, I think @@Luke should take a swing to debug your issue. Also, there is a new beta coming out today, i believe, that the new beta will address some of the issues that the recent betas have. 

 

The only other thing i could think of is that there is a permission problem, can you tell me what userid the owner of your testmedia folder has and what emby runs as? to figure this out.

 

login to the shell of emby type

cd /mnt
ls -la

you should get a list with the uids and gids for your mounts. If your data set is not owned by 989 (standard emby user) you might want to change the emby user quickly and give that a try. Lets say your /mnt/testmedia folder is owned by the userid 1337 and the group 1337.

 

type in following within the emby jail shell:

service emby-server stop
pw groupmod emby -n emby -g 1337
pw usermod emby -n emby -u 1337 -g 1337
chown -R emby:emby /var/db/emby(hit tab)
sysrc 'emby_server_user=emby'
service emby-server start
Link to comment
Share on other sites

HodgeN

/mnt/testmedia was owned by 1000:1000 with drwxrwxr-x+ as permissions. 

I'm surprised that write access would impact on playback, but I followed your advice and /mnt/testmedia is owned by emby:emby now.

 

Unfortunately, that hasn't stopped the problem.  
One thing I noticed is that access to the server in general, even for other jails, slows considerably when the playback stalls.  This may be a more widespread issue for me.

Link to comment
Share on other sites

Are you able to reproduce this on videos that do not have any embedded subtitles?

Link to comment
Share on other sites

sluggo45

Your database is locking up frequently:

 

 

SQLitePCL.pretty.SQLiteException: Busy: database is locked

 

Your logs show numerous instances of this when playback is attempted. DB locks are a known cause of playback issues.

 

The most common reason is because folks accidentally run two instances of Emby server at the same time, which is an easy mistake to make on Windows servers but seems unlikely here.

 

Another cause is drive problems, specifically problems with the device the database is located on.

 

Do you have real-time file monitoring enabled for any of your libraries? I've found it's usually better to disable that on BSD systems where Emby is concerned. Not saying that is necessarily related but somewhere to start.

Edited by sluggo45
Link to comment
Share on other sites

 

 

The most common reason is because folks accidentally run two instances of Emby server at the same time.

 

This is a true statement. Can you please try rebooting the machine? thanks.

Link to comment
Share on other sites

@@HodgeN

This video still contains embedded subtitles. As a test, can you try a video that doesn't contain any subtitles? Please let us know how that compares. Thanks !

Link to comment
Share on other sites

sluggo45

You can easily create a "test" version of the mkv you are using (Waterworld) with subtitles stripped using MKVMerge, btw. https://mkvtoolnix.download/downloads.html

 

Load the file, click the subtitles so they aren't checked, choose where you want the new file output, and start. Won't take long either.

 

Then just swap the files (store the original somewhere locally) and do a quick rescan with Emby, then try.

 

It would help narrow the problem down if we could confirm subtitles were involved.

 

Also the most recent server log you posted (Embyserver.txt) looks like a fresh log after a restart, there's no info in there about the playback. Just FYI for when you post more logs.

Link to comment
Share on other sites

HodgeN

Sorry about the delay.  I got caught up with a busy time at work and wasn't able to give it much attention.

 

I've stripped the subtitles from the file as suggested and have included logs from playing both.  

They both stalled at different points in playback but within the first 5 minutes of play, and each continued to play and stall from then on.

 

 

ffmpeg-remux-9537c13a-4491-4d0b-93de-ee9b4036ca09_1.txt

ffmpeg-remux-6b4d0306-1147-460b-8b06-3cdbc0b1cee0_1.txt

embyserver.txt

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