Convert MPEG4 direct play to user setting

This commit is contained in:
1hitsong 2022-11-28 13:29:58 -05:00
parent e0f5597b59
commit 4d761c9315
3 changed files with 23 additions and 1 deletions

View File

@ -707,6 +707,7 @@
<source>Next episode</source>
<translation>Next episode</translation>
</message>
<message>
<source>Play Trailer</source>
<translation>Play Trailer</translation>
</message>
@ -820,5 +821,15 @@
<translation>Unable to find any albums or songs belonging to this artist</translation>
<extracomment>Popup message when we find no audio data for an artist</extracomment>
</message>
<message>
<source>MPEG-4 Support</source>
<translation>MPEG-4 Support</translation>
<extracomment>Settings Menu - Title for option</extracomment>
</message>
<message>
<source>Support Direct Play of MPEG-4 content. This may need to be disabled for playback of DIVX encoded video files.</source>
<translation>Support Direct Play of MPEG-4 content. This may need to be disabled for playback of DIVX encoded video files.</translation>
<extracomment>Settings Menu - Description for option</extracomment>
</message>
</context>
</TS>

View File

@ -10,6 +10,13 @@
"type": "bool",
"default": "false"
},
{
"title": "MPEG-4 Support",
"description": "Support Direct Play of MPEG-4 content. This may need to be disabled for playback of DIVX encoded video files.",
"settingName": "playback.mpeg4",
"type": "bool",
"default": "true"
},
{
"title": "Attempt Direct Play (Profile Lvl)",
"description": "Attempt Direct Play for H.264 media with unsupported profile levels (> 4.2) before falling back to transcoding if it fails.",

View File

@ -177,7 +177,7 @@ end function
function GetDirectPlayProfiles() as object
mp4Video = "h264,mpeg4"
mp4Video = "h264"
mp4Audio = "mp3,pcm,lpcm,wav"
mkvVideo = "h264,vp8"
mkvAudio = "mp3,pcm,lpcm,wav"
@ -202,6 +202,10 @@ function GetDirectPlayProfiles() as object
mkvVideo = mkvVideo + ",mpeg2video"
end if
if get_user_setting("playback.mpeg4") = "true"
mp4Video = mp4Video + ",mpeg4"
end if
' Check for supported Audio
if di.CanDecodeAudio({ Codec: "ac3" }).result
mkvAudio = mkvAudio + ",ac3"