File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change
1
+ ARG PROTOC_VERSION=28.2
1
2
FROM debian:bookworm-slim AS builder
3
+ ARG PROTOC_VERSION
2
4
3
5
# Setzen der Arbeitsverzeichnis im Container
4
6
WORKDIR /app
@@ -7,9 +9,11 @@ WORKDIR /app
7
9
RUN apt-get update && apt-get install -y \
8
10
python3 \
9
11
python3-pip \
10
- protobuf-compiler \
11
12
&& rm -rf /var/lib/apt/lists/*
12
13
14
+ RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
15
+ unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d /app/.local
16
+
13
17
# Upgrade pip
14
18
RUN pip3 install --break-system-packages --upgrade pip
15
19
@@ -18,7 +22,7 @@ COPY proto/ffmpeg.proto .
18
22
19
23
# Kompilieren der .proto-Datei für Python
20
24
RUN python3 -m pip install --break-system-packages grpcio grpcio-tools
21
- RUN python3 -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. ffmpeg.proto
25
+ RUN PATH= "$PATH:$HOME/app/.local/bin" python3 -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. ffmpeg.proto
22
26
23
27
# Final stage
24
28
FROM debian:bookworm-slim
Original file line number Diff line number Diff line change @@ -82,10 +82,21 @@ def handle_quoted_arguments(command_args):
82
82
if ' ' in vf_arg or ',' in vf_arg or ':' in vf_arg :
83
83
vf_arg = f'"{ vf_arg } "'
84
84
85
- # Reassemble the -filter_complex argument
85
+ # Reassemble the -vf argument
86
86
rffmpeg_command .append (arg )
87
87
rffmpeg_command .append (vf_arg )
88
88
i += 2 # Skip the next argument as it's part of -vf
89
+ elif arg == '-hls_segment_filename' and i + 1 < len (command_args ):
90
+ hls_segment_filename_arg = command_args [i + 1 ]
91
+
92
+ # Quote the filter complex string if it contains spaces, commas, or colons
93
+ if ' ' in hls_segment_filename_arg or ',' in hls_segment_filename_arg or ':' in hls_segment_filename_arg :
94
+ hls_segment_filename_arg = f'"{ hls_segment_filename_arg } "'
95
+
96
+ # Reassemble the -hls_segment_filename argument
97
+ rffmpeg_command .append (arg )
98
+ rffmpeg_command .append (hls_segment_filename_arg )
99
+ i += 2 # Skip the next argument as it's part of -hls_segment_filename
89
100
# Append any other arguments as is
90
101
else :
91
102
rffmpeg_command .append (arg )
You can’t perform that action at this time.
0 commit comments