Jump to content

Pixelation and Glitching in Recorded TV using Emby DVR


EmbyKiwi

Recommended Posts

maegibbons

How about you post a server log - with a recording in progress and you then trying to access it

 

as without any data we are just guessing why you get problems and going in circles

Give exact timings when you do things to so we can marry it up.

 

Krs

 

Mark

 

Sent from my SM-N976B using Tapatalk

  • Like 1
Link to post
Share on other sites

I included logs etc in my very first post but I can certainly do it again with a smaller test.

 

I might also try @maegibbon 's suggestion and whip up an Ubuntu machine as I think it might be a bit more straightforward than a docker. At least I'll be able to tell what IP address it has! :-)

Link to post
Share on other sites
dranderson402

I wish I could remember when I switched over to running emby on my i5 system. I used to run mythbuntu on that i5 and switched over a few years ago. I can tell you that the system and tuners are the same today as they were when I switched over and I didn't use to have this problem. I would say the problem started sometime around the time emby server took away the feature to transcode live recordings to mpeg (i think). Might be later. I might have been around the time direct streaming was introduced. I just can't remember for sure but I am sure the problem wasn't always there.

 

I say this to also agree that it probably isn't cpu or system horsepower related. My gut is telling me it's something with how the windows version is handling the streams. Or the streams coming from the hdhr.

 

I've also had other recordings at the same time get pixelated also. If I was recording 3 shows at once and stated one of those shows in progress, all 3 shows would be pixelated at the same times as to when I started to skip forward. I haven't had this problem since switching over to unraid dockers.

 

Here is a support page I found a while back about troubleshooting packet loss on the hdhr. I ran these tests and didn't have any packet loss but I did not run it during a recording. I wasn't sure if it would cancel the stream to emby. But I did go through the common issues and solutions section and none of it helped. Just thought maybe the info might be useful to some.

 

https://info.hdhomerun.com/info/troubleshooting:network_packet_loss

Link to post
Share on other sites
reneboulard

My windows 10 installation of emby does not allow me to watch a show while recording because of pixelation and corruption of recording file.

 

The only way I found to go around the problem was to have emby on linux ubuntu.  That should work on any linux distribution I think.

 

I have explored many options but found Hyper-V on my windows 10 pro to be the best solution to have a linux distribution running on a virtual host.

 

Listed in order of preference :

 

1. Docker for windows is a very easy way to set up emby.  You can mount your local drive so emby for docker can have access to your media library.  I got it running in less than 15 minutes the first time.  (Still running and happy with this solution)

 

2. ubuntu Multipass.  You can set up ubuntu server and mount your local drive to it with just a click. (you will need a bit of linux knowledge to set up the emby server on it after)

 

3. You can setup a full version of Ubuntu in Hyper-V, VirtualBox or another virtual host software. (more complicated but work very well) .

 

I have try all of those and they all work fine.

 

But I would prefer to have the windows 10 version of emby work properly.

Link to post
Share on other sites

My windows 10 installation of emby does not allow me to watch a show while recording because of pixelation and corruption of recording file.

 

Just for clarification - just watching the in-progress video will cause corruption in the recording?  Or, only when seeking within it?

Link to post
Share on other sites
reneboulard

Just for clarification - just watching the in-progress video will cause corruption in the recording?  Or, only when seeking within it?

Both are corrupted.

 

The corruption start once you reach the time you started.  i.e. show started recording at 12h00, you start whatching it at 12h30, corruption in the show will start 30min in the show.  The saved file will have the same corruption that you seen on screen before.  If you record 3 shows at the same time all 3 shows will be corrupted on the time line when you started to view a show while it was recorded.

 

https://emby.media/community/index.php?/topic/83977-live-tv-viewing-while-recording-pixelation-every-3-min/

 

https://emby.media/community/index.php?/topic/80281-live-tv-dvr-recording-problem/&do=findComment&comment=859253

 

before reporting this problem I made sure the problem was not on my side.

 

I added a SSD to the system,  Re-Installed Windows 10 (clean install), change the network cables, change the rooter.  Made sure there was nothing else running on the system that could interfere with emby.

Installed emby on another windows computer.

 

The problem may be in windows 10 itself - or emby version for windows, but this is beyond me.

 

Hope this help.

Link to post
Share on other sites

Both are corrupted.

 

The corruption start once you reach the time you started.  i.e. show started recording at 12h00, you start whatching it at 12h30, corruption in the show will start 30min in the show.  The saved file will have the same corruption that you seen on screen before.  If you record 3 shows at the same time all 3 shows will be corrupted on the time line when you started to view a show while it was recorded.

 

https://emby.media/community/index.php?/topic/83977-live-tv-viewing-while-recording-pixelation-every-3-min/

 

https://emby.media/community/index.php?/topic/80281-live-tv-dvr-recording-problem/&do=findComment&comment=859253

 

before reporting this problem I made sure the problem was not on my side.

 

I added a SSD to the system,  Re-Installed Windows 10 (clean install), change the network cables, change the rooter.  Made sure there was nothing else running on the system that could interfere with emby.

Installed emby on another windows computer.

 

The problem may be in windows 10 itself - or emby version for windows, but this is beyond me.

 

Hope this help.

 

So you are not doing any seeking or skipping in the viewed program at all?

Link to post
Share on other sites
reneboulard

So you are not doing any seeking or skipping in the viewed program at all?

I try it both ways, without seeking and with seeking, same result.

 

Question : I am using hdhomerun tuner, how does emby handle the video stream? I can see two files been recorded at the same time for a single recording, one in the library folder another on in the transcoding-temp. And when playing the file a lot a small files are also created in the transcoding-temp directory. That make a lot of I/O for one recording. Is there any processing of the video stream before it is recorded? Somewhere in that chain of event the video stream get corrupted. I used NextPvr for a long time, it only record to a single file and stream from that file when you watch a show while it is recording. Seem more efficient to me.

Link to post
Share on other sites
maegibbons

@@ebr

 

Funnily enough it happened to me just tonight. I see it very rarely. So rarely that I cannot reproduce it at will like others.

 

But tonight "Bake off" started to record. I started watching it 5 minutes in-progress and when I got to the 5 minute point I got pixrlation and glitching.

 

No ff or rw required.

 

I think its a low level timing issue in either .net core or Windows but thats just a hunch.

 

I am not sure if emby has any dependancies linked to later .net core releases but if not it would be good to get a version compiled against an old .net core that those who can replicate the problem could try to prove/disprove the theory.

 

Krs

 

Mark

 

A 'like' is always appreciated!

Link to post
Share on other sites

@@ebr

 

I have to say that it would be rare to ever watch a show without skipping forwards. I always have a 3 minute buffer at the start in case the Network's clock is a bit faster than mine so the first thing I do upon starting watching is usually to skip forwards 2-3 minutes. Then, I always skip through the ads so I doubt I have ever watched a program and not skipped.

 

That aside, my experience has been the same as @@reneboulard in that skipping is definitely cause for glitching. I have taken to waiting till it has finished recording before playing and get consistently good quality recordings so I don't think it is something in the stream from the HD Homeruns.

 

I have built a temporary Ubuntu server on an old PC and will do some testing on this to see if I get better results.

Link to post
Share on other sites
Frostbach

Played around a bit with this inside of a Parallels VM using a fresh install. (note: tried both 4.3.1.0 and 4.4.2.0. 4.3.1.0 seemed to work fine, which parallels what I'm seeing on my actual server)

 

I think this is actually pretty easy to reproduce. Just start a recording manually, go to recordings and start watching the in progress recording. The video will pixelate and glitch quite a bit. I noticed that the resulting recording will sometimes have corruption, but it seems like it might not be as frequent or necessarily in exactly the same spot as watching the in progress recording.

 

Has anyone from Emby looked at the direct stream logs that reneboulard posted in his linked thread, above? They throw quite a lot of "PES packet size mismatch" errors. Seems like this is probably related, because I'm seeing the same thing when the video stream is glitchy.

Link to post
Share on other sites

My windows 10 installation of emby does not allow me to watch a show while recording because of pixelation and corruption of recording file.

 

The only way I found to go around the problem was to have emby on linux ubuntu.  That should work on any linux distribution I think.

 

I have explored many options but found Hyper-V on my windows 10 pro to be the best solution to have a linux distribution running on a virtual host.

 

Listed in order of preference :

 

1. Docker for windows is a very easy way to set up emby.  You can mount your local drive so emby for docker can have access to your media library.  I got it running in less than 15 minutes the first time.  (Still running and happy with this solution)

 

2. ubuntu Multipass.  You can set up ubuntu server and mount your local drive to it with just a click. (you will need a bit of linux knowledge to set up the emby server on it after)

 

3. You can setup a full version of Ubuntu in Hyper-V, VirtualBox or another virtual host software. (more complicated but work very well) .

 

I have try all of those and they all work fine.

 

But I would prefer to have the windows 10 version of emby work properly.

@@reneboulard

It looks like the docker version is the way to go.  My wife and I are getting a little disgusted with the pixelation and I refuse to revert back to cable.  I have installed docker on my Windows 10 pro box which is the same box that has the windows native version Emby installed.  I intend to shut off the native version  once I can get the docker version working.  I have not used docker before and my experience wit Linux/Unix is about 25 years ago.  I have docker installed and working and I hope to be able to access the local drives on the Windows 10 box from the docker instance of Emby.  I have been doing some googling, but I wonder if you have any tips/how to's to get Emby under docker working?  A sample yaml file would be awesome plus any other advice you might have.  Any info would be much appreciated.  If I strike out with docker and the Windows version of Emby is still not fixed, I may try Ubuntu in a VM on Windows 10.  Thanks.

Link to post
Share on other sites
reneboulard

@@reneboulard

It looks like the docker version is the way to go.  My wife and I are getting a little disgusted with the pixelation and I refuse to revert back to cable.  I have installed docker on my Windows 10 pro box which is the same box that has the windows native version Emby installed.  I intend to shut off the native version  once I can get the docker version working.  I have not used docker before and my experience wit Linux/Unix is about 25 years ago.  I have docker installed and working and I hope to be able to access the local drives on the Windows 10 box from the docker instance of Emby.  I have been doing some googling, but I wonder if you have any tips/how to's to get Emby under docker working?  A sample yaml file would be awesome plus any other advice you might have.  Any info would be much appreciated.  If I strike out with docker and the Windows version of Emby is still not fixed, I may try Ubuntu in a VM on Windows 10.  Thanks.

 

I use cmd.exe to setup docker with emby on my windows machine.  Use cmd.exe as admin.  This is the command in one line :

 
docker run -d -e TZ=America/Montreal --name emby_4_4_2_0  --volume /host_mnt/d/Temp:/config --volume G:\NVIDIA_SHIELD:/mnt/share1 --volume D:\Temp:/mnt/share2 --volume D:\NVIDIA_SHIELD:/mnt/share3 --publish 8097:8096 --publish 8921:8920 --env UID=1000 --env GID=100 --env GIDLIST=100 emby/embyserver:latest
 
Change the command to suit your need :
 
TZ = TimeZone
--volume is to mount a volume in emby from local system 
I put the /config volume outside the docker container on my d:\Temp  so metadata logs files etc will be available in windows.
I have two other mount to point to my library on windows. one on G: another on D:
--publish to set port number emby will run on
I still have emby running on my windows machine, so I set different ports for emby in docker.
To access emby I use http://localhost:8097
 
 

 

 

Link to post
Share on other sites

Thanks for the pointers @reneboulard, it has saved a lot of time.  I have it running (sort of)  I can connect from the local host and from a client if I use the IP address/port.  My main problem is I'm not familiar with docker and I lose my Emby config when I restart the host, but I'm working on it and searching.  If I have a more specific question I may get back to you if you're willing.  Thanks for the direction.

Link to post
Share on other sites
reneboulard

Thanks for the pointers @reneboulard, it has saved a lot of time.  I have it running (sort of)  I can connect from the local host and from a client if I use the IP address/port.  My main problem is I'm not familiar with docker and I lose my Emby config when I restart the host, but I'm working on it and searching.  If I have a more specific question I may get back to you if you're willing.  Thanks for the direction.

 

In order to have your config persit you need to have the /config directory point outside your docker container.

 

1 Create a directory in windows :   example d:\embyconfig

 

2. On your command line to setup your docker container for emby you need to mount this directory like so

 

--volume /host_mnt/d/embyconfig:/config

 

this way all of emby config files will be in your windows d:\embyconfig directory.

Link to post
Share on other sites

Long story short.... My Ubuntu test also failed ... details as follows::

 

So I built an Ubuntu desktop out of an older Phenom 4 Core PC I had lying around with an older 120GB SSD and 8GB RAM and then installed Emby server.  I added one of my HD Homeruns as the DVR tuner and started testing.  During recording the CPU utililisation was around 10-13% and RAM usage was less then 2GB.

 

I then did a variety of tests starting recording and then waiting 10 minutes or so before watching from my TCL Android TV and then skipping forwards and continuing watching. In all cases, once I caught up to where it had been recording when I skipped forward, corruption appeared in the stream. In some cases the corruption seemed to upset the server significantly and CPU utilisation went to 100% on all 4 cores and the recording just hung. It seemed to be trying to transcode the stream without having a graphics card to offload to.

 

Summary of timings from attached logs session::

  • 10:03 hit record for 10:05 program (with 3 minute pre-buffer so immediate start recording)
  • 10:17/10:18 start watching and skipped first 2 minutes then watched without skipping but occasionally pausing to see how far I was through the recording. No issues at all for first 14 minutes.
  • At just over 15 minutes into recording, glitching and pixelation occured.

I've attached the various logs from this recording session from the Ubuntu Emby server.

 

Someone earlier mentioned "PES packet size mismatch" errors which are certainly present in my log files, along with others.

 

I'm beginning to wonder if my issue is something about the interaction between my TV and the server rather than just the server and the limitations of the TV are causing the server to do something weird??

 

Anyway... hope other like @@dougward have better luck with his docker trial.

 

Cheers

 
 
 

 

embyserver.txt

ffmpeg-directstream-3f16b2cf-8dc8-4753-bb28-7055c01b59c0_1.txt

ffmpeg-directstream-81d4d5e0-54c8-4723-8156-55aec624c229_1.txt

ffmpeg-directstream-382f49c8-a101-44be-bea9-34ca5ef2c7ee_1.txt

ffmpeg-transcode-59c8dc19-7951-4d58-8f84-32bc935a2cba_1.txt

Link to post
Share on other sites
Frostbach

The “PES packet size mismatch” was mentioned by me.

 

I noticed this was the same error that was being thrown by both the direct stream and the transcode logs when this was happening (the transcode was throwing a bunch of other errors, but that was probably due to trying to re-encode the bad stream).

 

As I mentioned yesterday, I was able to simply reproduce this by starting a manual recording and then just watching the in progress recording immediately after it starts recording. No skipping forward required.

Link to post
Share on other sites
dranderson402
It seemed to be trying to transcode the stream without having a graphics card to offload to.

It is possible the CPU being used for transcoding is the culprit in this case. Do you have an old gpu you can use to test?

Link to post
Share on other sites

I would say my Emby Docker trial is a success but I've only been using it for a day.  The vast majority of the credit goes to @@reneboulard for getting me started.  A lot of the remaining info in this post is googled from from other sources.

 

I was able to record a couple of shows simultaneously and start watching one while it was still recording with no pixelation issues.  I did this test a few times; once I started watching 30 minutes into a 60 minute program using fast forward, pause, and rewind with no issues. There was one occasion where there was a problem which happened when a show was recording and being watched.  I didn't go back and start watching the show from the recording, the TV was already on the station when the recording started of that show.  I don't recall if I fast forwarded, paused, did nothing, but the client app stopped displaying the show, returned to the guide, and the recording was aborted for no apparent reason.  This was my first attempt with the client app and Emby on Docker and it hasn't happened since.  BTW I use Fire sticks and Fire TV cubes for clients.  This incident happened using the Emby client on the second generation Fire TV Cube.  Side note: IMO the second generation Fire TV cube is significantly faster than the first generation cube.

 

The details for those interested:

I have a Dell 9010 i7-3770 running Windows 10 Pro (the Pro version is required for docker) with no discrete video card, 16GB of RAM, a 250GB SSD for the OS (c:) ,  2TB and 4TB mechanical drives (d: and e:) and a 512GB SSD (f:)  Docker is installed using the standard install not using Windows containers when the install asks.  For the resource settings in Docker I bumped up the number CPUs to 6, increased memory to 7GB, and increased swap to 2.5GB.  Some of these settings may be overkill, but I figure it's not hurting anything and this machine is only used for Emby. I also use portainer to help manage Docker, 

https://medium.com/@karthi.net/top-6-gui-tools-for-managing-docker-environments-ee2d69ba5a4f 

 

Portainer is installed from an elevated command prompt in windows.

 

docker run -d -p 9000:9000 --restart always -v /var/run/docker.sock:/var/run/docker.sock -v /opt/portainer:/data portainer/portainer

 

My command line to install and run docker (again many thanks to @@reneboulard) executed from an elevated command prompt:

 

docker run -d -e TZ=America/Chicago --name embyDocker  --volume c:\EmbyConfig\:/config --volume c:\Transcode\:/mnt/Transcode --volume c:\EmbyDockerBackup\:/mnt/EmbyBackup --volume e:\:/mnt/Media --volume F:\:/mnt/DVR --publish 8096:8096 --publish 8920:8920 --env UID=1000 --env GID=100 --env GIDLIST=100 emby/embyserver:latest

 

I went ahead and used ports 8096 and 8920 as I intend this to replace my native Windows install.  During initial attempts, I did use 8097 and 8921 so the Docker install could reside along side the Windows install. @@reneboulard suggested the following command line segment

--publish 8097:8096 --publish 8921:8920 

so the Docker install did not step on the Windows install. 

 

On the Emby host I created the following folders before running the Docker Emby command:

c:\embyconfig - stores of the Emby settings outside of Docker in the Windows native file system

c:\transcode - I don't believe this folder is being used since a transcode folder was created inside of  c:\embyconfig when the container was run.  No big deal since the transcode folder is still on the desired SSD

c:\EmbyDockerBackup  - used for the Emby Backup Plugin

F:\DVR

No additional folders were created on e: specifically for the Docker install but that drive already contained folders for movies, TV shows, Videos, and pictures which were used in the Emby setup for the libraries after the install.  This is why the entire e: drive is listed for /mnt/Media  The DVR folder resides on an SSD.

 

I went into Portainer and set the Emby container to always restart, I suppose I could have done that on the command line.  Another observation at least in my setup is that it takes the Emby server a few minutes to be responsive to clients even after Docker has started and Portainer says the Emby Docker container is running.  I specifically noticed this after installing the backup plugin and rebooted.  Emby clients were not connecting to the server, but after a few minutes, all was well and the backup plugin worked.  Apparently, patience is a virtue.

 

I tried to use the recording schedules from my Windows install, files located here (the Windows equivalent path)

https://emby.media/community/index.php?/topic/71236-restore-from-backup-missing-live-tv-series-and-favorites/

and after correctly editing (I believe) the mount points referenced in the files to transition from native Windows to Docker, I could not get Emby to work/start.  Portainer said Emby was running, but I was unable to connect.  This could also have been a problem I referenced earlier, having patience for Emby to be responsive after restarting/rebooting.  Anyway, at this point, I just removed the container and setup Emby again then manually setup the recording schedules.

 

I left out the d: drive on the Emby run/install command line since it is not used.  I wish I would have included it on the command line for the Emby install, so I could use that drive later.  I suppose there is a way to do this without starting over again.

 

Good luck!!

Link to post
Share on other sites

Thanks @@dougward for that detailed description of your docker experience and congratulations on your success! :-) 

 

Having had less success with Ubuntu on an older PC it might be time to upgrade to Win 10 Pro on my Emby server and try the docker again more seriously. Both you and dranderson402 seem to have had success with docker even though his was on Unraid.

 

Well done and thanks also to @@reneboulard for his help!

Link to post
Share on other sites
  • 2 weeks later...

Well, as much as I had hoped my Docker install fixed the problem, it did not, or at least there is a different problem.  At this point, this issue may not belong in this thread. This issue has happened at least twice now with a two hour recording but I don't believe I have seen it with a one hour recording. I didn't jot down the specifics and times, but when it happens again I'll upload logs and times.  The server is the latest version of Emby server on Docker in Windows 10 Pro.  The client is the Fire TV client on a Fire TV Cube 2nd generation.

 

When watching two hour recording in progress, after a period of watching, the playback will just jump back to the beginning of the recording and I'm unable to fast forward back to the point where it jumped.  I don't believe that jumping back to the beginning coincides with the length of time I have been watching, but I'll confirm.  If I let the recording finish, then go back to watching it, the startup page for the recording will show 'play from mm:ss' the number of minutes:seconds where the playback messed up and I am able to finish watching with no pixelation or other issues. I'm able to fast forward, rewind, and pause; the recorded video is fine.  Looking through some other threads, it looks like others have had playing a recording in progress issues.  Thanks.

Link to post
Share on other sites
  • 2 weeks later...

Has anyone found a solution to this problem? I am having the same issue with pixelation when watching a recording if any other recording is in progress. It seems like it started with the last Emby server update. I am running emby client on FireTV Cube. Server is running windows 10 Pro Version 1909, build 18363.815. Emby server version 4.4.2.0.

 

I thought about trying the docker version but I am using a Happauge quad tuner card and wintv for receiving OTA TV and I'm not sure if the docker version will work with that setup.

Link to post
Share on other sites
reneboulard

Has anyone found a solution to this problem? I am having the same issue with pixelation when watching a recording if any other recording is in progress. It seems like it started with the last Emby server update. I am running emby client on FireTV Cube. Server is running windows 10 Pro Version 1909, build 18363.815. Emby server version 4.4.2.0.

 

I thought about trying the docker version but I am using a Happauge quad tuner card and wintv for receiving OTA TV and I'm not sure if the docker version will work with that setup.

It should work without any problem, the docker version of emby have all the same feature of regular emby, it just run in a linux container. Therefore if your TV tuners work on the windows version it should work in the docker version of emby.

Link to post
Share on other sites
dougward

I have had better success with Emby installed in Docker than running in Windows, though not perfect.  I don't have pixelation issues when viewing a recording in progress, but sometimes it seems as though playback will just go 'out to lunch' when fast forwarding or rewinding and playback will just freeze.  Sometimes waiting it out for 30 seconds or so will fix it, sometimes rewinding one 'click' will fix it, sometimes returning to the recorded show's title page then resuming playback fixes it.  In all cases the recording has not been affected, yet.  I don't know if it's  my hardware which is an older i7-3770, but I do have SSDs (see previous post) or the client software for the Amazon Fire TV.  Looks like the latest beta development for the Amazon client is approaching two months from the latest stable, so hopefully there is a new stable client soon.   I've been contemplating a refurb Dell with an i7-6700 or a Xeon E3-1245 v5 (suggestions welcome) for my Emby server but I'm not sure I want to invest $500 or so for an upgrade which may not fix the problem.  I'm also not sure if Emby will be able to take advantage of hardware acceleration with the built on Intel HD graphics running through Docker, or at least it may require additional config?

 

The good thing about the Docker install, it's easy to try beta versions or stable versions by just pointing to different config directories with the 'run' command (see previous post) or different installs using different ports.

Link to post
Share on other sites
Q-Droid

I have had better success with Emby installed in Docker than running in Windows, though not perfect.  I don't have pixelation issues when viewing a recording in progress, but sometimes it seems as though playback will just go 'out to lunch' when fast forwarding or rewinding and playback will just freeze.  Sometimes waiting it out for 30 seconds or so will fix it, sometimes rewinding one 'click' will fix it, sometimes returning to the recorded show's title page then resuming playback fixes it.  

 

I'm not saying this is your issue but Emby does let you skip "past the end" of a live stream and/or recording in progress. When it happens you can let it catch up to the current playback time or skip back to find it.

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
×
×
  • Create New...