Added ability to configure the transcoding job with some parameters in dragoon.toml
This commit is contained in:
parent
12ab510224
commit
21ea8b3caf
@ -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.
|
# This example transcodes footage to DNxHD 1080p60 for use in video editors like DaVinci Resolve.
|
||||||
[transcoder]
|
[transcoder]
|
||||||
repo_path = '~/videos' # location of the videos to transcode
|
repo_path = '~/videos' # location of the videos to transcode
|
||||||
|
video_format = 'mov' # video container format
|
||||||
video_codec = 'dnxhd' # video codec to use
|
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
|
video_profile = 'dnxhr_hq' # DNxHD has multiple presets for various video qualities
|
||||||
audio_codec = 'pcm_s16le' # audio codec to use
|
audio_codec = 'pcm_s16le' # audio codec to use
|
||||||
```
|
```
|
||||||
|
@ -24,9 +24,9 @@ public class Transcoder {
|
|||||||
// only define the working directory; use default FFMPEG path
|
// only define the working directory; use default FFMPEG path
|
||||||
public Transcoder(Config config) {
|
public Transcoder(Config config) {
|
||||||
this.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")) {
|
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();
|
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",
|
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
|
this.ffmpeg_path, // FFMPEG binary path
|
||||||
f.toString(), // input file
|
f.toString(), // input file
|
||||||
"mov",
|
this.config.getString("transcoder.video_format"), // video container format
|
||||||
"dnxhd", // video codec
|
this.config.getString("transcoder.video_codec"), // video codec
|
||||||
"scale=1920x1080,fps=60,format=yuv422p", // video format
|
this.config.getString("transcoder.video_parameters"), // video format
|
||||||
"dnxhr_hq", // video profile
|
this.config.getString("transcoder.video_profile"), // video profile
|
||||||
"pcm_s16le", // audio codec
|
this.config.getString("transcoder.audio_codec"), // audio codec
|
||||||
outputPath // output file path
|
outputPath // output file path
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user