diff --git a/README.md b/README.md index be1efe0..2bde34e 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,9 @@ If you were paying attention to Dragoon's output, you would have noticed that it # This example transcodes footage to DNxHD 1080p60 for use in video editors like DaVinci Resolve. [transcoder] repo_path = '~/videos' # location of the videos to transcode +video_format = 'mov' # video container format video_codec = 'dnxhd' # video codec to use -video_format = 'scale=1920x1080,fps=60,format=yuv422p' # video format flag - this will be broken later into separate attributes +video_parameters = 'scale=1920x1080,fps=60,format=yuv422p' # video extra format parameters flag - this will be broken later into separate attributes video_profile = 'dnxhr_hq' # DNxHD has multiple presets for various video qualities audio_codec = 'pcm_s16le' # audio codec to use ``` diff --git a/src/main/java/tech/bitgoblin/video/Transcoder.java b/src/main/java/tech/bitgoblin/video/Transcoder.java index dfa3f9f..a536717 100644 --- a/src/main/java/tech/bitgoblin/video/Transcoder.java +++ b/src/main/java/tech/bitgoblin/video/Transcoder.java @@ -24,9 +24,9 @@ public class Transcoder { // only define the working directory; use default FFMPEG path public Transcoder(Config config) { this.config = config; - this.repo_dir = IOUtils.resolveTilda(config.getString("transcoder.repo_path")); + this.repo_dir = IOUtils.resolveTilda(this.config.getString("transcoder.repo_path")); if (this.config.contains("transcoder.ffmpeg_path")) { - this.ffmpeg_path = config.getString("transcoder.ffmpeg_path"); + this.ffmpeg_path = this.config.getString("transcoder.ffmpeg_path"); } this.initDirectory(); } @@ -48,11 +48,11 @@ public class Transcoder { String cmd = String.format("%s -i %s -y -f %s -c:v %s -vf %s -profile:v %s -c:a %s %s", this.ffmpeg_path, // FFMPEG binary path f.toString(), // input file - "mov", - "dnxhd", // video codec - "scale=1920x1080,fps=60,format=yuv422p", // video format - "dnxhr_hq", // video profile - "pcm_s16le", // audio codec + this.config.getString("transcoder.video_format"), // video container format + this.config.getString("transcoder.video_codec"), // video codec + this.config.getString("transcoder.video_parameters"), // video format + this.config.getString("transcoder.video_profile"), // video profile + this.config.getString("transcoder.audio_codec"), // audio codec outputPath // output file path );