From a3a9935baf4be4b55b51960831ab8f0939935eca Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 3 Nov 2017 20:13:50 +0100 Subject: [PATCH] updated readme --- README.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8bfd57c..5b531d7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,67 @@ # Video Decoding with Docker containers -TBD +This image provides an easy way to convert a video file in multiple different output formats. Just specify a folder which holds the video files, it will automatically watch it and convert everything you specify. + +# Running, the easy way + +```bash +docker run -v /var/run/docker.sock:/var/run/docker.sock -v /path/to/video/files:/var/videos --name videodecoding --env VIDEO_FOLDER=/path/to/video/files --env VIDEO_FORMATS='.mp4':'.webm' kolaente/video-decode +``` + +# Options + +-c: Video Formats Location. Pass a path with a JSON config file for conversion. Defaults to 'video_formats.json' in current folder. +-p: Video Location. Pass a location to a different folder which holds the videos. Defaults to currents folder. +-v: Video Formats. Pass all video formats which should trigger the conversion, seperated by ':'. Example: .mp4:.wmv + +ENVIRONMENT VARIABLES: +All settings can be done via environment variables passed to the container. + +VIDEO_FORMATS_LOCATION: Pass a location to a different json file holding video convert configurations +VIDEO_LOCATION: Pass a location to a different folder which holds the videos +VIDEO_FORMATS: Pass all video formats which should trigger the conversion, seperated by ':. Example: .mp4:.wmv + +# Specify output video formats + +This is done via a JSON file at `/var/videoconversion/config/video_formats.json`. You can mount `/var/videoconversion/config/` to your host and specify your own formats. + +Standard configuration looks like this: + +```json +[ + { + "name": "720p", + "height": "720", + "video_bitrate": "5000k", + "video_codec": "libvpx", + "audio_bitrate": "256k", + "audio_codec": "libvorbis", + "file_ending": "webm" + }, + { + "name": "480p", + "height": "480", + "framerate": 24, + "video_bitrate": "2500k", + "video_codec": "libvpx", + "audio_bitrate": "256k", + "audio_codec": "libvorbis", + "file_ending": "webm" + }, + { + "name": "360p", + "height": "360", + "framerate": 24, + "video_bitrate": "1000k", + "video_codec": "libvpx", + "audio_bitrate": "256k", + "audio_codec": "libvorbis", + "file_ending": "webm" + } +] +``` + +# License + +Copyright 2017 K. Langenberg +Licensed under GNU GPLv3