Skip to content

Commit b4a32eb

Browse files
committed
Install ffmpeg docker
1 parent f65d821 commit b4a32eb

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ENV HOME /root
1010
WORKDIR $HOME
1111

1212
RUN apt-get update && apt-get install -y --no-install-recommends \
13-
ca-certificates python3 python3-pip python3-venv libgl1-mesa-dev libglib2.0-0 libsm6 libxrender1 libxext6 nano vim htop && \
13+
ca-certificates python3 python3-pip python3-venv ffmpeg libgl1-mesa-dev libglib2.0-0 libsm6 libxrender1 libxext6 nano vim htop && \
1414
rm -rf /var/lib/apt/lists/*
1515

1616
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1

docs/source/tutorial.sdk.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ SDK is available on PyPI:
2020
The package officially supports Python 3.6+ and was tested under Linux and
2121
Windows (`Anaconda <https://www.anaconda.com/products/individual#windows>`_) platforms.
2222

23+
For certain video related functions to work, ffmpeg package needs to be installed.
24+
It can be installed on Ubuntu with:
25+
26+
.. code-block:: bash
27+
28+
sudo apt-get install ffmpeg
29+
2330
For Windows and Mac OS based installations to use :py:obj:`benchmark` and :py:obj:`consensus`
2431
functions you might also need to install beforehand :py:obj:`shapely` package,
2532
which we found to work properly only under Anaconda distribution, with:

superannotate/db/projects.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,10 @@ def upload_video_to_project(
251251
"Frame rotation of %s found. Output images will be rotated accordingly.",
252252
rot
253253
)
254-
except Exception as e:
255-
logger.warning("Couldn't read video metadata %s", e)
254+
except:
255+
logger.warning(
256+
"Couldn't read video metadata to determine rotation. This could be because ffmpeg package is not installed. To install it, run: sudo apt install ffmpeg"
257+
)
256258

257259
video = cv2.VideoCapture(str(video_path), cv2.CAP_FFMPEG)
258260
if not video.isOpened():

0 commit comments

Comments
 (0)