This Docker image provides a streamlined and efficient environment for extracting the first and last frames from video files. It encapsulates all necessary dependencies and configurations, allowing for quick deployment and consistent performance across various platforms. The image utilizes a lightweight and optimized process for frame extraction, ensuring minimal resource consumption and fast processing times.
This image is designed for developers and video processing specialists who need a reliable and scalable solution for extracting key frames from video content. It simplifies the process of integrating first and last frame extraction into existing workflows and applications, eliminating the need for complex setup and configuration.
To run the first-last-frame Docker image, use the following command:
bash
docker run -d
--name first-last-frame-container
-v /path/to/your/video/directory:/videos
-v /path/to/your/output/directory:/output
-e VIDEO_FILE_NAME="your_video.mp4"
-e OUTPUT_PREFIX="frame_"
first-last-frame:latest
Explanation of parameters:
-d: Runs the container in detached mode (background).--name first-last-frame-container: Assigns a name to the container for easy management.-v /path/to/your/video/directory:/videos: Mounts your local video directory to the /videos directory inside the container. Replace /path/to/your/video/directory with the actual path to your video files.-v /path/to/your/output/directory:/output: Mounts your local output directory to the /output directory inside the container. Replace /path/to/your/output/directory with the desired path for the extracted frames.-e VIDEO_FILE_NAME="your_video.mp4": Specifies the name of the video file to process. Replace "your_video.mp4" with the actual name of your video file. Ensure the video file is located within the mounted /path/to/your/video/directory.-e OUTPUT_PREFIX="frame_": Specifies the prefix for the output frame filenames. Replace "frame_" with your desired prefix.first-last-frame:latest: Specifies the Docker image to use. Ensure you have pulled the latest version of the image.Alternative run command using environment variables file:
You can also use an environment variables file for configuration:
Create a file named .env (or any name you prefer) with the following content, adjusted to your needs:
VIDEO_FILE_NAME=your_video.mp4
OUTPUT_PREFIX=frame_
INPUT_VOLUME=/path/to/your/video/directory
OUTPUT_VOLUME=/path/to/your/output/directory
Run the container:
docker run -d \
--name first-last-frame-container \
--env-file .env \
-v "$INPUT_VOLUME:/videos" \
-v "$OUTPUT_VOLUME:/output" \
first-last-frame:latest
Accessing the Extracted Frames:
The extracted first and last frames will be saved in your specified output directory (/path/to/your/output/directory). They will be named using the specified OUTPUT_PREFIX, followed by "first.jpg" and "last.jpg" respectively (e.g., frame_first.jpg, frame_last.jpg).
Important Notes:
Content type
Image
Digest
sha256:805bab6f7…
Size
46.3 MB
Last updated
9 months ago
docker pull qyup/first-last-frame:1767774.631.545