You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
kolaente 041546648a
fixed dockerfile (missing jq)
5 years ago
.gitignore modified the script to let ffmpeg calculate the aspect ration instead 5 years ago
Dockerfile fixed dockerfile (missing jq) 5 years ago
LICENSE added license 5 years ago
README.md updated readme 5 years ago
convert.sh modified the script to let ffmpeg calculate the aspect ration instead 5 years ago
video_formats.json added aspect ratio 5 years ago

README.md

Video Decoding with Docker containers

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.

It will create a new folder for each video which will hold all outputted formats. Once finished, it creates a file [videoname].done in said folder to indicate it is done. It will also move (and rename) the original file to this folder.

Running, the easy way

The following command will convert all mp4 and webm videos to webm files.

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

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 (see below for more informations about that file).
  • VIDEO_FORMATS: Pass all video formats which should trigger the conversion, seperated by ':. Example: .mp4:.wmv

Video location

Videos are placed in /var/videos inside the container. Mount a folder from your host holding the videos.

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.

framerate is the only one optional. You need to specify everything else.

Standard configuration looks like this:

[
    {
        "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