mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(server): transcoding improvements (#1370)
* feat: support isEdited flag for SettingSwitch * feat: add transcodeAll ffmpeg settings for extra transcoding control * refactor: tidy up and rename current video transcoding code + transcode everything * feat: better video transcoding with ffprobe analyses video files to see if they are already in the desired format allows admin to choose to transcode all videos regardless of the current format * fix: always serve encoded video if it exists * feat: change video codec option to a select box, limit options removed previous video codec config option as it's incompatible with new options removed mapping for encoder to codec as we now store the codec in the config * feat: add video conversion job for transcoding previously missed videos * chore: fix spelling of job messages to pluralise assets * chore: fix prettier/eslint warnings * feat: force switch targetAudioCodec default to aac to avoid iOS incompatibility * chore: lint issues after rebase
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
|
||||
if (data) {
|
||||
notificationController.show({
|
||||
message: `Thumbnail generation job started for ${data} asset`,
|
||||
message: `Thumbnail generation job started for ${data} assets`,
|
||||
type: NotificationType.Info
|
||||
});
|
||||
} else {
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
if (data) {
|
||||
notificationController.show({
|
||||
message: `Extract EXIF job started for ${data} asset`,
|
||||
message: `Extract EXIF job started for ${data} assets`,
|
||||
type: NotificationType.Info
|
||||
});
|
||||
} else {
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
if (data) {
|
||||
notificationController.show({
|
||||
message: `Object detection job started for ${data} asset`,
|
||||
message: `Object detection job started for ${data} assets`,
|
||||
type: NotificationType.Info
|
||||
});
|
||||
} else {
|
||||
@@ -101,6 +101,28 @@
|
||||
}
|
||||
};
|
||||
|
||||
const runVideoConversion = async () => {
|
||||
try {
|
||||
const { data } = await api.jobApi.sendJobCommand(JobId.VideoConversion, {
|
||||
command: JobCommand.Start
|
||||
});
|
||||
|
||||
if (data) {
|
||||
notificationController.show({
|
||||
message: `Video conversion job started for ${data} assets`,
|
||||
type: NotificationType.Info
|
||||
});
|
||||
} else {
|
||||
notificationController.show({
|
||||
message: `No videos without an encoded version found`,
|
||||
type: NotificationType.Info
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
handleError(error, `Error running video conversion job, check console for more detail`);
|
||||
}
|
||||
};
|
||||
|
||||
const runTemplateMigration = async () => {
|
||||
try {
|
||||
const { data } = await api.jobApi.sendJobCommand(JobId.StorageTemplateMigration, {
|
||||
@@ -159,6 +181,17 @@
|
||||
Note that some assets may not have any objects detected, this is normal.
|
||||
</JobTile>
|
||||
|
||||
<JobTile
|
||||
title={'Video transcoding'}
|
||||
subtitle={'Run video transcoding process to transcode videos not in the desired format'}
|
||||
on:click={runVideoConversion}
|
||||
jobStatus={allJobsStatus?.isVideoConversionActive}
|
||||
waitingJobCount={allJobsStatus?.videoConversionQueueCount.waiting}
|
||||
activeJobCount={allJobsStatus?.videoConversionQueueCount.active}
|
||||
>
|
||||
Note that some videos won't require transcoding, this is normal.
|
||||
</JobTile>
|
||||
|
||||
<JobTile
|
||||
title={'Storage migration'}
|
||||
subtitle={''}
|
||||
|
||||
Reference in New Issue
Block a user