Sign inSign up

tomsriddle/video-stream-frame-capture

By tomsriddle

•Updated over 2 years ago

Docker image capturing video streams

Image
0

116

tomsriddle/video-stream-frame-capture repository overview

⁠Image Frame Capture

⁠Overview

This image provides a script to read video streams using ffmpeg and capture individual frames as images

⁠Usage

⁠Pull Image

To pull an image use the following

docker pull tomsriddle/video-stream-frame-capture:1.0

After pulling the image check that it is present using following

docker image ls

⁠Run Image

To run the image use following

 docker run -p <host port>:<container_port>/udp -v <Path to local directory>:/workspace/shared-data -e PYTHONUNBUFFERED=1 -e video-stream-url=udp://host.docker.internal:<container_port> -e video-stream-image-folder=/workspace/shared-data/<image_folder> "tomsriddle/video-stream-frame-capture:1.0"

Note: See the volume mapping - this is needed for the images sub folder where the images captured from the video stream will be kept. Also notice the port mapping has the "/udp" suffix to ensure that you are reading via UDP

⁠FFMPEG

The image assumes you are running a video streaming server using FFMPEG. For this first install FFMPEG https://evermeet.cx/ffmpeg/⁠

After installing FFMPEG you can use a command like following to start a video stream

To run the image use following

ffmpeg -i <Video File> -vcodec mpeg4 -f mpegts udp://127.0.0.1:<udp_port>

An example below

ffmpeg -i LicensePlateReaderSample_4K.mov -vcodec mpeg4 -f mpegts udp://127.0.0.1:23000

Tag summary

Content type

Image

Digest

sha256:f77625431…

Size

718.5 MB

Last updated

over 2 years ago

docker pull tomsriddle/video-stream-frame-capture:1.0