Skip to content

Add ffmpeg to fix testcontainers/testcontainers-java#512 #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 22, 2020

Conversation

oussamabadr
Copy link
Contributor

In order to fix testcontainers/testcontainers-java#512, I added ffmpeg to this docker image.

Dockerfile Outdated

RUN pip install vnc2flv
# INSTALL ffmpeg
ADD https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking it might be possible to install this via apt, but probably ffmpeg contains non-codecs and is therefore not in Debian package repositories?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, it seems newer Debian version contain ffmpeg. So this would mean e.g. updating the image to debian:buster-slim, which sounds fine to me in general.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed It was the easiest solution, but I had some difficulties at the beginning to install ffmpeg via apt, as stated in Debian wiki page, it is not available for Debian 8.
...So I thought of two solutions:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about upgrading the image to a newer Debian version? I would prefer this approach if it works.I checked and ffmpeg is available in e.g. buster.

Dockerfile Outdated

RUN pip install vnc2flv
# INSTALL ffmpeg
ADD https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, it seems newer Debian version contain ffmpeg. So this would mean e.g. updating the image to debian:buster-slim, which sounds fine to me in general.

Dockerfile Outdated

RUN pip install vnc2flv
# INSTALL ffmpeg
ADD https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about upgrading the image to a newer Debian version? I would prefer this approach if it works.I checked and ffmpeg is available in e.g. buster.

Dockerfile Outdated
Comment on lines 17 to 20
RUN apt-get update && \
apt-get install -y ffmpeg=7:4.1.6-1~deb10u1 && \
apt-get autoremove && apt-get clean && \
ffmpeg -version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, one more thing to change:
Can you please move all those commands to the RUN command starting line 10?

Line10 should read like this I assume:

RUN apt-get update && apt-get install -y \
  python-pip python-dev ffmpeg=7:4.1.6-1~deb10u1 \	 
  && rm -rf /var/lib/apt/lists/*
  && pip install vnc2flv \
  && rm -fr /tmp/*

This way we have minimal layers.

Is autoremove and clean necessary? There should be no useless packages coming in I would have assumed.

Copy link
Contributor Author

@oussamabadr oussamabadr Sep 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, it's Done.

Copy link
Member

@kiview kiview left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @rnorth can you have a final look?

@rnorth
Copy link
Member

rnorth commented Sep 22, 2020

Thanks! LGTM

I will merge and cut a release.

@rnorth rnorth merged commit bbc4957 into testcontainers:master Sep 22, 2020
@rnorth
Copy link
Member

rnorth commented Sep 22, 2020

Thank you for working on this @oussamabadr 🙇‍♂️

@oussamabadr
Copy link
Contributor Author

You're welcome, thanks to you and to @kiview for following up 👍

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.

.flv videos generated by testcontainers webdriver aren't scrollable
3 participants