Skip to content

1. Transcoding Process and Options

TheTaylorLee edited this page Sep 4, 2025 · 8 revisions
  • This solution comes with preset transcoding options, but if you wish to use your own options, skip to option2.
  • The comment metadata is set to an immutable index. This ensures even if the database is lost or filename changed, the file will not be transcoded again.
  • If the transcoded file is larger than the original it will be excluded and the source file remuxed to only update metadata while keeping all media, video, and audio streams.
  • Only files ending in these extensions *.mp4 & *.mkv will be processed. Legacy container formats like WMV will be excluded.

Option 1

  • All transcoded media will be analyzed and parameters dynamically applied from Build-TranscodeParams.
  • All video, audio, and subtitle streams are mapped into transcoded files.
  • Title and Description metadata is removed so that proper metadata is presented in certain 3rd party media servers.
  • Additional parameters are applied to match with the source file, such as colorspace, luminance, and other x265 parameters.
  • CRF quality defaults to 21 for movies and 23 for shows.
  • You can customize the Constant Rate Factor using the environment variables with option 1. See the environment variables section of the wiki.

Option 2

  • Option 2 allows for customizing the majority of the applied ffmpeg parameters.
  • You can apply the custom options by saving the below code block contents to files in the mapped data volume /docker-transcodeautomation/data. Use one file for Shows and another for Movies.
    • showscustomoptions.ps1
    • moviescustomoptions.ps1
  • You may replace the {Custom Options Here} text with any custom Options you want to use. Be sure to remove the brackets.
  • All other options must be left alone and the $comment variable must be retained, or the transcode automation process will not work as intended. This is because of the way immutable file indexing is considered.
  • Example Options: -metadata title="" -metadata description="" -map 0:v:0? -map 0:a? -map 0:s? -c:v libx265 -crf 23 -c:a aac -c:s copy -preset veryfast
$comment = (Update-Lastindex -DataSource $datasource).newcomment
ffmpeg -i $video -metadata COMMENT="$comment" {Custom Options Here} -stats_period 60 "$env:FFToolsTarget$video"

Clone this wiki locally