REFACTOR clipService and ADD ffmpegService

This commit is contained in:
2025-07-08 18:26:47 +02:00
parent 6d4146ed85
commit fa89c66260
4 changed files with 107 additions and 91 deletions

View File

@@ -63,6 +63,16 @@ public class MetadataService {
return metadata.getEndPoint();
}
public void normalizeVideoMetadata(VideoMetadata inputFileMetadata, VideoMetadata outputFileMetadata) {
if (outputFileMetadata.getStartPoint() == null) {
outputFileMetadata.setStartPoint(0f);
}
if (outputFileMetadata.getEndPoint() == null) {
outputFileMetadata.setEndPoint(inputFileMetadata.getEndPoint());
}
}
private JsonNode readStandardOutput(Process process) throws IOException{
// Read the standard output (JSON metadata)
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));