Sign inSign up

dachack/vhsrecord

By dachack

Updated about 21 hours ago

Image
0

4.3K

dachack/vhsrecord repository overview

GitHub Docker Image Size (tag) GitHub issues

VHS Record

This repository contains the source to create a Docker container for digitizing VHS tapes. This container uses Video4Linux and FFmpeg to do the recording, includes a web UI, and also has an AI based system for detecting when to stop recording. This software needs to be paired with hardware such as a USB or PCI based capture card and a VHS player.

VHS Record screenshot

VHS End Detector

The VHS end detection system uses an AI based system. It can currently detect blue or black screens common at the end of the media being recorded. Both of these can be enabled or disabled and the confidence level to stop the recording can be set. As blue and black screens can also appear in the middle of a film, a low pass filter can be used to avoid the video stopping when these screens appear for a short period of time in the middle of a recording.

Docker Settings

Below are the necessary and optional settings needed to setup the container.

Port

The port 5000 must be exposed by Docker so the web UI can be accessed.

Devices

To allow the Docker container to access the capture card, one or more devices must be mapped into the container.

Docker MountpointUse
/dev/video0The capture device to use
/dev/sndNecessary if ALSA audio is to be used
Volumes

Two volumes are necessary for the container to operate.

Docker MountpointUse
/configThe location where settings are saved to
/dataThe location to save recordings to
Environment Variables

There are multiple environment variables that can be used to customize the function of the Docker container.

Environment VariableDefault ValueUse
INPUT_FMTv4l2The input format for the capture card used in FFmpeg
INPUT_PATH/dev/video0The path to the capture card to use with FFmpeg
V4L2_FMTThe video format to request from V4L2
V4L2_FPSThe frames per second to request from V4L2
V4L2_RESThe resolution to request from V4L2
V4L2_TIMESTAMPSdefaultThe type of timestamps to use for grabbed frames
VCODECh264The video codec to use in the output file
ACODECaacThe audio codec to use in the output file
OUTPUT_RES640x480The resolution to use in the output file
PIX_FMTThe pixel format to use for the recorded file
CRFThe Constant Rate Factor (CRF) to use for the recorded file
VIDEO_THREAD_QUEUE_SIZE64The size of the video thread queue in FFmpeg
VIDEO_FILTERFFmpeg filters to apply to the video stream
AUDIO_FILTERFFmpeg filters to apply to the audio stream
ALSA_AUDIOfalseSet to "true" to enable ALSA audio recording
AUDIO_DEVICE1The audio device to use when recording audio via ALSA
AUDIO_THREAD_QUEUE_SIZE2048The size of the FFmpeg audio thread queue when recording via ALSA
AUDIO_CHANNELSThe number of audio channels to record when using ALSA
EXTENSIONmp4The file extension to apply to when none is given
FFMPEG_LOG_LEVELinfoThe FFmpeg log level that will show up in the container logs
SETUP_COMMANDAn arbitrary command to run immediately before recording is started
SETUP_SUCCESS0If SETUP_COMMAND is set, the return value to checked for
SETUP_DELAY0Number of seconds to wait before recording after the setup command
MIN_LENGTH30Minimum number of seconds to record before automatically stopping

Tag summary

Content type

Image

Digest

sha256:52fea3fb0

Size

247.1 MB

Last updated

about 21 hours ago

docker pull dachack/vhsrecord