Jump to content

Image fragmenting when transcoding


Elayor

Recommended Posts

Elayor

Hi

 

 

I'm having some issues with the quality of my stream.
In some scenes i get some heavy fragmenting of the image. The original File has none of this fragments (I attached two images, one from the stream, one local playback).
Quality is set Auto, transcoding has the same framerate as the original file, i'm in the same network as the server (only one Switch in between) and the CPU is nowhere near heavy load (15-20%).
So i'm kinde confused. Could you check it? Do I have transcoding problems? is it a media problem? Is there anything i could do to fix it? its kinda anoying ^^'.

I tried changing the Browser, changed from Emby Beta to latest and tried near to every setting for transcoding.

Thx

embyserver.txt

ffmpeg-transcode.txt

post-358690-0-98716600-1590694494_thumb.png

post-358690-0-32614800-1590694505_thumb.png

Link to comment
Share on other sites

Hi, does this only happen with vc1 files? And as a test, if you turn off hardware transcoding in the server transcoding menu, how does that compare?

Link to comment
Share on other sites

Elayor

Turning off Hardware transcoding seems to fix it. Now my CPU gets loaded to about 60%.a
I turned it back on and tried h264 files, no fragments.

I couldn't find any other VC1 files. But as it only happens from time to time (definitely not on every file) it could be VC1.

Do you have a guess what is causing it and what to do about it?

Link to comment
Share on other sites

Elayor

Hey
 
I got another problem. I feel like it could be related, but maybe i'm wrong.
So know i have a direct stream, h264. Everything seems fine, but at some points the movie will get glitchy and display some green lines (added a picture and the logfile)
it's always at the same timestamp (for this movie atleast, haven't seen it in others recently). I tried firefox and edge, both the same, both at the same timestamp.
I downloaded the movie to the computer and with local playback there are no problems (so its not the sourcematerial I think?)
 

I dont knwo what to do about that. Emby has always been a little bit glitchy for me, but i always managed to fix it my self somehow. But with this I am not sure where to start.

Thx

 

Update: I forced it to transcode. Now theres no glitch. (more like a workaround and not a solution)

ffmpeg-transcode_20200529.txt

post-358690-0-33824500-1590776639_thumb.png

Edited by Elayor
Link to comment
Share on other sites

mastrmind11

if it works fine locally, and "glitches" at the same timestamp on multiple devices all using your local network, check your throughput.  Sounds like a bitrate burst that is saturating the network.  your transcode log looks perfectly fine.  what happens with the same file when you adjust your max bitrate to appreciably something lower.

Link to comment
Share on other sites

Elayor

I am having that glitch problem on my Desktop PC. Between this PC and the server is only one switch, a 1 Gbps Switch, so I feel like Network schould not be an issue in this case (Correct me if i'm wrong).

If I reduce the Bitrate, therefore forcing it to transcode, the glitch disapears (limited the Stream to 25 Mbps, direct would be 29.8Mbps, not a big diffrence).

I tried streaming the same file to my smartphone using a 2.4 GHz connection in the same Network --> Direct Stream, 29.8 Mbps, no Glitch.

So i could be a decoding problem on the Desktop, would that make sense?

Link to comment
Share on other sites

Hey

 

I got another problem. I feel like it could be related, but maybe i'm wrong.

So know i have a direct stream, h264. Everything seems fine, but at some points the movie will get glitchy and display some green lines (added a picture and the logfile)

it's always at the same timestamp (for this movie atleast, haven't seen it in others recently). I tried firefox and edge, both the same, both at the same timestamp.

I downloaded the movie to the computer and with local playback there are no problems (so its not the sourcematerial I think?)

 

I dont knwo what to do about that. Emby has always been a little bit glitchy for me, but i always managed to fix it my self somehow. But with this I am not sure where to start.

 

Thx

 

Update: I forced it to transcode. Now theres no glitch. (more like a workaround and not a solution)

 

This indicates a problem with the source file. In the log you have posted, the video just gets copied by Emby and the failure happens at the client. 

 

Errors like this can occur due to incorrect encoding. An example would be when the encoder marks the file as conforming to H.264 "Level 4", which makes the client reserve a certain amount of memory for decoding. When the video is encoded in a way that it's violating the Level-Requirements at a certain playback position, it can happen that the client runs out of memory for decoding (because the required memory exceeds the Level-spec).

 

That's just one example, the actual reason might be different. Please understand that we cannot investigate single video files showing a playback issue, as long as there is no specific pattern or context affecting a certain class of video files.

Link to comment
Share on other sites

@@Elayor - If you want to do some investigation on your own, you could look into the ffmpeg log to identifiy the segment numbers used at the time when you're seeing the glitch.

 

Then you can look into your transcoding-temp folder and check whether the segment files corresponding to the playback position are larger than the other segments..

 

 

PS: But as mentioned: It could also be something different, like one or two frames lost during encoding and then it would be a matter of the decoder implementation whether you see some visual artifacts or whether the decoder is able to hide it.

Edited by softworkz
Link to comment
Share on other sites

Elayor

This indicates a problem with the source file. In the log you have posted, the video just gets copied by Emby and the failure happens at the client. 

 

Errors like this can occur due to incorrect encoding. An example would be when the encoder marks the file as conforming to H.264 "Level 4", which makes the client reserve a certain amount of memory for decoding. When the video is encoded in a way that it's violating the Level-Requirements at a certain playback position, it can happen that the client runs out of memory for decoding (because the required memory exceeds the Level-spec).

 

That's just one example, the actual reason might be different. Please understand that we cannot investigate single video files showing a playback issue, as long as there is no specific pattern or context affecting a certain class of video files.

oke, lets assume its a problem with the file. That would explain why transcoding fixes it, as the encoder would adjust the file prior to sending it to the client (right?). And the reason for the smartphone not glitching with the same file while direct streaming would be that the android client handles the decoding different? Same for the local playback, VLC handels the file diffrent than the webbrowser?

I will accept the file beeing broke and keep an eye open for other files and see if there is a pattern.

 

What about the inital problem? fragmenting while hardware transcoding another file? That one got fixed by deactivating hardware transcoding for VC1 files. Aswell a bad file? Or maybe just a limitation of my hardware (i5 6600k)?

Link to comment
Share on other sites

Elayor

@@Elayor - If you want to do some investigation on your own, you could look into the ffmpeg log to identifiy the segment numbers used at the time when you're seeing the glitch.

 

Then you can look into your transcoding-temp folder and check whether the segment files corresponding to the playback position are larger than the other segments..

 

 

PS: But as mentioned: It could also be something different, like one or two frames lost during encoding and then it would be a matter of the decoder implementation whether you see some visual artifacts or whether the decoder is able tI will do this,

I will do this. that way i would at least know whats the problem^^

Thx

Link to comment
Share on other sites

oke, lets assume its a problem with the file. That would explain why transcoding fixes it, as the encoder would adjust the file prior to sending it to the client (right?). And the reason for the smartphone not glitching with the same file while direct streaming would be that the android client handles the decoding different? Same for the local playback, VLC handels the file diffrent than the webbrowser?

Three times 'yes'.

 

I will accept the file beeing broke and keep an eye open for other files and see if there is a pattern.

 

Great. As mentioned: Anything could be possible between 'slightly out of spec' and 'corrupted file'. It could also be a bug in the decoder that manifests just rarely (seeing the same in FireFox and Edge could be due to both using the same hw accelerated decoding). You could try updating Graphics Drivers on the client machine...

 

What about the inital problem? fragmenting while hardware transcoding another file? That one got fixed by deactivating hardware transcoding for VC1 files. Aswell a bad file? Or maybe just a limitation of my hardware (i5 6600k)?

 

HW implementations of VC-1 decoding are typically not as mature as those for AVC and HEVC. What you could try is to choose "Advanced" for hw acceleration and then disable just the VC-1 decoder but leave the H.264 encoder checked.

Then you could try the other way round: Enable VC-1 hw decoding and disable hw encoding.

That might (or might not) give some insights about where the problem might be..

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