Add preference to allow 4k hd video metadata auto detection (#164)

This commit is contained in:
Brett Pynn authored and GitHub committed 2026-10-05 07:57:25 +02:00
1 parent a3f73cf1f8
commit 85854a2f06
3 files changed
+50 -23

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ extension MP42File {
var hdType: TrackHDType? {
for track in tracks(withMediaType: kMP42MediaType_Video) as! [MP42VideoTrack] {
if (track.width > 1920 && track.height > 1088) {
return nil // .hd4k 4k breaks AppleTV streaming
return Prefs.set4KHDVideoMetadata ? .hd4k : nil
} else if (track.width > 1280 || track.height > 720) && track.width <= 1920 && track.height <= 1088 {
return .hd1080p
} else if track.width >= 960 && track.height >= 720 || track.width >= 1280 {
+4 -1
View File
@@ -104,7 +104,7 @@ enum Prefs {
_audioBitrate, _audioDRC, _audioConvertAC3, _audioKeepAC3, _audioConvertDts,
_audioDtsOptions, _subtitleConvertBitmap, _ratingsCountry, _chaptersPreviewPosition,
_chaptersPreviewTrack, _mp464bitOffset, _mp464bitTimes, _mp4SaveAsOptimize, _forceHvc1,
_logFormat, _saveAsLocation])
_logFormat, _saveAsLocation, _set4KHDVideoMetadata])
}
@Stored(key: "NSApplicationCrashOnException", defaultValue: true)
@@ -176,6 +176,9 @@ enum Prefs {
@Stored(key: "SBForceHvc1", defaultValue: true)
static var forceHvc1: Bool
@Stored(key: "SBSet4KHDVideoMetadata", defaultValue: false)
static var set4KHDVideoMetadata: Bool
@Stored(key: "SBArtworkSelectorZoomLevel", defaultValue: 50)
static var artworkSelectorZoomLevel: Float