Skip to content

Removed ffmpeg system dependency#68

Draft
GermanHydrogen wants to merge 3 commits into
csiro-fair:mainfrom
GermanHydrogen:fix/ffmpeg-dependency
Draft

Removed ffmpeg system dependency#68
GermanHydrogen wants to merge 3 commits into
csiro-fair:mainfrom
GermanHydrogen:fix/ffmpeg-dependency

Conversation

@GermanHydrogen

Copy link
Copy Markdown
Collaborator

[Refactor] Removed ffmpeg system dependency

Summary

FFMPEG is used by marimba to generate the video summary for a dataset. Currently marimba uses the FFMPEG binary made available through the $PATH environment variable. This requires FFMPEG to be installed on the system marimba is run. However marimba already comes indirectly with its own FFMPEG binaries, as marimba depends on the the package pyav, which bundles FFMPEG. This pull-request changes the calls to the ffmpeg binary to use pyav instead.

Problem

See Issue #62 for problem description

Solution

Call pyav instead of the FFMPEG binary available in $PATH.

Impact

FFMPEG is no longer a necessary system dependency, reducing the effective install-size of marimba.
However, there should not be any impact on the functionality of marimba.

Testing

No tests are modified by this PR.

Documentation

Modified the doc-strings of the changed methods.

Breaking Changes

None

Known Issues or Limitations

None

Files (Optional)

Added

None

Modified

  • marimba/core/utils/summary.py: changed the ffmpeg calls to pyav
  • marimba/main.py: removed the checks for FFMPEG

Removed

None

Notes to Reviewer

There is still code left in marimba, which checks for the existence of ffmpeg in $PATH. This code will still need to be removed for the branch to be cleanly merge able.

The current state reflects the changes necessary to run the https://github.com/csiro-fair/mritc-demo-pipeline without FFMPEG beeing installed.
I used the following dockerfile to test this:

FROM astral/uv:python3.13-trixie-slim AS default_container

RUN apt update 
RUN apt install -y locales && sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
RUN apt-get install -y libimage-exiftool-perl \
    git 

USER 1001:1001
WORKDIR workspace
COPY --chown=1001 entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

RUN uv venv --python 3.13 --cache-dir .cache/uv

RUN uv pip install git+https://github.com/GermanHydrogen/marimba.git@fix/ffmpeg-dependency -n 
RUN uv pip install git+https://codebase.helmholtz.cloud/datahub/marehub/ag-videosimages/marimba/marimba-compose.git -n 

ENTRYPOINT ["/entrypoint.sh"]
CMD ["/bin/bash"]

@GermanHydrogen

Copy link
Copy Markdown
Collaborator Author

Hey @cjackett ,
can you give me some general feedback about the PR before I remove the rest of the FFMEPG dependency checks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant