Docker container to transcode videos in mounted volume to H265
- Change the volume to point at your root media folder
docker-compose up -d
docker logs transcoder_transcoder_1 && docker attach --no-stdin transcoder_transcoder_1
(CTRL-C is safe to exit with)
- Create a .env file
- Set
BOT_KEYandCHAT_IDvariables - Recreate the container
You can ignore files using .transcodeignore, which will make it not transcode any files in that directory or subdirectories.
By default, the option to re-transcode H265 -> H265 is disabled. You can turn it on by setting environment variable H265_TRANSCODE to true
The other variable H265_MB_H defines how many MB/h is your target. If a file is below that target, it will not attempt to re-transcode the file.
It uses the formula size / duration instead of the reported bit rate by ffmpeg, as it seems it is often incorrect and not representative of the resulting file size.
| Variable | Description | Default |
|---|---|---|
| ROOT_PATH | The path of media to transcode (inside the container) | /media |
| BACKUP_DIR | The directory to copy original files for backup (inside ROOT_PATH) | .backup |
| BOT_KEY | The Telegram bot key | |
| CHAT_ID | The Telegram chat ID to report to | |
| HOST | The Host to specify in Telegram messages | |
| CRF | The Constant Rate Factor quality setting. Lower number, better quality | 16 |
| H265_TRANSCODE | Whether to re-transcode H265 content | false |
| H265_MB_H | Minimum MB/h to attempt to re-transcode H265 content | 1000 |