Jump to content

Bad transcoding quality


karlshea

Recommended Posts

karlshea

Playing an h264 mkv to Kodi does not require transcoding, and the video looks great. Playing to Chrome ("audio codec not supported") or an Apple TV 4K ("container not supported") produces super pixelated transcode with a lot of banding.

HW acceleration is on, preset is Auto (but "slow" still has an issue), and CRF is 18. 

Chrome:

chrome.thumb.png.659b264065d7245209694d9cb52f5579.png

 

VLC:

vlc.thumb.png.d4d584f83c572a79c0d7758abc3b904a.png

embyserver.txt ffmpeg-transcode-e700d052-af19-4208-8c3e-f0aedca0abf8_1.txt

Link to comment
Share on other sites

karlshea

Another episode says it's not interlaced, and it looks fine in Chrome. The dashboard indicates that it's transcoding, but isn't giving an info icon for the reason. The log filename is "remux" instead of "transcode".

Link to comment
Share on other sites

@karlshea - Thanks for creating a separate issue.

One thing that I can already tell is that your case is totally different from the other one where you had posted before  (https://emby.media/community/index.php?/topic/92331-why-is-my-transcoding-quality-so-bad

  Your Issue Other Issue
Encoder VAAPI HW  libx264 SW
Deinterlacing Yes No
Source vs. output bitrate Roughly Equal Output much lower than source
etc.    

 

 

 

 

 

Back to your issue:

Does your screenshot comparison correspond to the ffmpeg log that you have posted?

For further investigation, could you please install the Diagnostics Plugin?
https://mediabrowser.github.io/Emby.DiagnosticsPlugin/

Thanks

Link to comment
Share on other sites

When the plugin is installed, there's an additional entry "Codec Parameters":

image.thumb.png.c8654af51ae0fd13c341ef7b049d18e6.png

 

It will look differently in your case but quite similar. What you need is the "H.264 VAAPI Encoder" (similar).

When you click the gear-icon, you'll be able to change a number of settings to adjust the VAAPI hardware encoding quality with which you can play a bit.

Link to comment
Share on other sites

Ah yea, please go to the "Transcoding" page, choose "Advanced" from the dropdown and save.

Then go back to "Codec Parameters".

Link to comment
Share on other sites

karlshea

The only hardware encoder that's configurable is "VAAPI 4th Generation Core - H.264 (AVC)". What should I be looking at changing?

Link to comment
Share on other sites

17 hours ago, karlshea said:

The only hardware encoder that's configurable is "VAAPI 4th Generation Core - H.264 (AVC)". What should I be looking at changing?

You can try different different presets.

Link to comment
Share on other sites

Sorry, the "Preset" selection is hidden. Don't remember why.

Try different "Compression level" values.

Leave the other two unchanged.

Link to comment
Share on other sites

Thanks for the log.

It think I got an idea know about what's probably happening. It seems that the deinterlacing doesn't work correctly and is outputting duplicate frames or even still fields.

Could you please create an EDD file as described here: https://mediabrowser.github.io/Emby.DiagnosticsPlugin/#generating-edd-files

Just run like for 30s, after stopping it takes a while, then you'll see the edd file.

Link to comment
Share on other sites

karlshea

Yes, I did it again just to be sure:

2020-12-17 18:33:00.390 Info EncodingDiagnostics: ProbeHlsOutput complete
2020-12-17 18:33:00.393 Info App: ProcessRun 'StreamTranscode 67663d': Stopping ffmpeg process with q command for /config/transcoding-temp/1AE268_0.ts
2020-12-17 18:33:00.394 Info EncodingDiagnostics: ProcessRun 'EncodingDiagnostics' Execute: /bin/ffprobe -hide_banner -i "/mnt/chef_multimedia/TV/His Dark Materials/Season 2/His Dark Materials - S02E06 - Malice HDTV-1080p Proper.mkv" -show_format -show_streams -show_frames -print_format json  -read_intervals %+#1000 
2020-12-17 18:33:00.437 Info App: AppendExtraLogData - Read graph file: /config/logs/ffmpeg-transcode-67663d9d-c9da-4728-813c-78d619ea2acd_1graph.txt
2020-12-17 18:33:00.460 Info App: AppendExtraLogData - Deserialized GraphData fileStream: {0:n} bytes Graph Count: 2
2020-12-17 18:33:00.460 Info App: AppendExtraLogData - File Deleted
2020-12-17 18:33:00.567 Info App: ProcessRun 'StreamTranscode 67663d' Process exited with code 0
2020-12-17 18:33:00.576 Info SessionManager: Playback stopped reported by app Emby Web 4.5.4.0 playing Malice. Stopped at 44676 ms
2020-12-17 18:33:00.670 Info Server: http/1.1 Response 204 to 192.168.10.50. Time: 307ms. http://citywall.weil-st.net:8096/emby/Sessions/Playing/Stopped?X-Emby-Client=Emby Web&X-Emby-Device-Name=Chrome&X-Emby-Device-Id=TW96aWxsYS81LjAgKE1hY2ludG9zaDsgSW50ZWwgTWFjIE9TIFggMTBfMTRfNSkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzc0LjAuMzcyOS4xNjkgU2FmYXJpLzUzNy4zNnwxNTU5NTQzNTk0NTQ4&X-Emby-Client-Version=4.5.4.0
2020-12-17 18:33:00.676 Info PlaybackReporting - EventMonitorEntryPoint: _sessionManager_PlaybackStop : Entered
2020-12-17 18:33:00.676 Info PlaybackReporting - EventMonitorEntryPoint: Saving final duration for Item : TW96aWxsYS81LjAgKE1hY2ludG9zaDsgSW50ZWwgTWFjIE9TIFggMTBfMTRfNSkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzc0LjAuMzcyOS4xNjkgU2FmYXJpLzUzNy4zNnwxNTU5NTQzNTk0NTQ4-378f394f550b4e4398c5af8ff545cb63-22256
2020-12-17 18:33:00.688 Info PlaybackReporting - EventMonitorEntryPoint: Removing Old Key from playback_trackers : TW96aWxsYS81LjAgKE1hY2ludG9zaDsgSW50ZWwgTWFjIE9TIFggMTBfMTRfNSkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzc0LjAuMzcyOS4xNjkgU2FmYXJpLzUzNy4zNnwxNTU5NTQzNTk0NTQ4-378f394f550b4e4398c5af8ff545cb63-22256
2020-12-17 18:33:02.137 Info EncodingDiagnostics: ProcessRun 'EncodingDiagnostics' Process exited with code 0

 

diag_7144d375edf24ce1986792dbee481f6c.edd

Link to comment
Share on other sites

  • 3 weeks later...
karlshea

Update on this:

I was on an older i3-4160, and it wasn't able to transcode h265 in hardware which meant no 4k using that codec that needed transcoding because software transcode couldn't keep up (which to clarify was not the case for this file).

Tonight I upgraded to an i5-10400 and tried the same file and it looked WAY better. I'm not sure if it's the a newer hardware transcode or different kernel drivers in the new 5.x kernel I needed, but it helped significantly.

Do let me know if I can provide any other information that might help!

Link to comment
Share on other sites

On 1/7/2021 at 2:13 AM, karlshea said:

Update on this:

I was on an older i3-4160, and it wasn't able to transcode h265 in hardware which meant no 4k using that codec that needed transcoding because software transcode couldn't keep up (which to clarify was not the case for this file).

Tonight I upgraded to an i5-10400 and tried the same file and it looked WAY better. I'm not sure if it's the a newer hardware transcode or different kernel drivers in the new 5.x kernel I needed, but it helped significantly.

Do let me know if I can provide any other information that might help!

That's interesting. thanks for the feedback.

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