ADD metadata endpoints + update Bruno

This commit is contained in:
2025-05-20 14:12:12 +02:00
parent a639cfbb0e
commit 9348dd928e
8 changed files with 55 additions and 62 deletions

View File

@@ -28,6 +28,12 @@ public class CompressionService {
private final Pattern timePattern = Pattern.compile("out_time_ms=([\\d:.]+)");
private final MetadataService metadataService;
public CompressionService(MetadataService metadataService) {
this.metadataService = metadataService;
}
private void buildFilters(ArrayList<String> command, Float fps, Integer width, Integer height) {
List<String> filters = new ArrayList<>();
@@ -132,6 +138,10 @@ public class CompressionService {
throw new FFMPEGException("FFMPEG process failed");
}
// set new metadata
VideoMetadata newMetadata = metadataService.getVideoMetadata(job.getOutputFile());
job.setOutputVideoMetadata(newMetadata);
job.setStatus(JobStatus.FINISHED);
logger.info("FFMPEG finished");
}