Sign inSign up

sanmadjack/parkingbrake

By sanmadjack

•Updated 5 months ago

Automated transcoding with handbrake

Image
1

527

sanmadjack/parkingbrake repository overview

⁠parkingbrake

Parkingbrake is an automated transcoding application powered by Handbrake⁠.

docker run -p 8080 -p 8080/udp -v /app/data:/var/share/transcoding --name parkingbrake sanmadjack/parkingbrake:latest

It has a web gui accessible on port 8080 for viewing transcoding progress and settings. It does not currently allow interacting with the transcoding or changing settings.

One volume is used at /app/data. Within that volume there are three folders:

  1. input - This folder is where you place the files to transcode. The server scans this folder on startup, and watches for new/deleted/updated files after startup.
  2. output - This folder is where the transcoded files are placed.
  3. trash - This folder contains the original files after they have transcoded.

Parkingbrake does not maintain a persistent database of processes, instead always processing whatever is in the input folder. After processing, the original video files are moved to the trash folder.

Settings are controlled via json files in the data folder. All settings are in addition to HandBrakeCLI's defaults.

One settings.json should be created in the root of the data folder with settings you want to be applied to all files.

Additional settings.json files in sub-folders to override settings for those particular folders.

Settings can be overridden for specific files by using the "files" element, which should contain a map of files names and settings objects.

Here is a sample of all of the available settings:

{
    "encoder": "x265_10bit",
    "preset": "veryslow",
    "quality": 18,
    "two_pass": true,
    "decomb": true,
    "detelecine": true,
    "width": 0, 
    "height": 0,
    "audio_codecs": ["opus"],
    "audio_languages":[
        "jpn","chi","eng","und"
    ],
    "detect_hd_audio_substream": false,
    "flip_subtitles": true,
    "files": {
        "title_01.mkv": {
            "chapter_start": 1,
            "chapter_end": 4
        },
        "title_02.mkv": {
            "chapter_start": 1,
            "chapter_end": 4,
            "chapter_split": 2
        },
        "title_04.mkv": {
            "chapter_splits": [2,3,2]
        }   
    }
}
⁠Encoding settings:
NameDescriptionDefaultOptions
encoderThe encoder to usex264x264
x264_10bit
x265
x265_10bit
x265_12bit
mpeg4
mpeg2
VP8
VP9
theora
presetThe preset to use, options vary by encodermediumultrafast
superfast
veryfast
faster
fast
medium
slow
slower
veryslow
placebo
qualityThe quality setting to use24Any integer
two_passWhether to use two-pass encodingtruetrue
false
decombWhether to use decombtruetrue
false
detelecineWhether to use detelecinetruetrue
false
heightThe height for the outputted video. 0 does not resize the video.0Any integer
widthThe width for the outputted video. 0 does not resize the video.0Any integer
max_heightSpecifies the max height for a video, resizing it if the video is taller than the specified height0Any integer greater than zero
audio_encoderThe audio encoder for the outputted audioopusnone
ca_aac
ca_haac
ac3
eac3
mp3
vorbis
flac16
flac24
opus
copy
mixdownThe max audio channels to use for the outputted audios7point1mono
left_only
right_only
stereo
dpl1
dpl2
s5point1
s6point1
s7point1
s5_2_lfe
audio_qualityThe audio quality to use. The meaning of the number varies by encoder8Any integer
chapter_startThe chapter to start converting from.1Any integer
chapter_endThe chapter to stop converting at, 0 indicating last chapter0Any integer
chapter_splitsSplits the file based on array of chapter counts. Ignored if file has no chapters or if chapter_split is used. Works with chapter_start and chapter_end.[]Any array of integers greater than 0
chapter_splitSplits the file(s) into separate output files every x chapters, 0 indicating not splitting. Trailing chapters less than the number of chapters specified are included in the last file, for example if a chapter_split of 3 is used with a file with 11 chapters, it will create 3 files with chapters 1-3, 4-6, and 7-11. Ignored if file has no chapters. Works with chapter_start and chapter_end.0Any integer greater than 0
audio_languagesThe audio languages to import. Specified as an array of strings.all languagesAny three-letter audio language code
detect_hd_audio_substreamMakeMKV usually exports super high-quality audio streams along with their backwards-compatibly sub-stream, resulting in MKV files with duplicate audio streams. Enabling this option attempts to detect these and remove the duplicates. This is not perfect, and can sometimes eat commentary tracks.falsetrue
false
flip_subtitlesFlips the first and second subtitle tracks, used for Anime that use text-only subtitles as the first trackfalsetrue
false
filesAllows specifying settings for individual filesnothingA map of file names and settings objects
⁠Hardcoded Handbrake flags

The below flags are always used. If you would like one or more of them made optional, please open an issue ticket.

--min-duration 0
--format av_mkv
--markers
--encoder-profile auto
--vfr
--auto-anamorphic
--no-hqdn3d
--no-nlmeans
--no-unsharp
--no-lapsharp
--no-deblock

Tag summary

Content type

Image

Digest

sha256:5a83bd0b8…

Size

340.2 MB

Last updated

5 months ago

docker pull sanmadjack/parkingbrake