Skip to content
Snippets Groups Projects
Commit afecfb45 authored by Dorian Koch's avatar Dorian Koch
Browse files

Remove patches, Checkout specific commit hash

parent b8becc28
Branches
No related tags found
No related merge requests found
Pipeline #5802 passed with warnings
......@@ -10,12 +10,9 @@ RUN mkdir /app && mkdir /binaries
WORKDIR /app
RUN git clone https://msrd0.dev/msrd0/render_video.git /app
COPY docker_patch.diff /app/docker_patch.diff
COPY svtav1_patch.diff /app/svtav1_patch.diff
RUN git apply --ignore-space-change --ignore-whitespace docker_patch.diff
RUN git apply --ignore-space-change --ignore-whitespace svtav1_patch.diff
RUN cargo build --target-dir /binaries
RUN cargo build --release --target-dir /binaries
RUN git checkout 4612cbdfaaa8e1e713aa9f4bc5b19ba3fa721f4d
RUN cargo build --no-default-features --target-dir /binaries
RUN cargo build --no-default-features --release --target-dir /binaries
ENV RUST_BACKTRACE=full
ENTRYPOINT [ "/binaries/release/render_video", "-t", "720p", "-T", "1440p" ]
\ No newline at end of file
diff --git a/src/render/mod.rs b/src/render/mod.rs
index 279f3c4..674f66d 100644
--- a/src/render/mod.rs
+++ b/src/render/mod.rs
@@ -41,15 +41,15 @@ const LOGO_SIZE: usize = 96;
fn cmd() -> Command {
// we use systemd-run to limit the process memory
// I tried others like ulimit, chpst or isolate, but none worked
- let mut cmd = Command::new("systemd-run");
- cmd.arg("--scope")
+ let mut cmd = Command::new("busybox");
+ /*cmd.arg("--scope")
.arg("-q")
.arg("--expand-environment=no")
.arg("-p")
.arg(format!("MemoryMax={}", MEM_LIMIT.read().unwrap()))
- .arg("--user");
+ .arg("--user");*/
// we use busybox ash for having a shell that outputs commands with -x
- cmd.arg("busybox")
+ cmd
.arg("ash")
.arg("-exuo")
.arg("pipefail")
diff --git a/src/render/ffmpeg.rs b/src/render/ffmpeg.rs
index b0a63da..8d113bc 100644
--- a/src/render/ffmpeg.rs
+++ b/src/render/ffmpeg.rs
@@ -105,7 +105,13 @@ impl FfmpegOutput {
const QUALITY: &str = "22";
if venc {
let mut vcodec: String = match self.format {
- FfmpegOutputFormat::Av1Flac | FfmpegOutputFormat::Av1Opus => "av1".into(),
+ FfmpegOutputFormat::Av1Flac | FfmpegOutputFormat::Av1Opus => {
+ if vaapi {
+ "av1".into()
+ } else {
+ "libsvtav1".into()
+ }
+ },
FfmpegOutputFormat::AvcAac => "h264".into()
};
if vaapi {
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment