Skip to content

Commit

Permalink
Update Dockerfile to set permissions on temp directory and modify FFm…
Browse files Browse the repository at this point in the history
…peg command to use absolute paths
  • Loading branch information
MarcWeberFS committed Nov 13, 2024
1 parent 6b17906 commit 6e3e0f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions video-downloader-backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ RUN apt-get update && \
# Set working directory
WORKDIR /app

# Create a temporary directory for file operations
RUN mkdir /app/temp
# Set permissions on the temp directory and its contents
RUN mkdir -p /tmp && chmod 777 /tmp

# Copy the built JAR file into the container
COPY target/*.jar app.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ private void embedSubtitles(String videoFilePath, String srtFilePath, String out
String formattedSrtPath = utf8SrtPath.toString().replace("\\", "/").replace(":", "\\:");

String command = String.format("ffmpeg -i \"%s\" -vf subtitles='%s' -c:a copy \"%s\"",
videoFilePath, formattedSrtPath, outputFilePath);
new File(videoFilePath).getAbsolutePath(),
new File(formattedSrtPath).getAbsolutePath(),
new File(outputFilePath).getAbsolutePath());


System.out.println("Executing FFmpeg command: " + command);

Expand Down

0 comments on commit 6e3e0f1

Please sign in to comment.