Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unnecessary transcoding of HEVC when streaming to Samsung Q80AA TV #90

Open
bubblec0re opened this issue Oct 31, 2024 · 2 comments
Open

Comments

@bubblec0re
Copy link

Issue Summary:
Unnecessary transcoding occurs when streaming HEVC/AAC MP4 files to Samsung Q80AA TV via Jellyfin DLNA plugin. Modifying DLNA profile allows direct playback without transcoding. The fix is to add HEVC to the mp4 DirectPlayProfile.

Description:
When streaming MP4 files encoded with HEVC and AAC codecs to my Samsung Q80AA 55" Smart TV (QE55Q80AAUXRU) via the DLNA plugin in Jellyfin, they are unnecessarily transcoded. However, these same files play perfectly fine when streamed from a simpler DLNA server in my router box or just from a thumb drive.

To prevent this unnecessary transcoding , I've experimented with modifying the DLNA profile by adding 'hevc' to the list of supported video formats in DirectPlayProfile section in the file plugins/DLNA_4.0.0.0/profiles/Samsung Smart TV.xml. Here's the diff:

--- samsung-smart-tv.xml.bak    2024-11-01 00:16:18.134196919 +0300
+++ samsung-smart-tv.xml        2024-11-01 00:16:50.545732480 +0300
@@ -40,7 +40,7 @@
     <DirectPlayProfile container="asf" audioCodec="mp3,ac3,wmav2,wmapro,wmavoice" videoCodec="h264,mpeg4,mjpeg" type="Video" />
     <DirectPlayProfile container="avi" audioCodec="mp3,ac3,dca,dts" videoCodec="h264,mpeg4,mjpeg" type="Video" />
     <DirectPlayProfile container="mkv" audioCodec="mp3,ac3,dca,aac,dts" videoCodec="h264,mpeg4,mjpeg4" type="Video" />
-    <DirectPlayProfile container="mp4,m4v" audioCodec="mp3,aac" videoCodec="h264,mpeg4" type="Video" />
+    <DirectPlayProfile container="mp4,m4v" audioCodec="mp3,aac" videoCodec="h264,mpeg4,hevc" type="Video" />
     <DirectPlayProfile container="3gp" audioCodec="aac,he-aac" videoCodec="h264,mpeg4" type="Video" />
     <DirectPlayProfile container="mpg,mpeg" audioCodec="ac3,mp2,mp3,aac" videoCodec="mpeg1video,mpeg2video,h264" type="Video" />
     <DirectPlayProfile container="vro,vob" audioCodec="ac3,mp2,mp3" videoCodec="mpeg1video,mpeg2video" type="Video" />

Observed behavior in DLNA debug logs:

  • Before modification: PlayMethod=Transcode, TranscodeReason=VideoCodecNotSupported
  • After modification: PlayMethod=DirectPlay, TranscodeReason=0

Since I'm not sure if this change works for all Samsung Smart TVs, I thought it'd be best to create an issue for it first. If you think it's a good idea, I can create a pull request with my modification.

@disgustipated
Copy link
Contributor

Might be worth a dive into the Samsung documentation to see what they have listed as supported. If its new codec support they added it might not be in all of their models.

@bubblec0re
Copy link
Author

Might be worth a dive into the Samsung documentation to see what they have listed as supported. If its new codec support they added it might not be in all of their models.

Apparently, containers, codecs and resolutions are listed here: developer.samsung.com, but without specific model numbers, only years. Not sure how helpful this is.

I'll try monitoring the DLNA logs to see if Samsung specification name apeears in it when connecting the TV.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants