mirror of
https://github.com/immich-app/immich.git
synced 2024-12-25 10:43:13 +02:00
fix(server): HEVC videos not playing on Apple devices (#6712)
* add hvc1 tag * formatting
This commit is contained in:
parent
0770ad15e5
commit
e5a70329c9
@ -1094,6 +1094,7 @@ describe(MediaService.name, () => {
|
||||
'-fps_mode passthrough',
|
||||
'-map 0:0',
|
||||
'-map 0:1',
|
||||
'-tag:v hvc1',
|
||||
'-v verbose',
|
||||
'-vf scale=-2:720,format=yuv420p',
|
||||
'-preset ultrafast',
|
||||
@ -1127,6 +1128,7 @@ describe(MediaService.name, () => {
|
||||
'-fps_mode passthrough',
|
||||
'-map 0:0',
|
||||
'-map 0:1',
|
||||
'-tag:v hvc1',
|
||||
'-v verbose',
|
||||
'-vf scale=-2:720,format=yuv420p',
|
||||
'-preset ultrafast',
|
||||
@ -1673,6 +1675,7 @@ describe(MediaService.name, () => {
|
||||
'-map 0:0',
|
||||
'-map 0:1',
|
||||
'-g 256',
|
||||
'-tag:v hvc1',
|
||||
'-v verbose',
|
||||
'-level 153',
|
||||
'-rc_mode 3',
|
||||
|
@ -44,6 +44,7 @@ class BaseConfig implements VideoCodecSWConfig {
|
||||
// explicitly selects the video stream instead of leaving it up to FFmpeg
|
||||
`-map 0:${videoStream.index}`,
|
||||
];
|
||||
|
||||
if (audioStream) {
|
||||
options.push(`-map 0:${audioStream.index}`);
|
||||
}
|
||||
@ -56,6 +57,11 @@ class BaseConfig implements VideoCodecSWConfig {
|
||||
if (this.getGopSize() > 0) {
|
||||
options.push(`-g ${this.getGopSize()}`);
|
||||
}
|
||||
|
||||
if (this.config.targetVideoCodec === VideoCodec.HEVC) {
|
||||
options.push('-tag:v hvc1');
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user