Skip to content

Commit

Permalink
Fix FFMPEG missing from Dockerfile (#48)
Browse files Browse the repository at this point in the history
* Try using an ffmpeg image

* Fix tag

* Change out image

* Try copying binary from source build

* Try a different location

* Try adding just a where ffmpeg command

* Fix exec

* Anotha one

* Anotha one

* Anotha one

* Fix queue location

* hail mary copy ffmprobe

* Add debug command

* Add vod debug logs

* Try changing the entrypoint

* Define ffmpeg location
  • Loading branch information
sneakycrow authored Feb 1, 2025
1 parent aac6d7f commit 29122fe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions config/queue.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
cargo build --release -p forge && \
cp /app/target/release/forge /usr/local/bin/forge


# Runtime stage
FROM --platform=$TARGETPLATFORM debian:bullseye-slim
FROM jrottenberg/ffmpeg:7.1-ubuntu2404-edge

# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
ffmpeg \
libpq5 \
&& rm -rf /var/lib/apt/lists/*

Expand Down
3 changes: 2 additions & 1 deletion k8s/base/queue/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: ConfigMap
metadata:
name: farmhand-queue-config
data:
RUST_LOG: "api=debug,db=debug,queue=debug,tower_http=debug,axum::rejection=trace"
RUST_LOG: "api=debug,db=debug,queue=debug,vod=debug,tower_http=debug,axum::rejection=trace"
STORAGE: "videos/staging"
UPLOAD_BUCKET: "farmhand"
FFMPEG_LOCATION: "/usr/local/bin/ffmpeg"
1 change: 1 addition & 0 deletions packages/vod/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ impl Quality {

impl HLSConverter {
fn get_video_dimensions(&self, input_path: &Path) -> Result<(u32, u32)> {
debug!("Getting dimensions for {:?}", input_path);
let output = Command::new(&self.ffmpeg_path)
.arg("-i")
.arg(input_path)
Expand Down

0 comments on commit 29122fe

Please sign in to comment.