|
|
|
|
@ -25,6 +25,10 @@ func VideoOnly(codec config.CodecOpts) bool { |
|
|
|
|
return codec.AudioCodec == "none" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func SetDashTarget(codec *config.CodecOpts, path string, encoding config.EncodeOpts) { |
|
|
|
|
SetCodecTarget(codec, path, encoding) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func SetCodecTarget(codec *config.CodecOpts, path string, encoding config.EncodeOpts) { |
|
|
|
|
base := filepath.Base(path) |
|
|
|
|
target := filepath.Join(encoding.OutDir, base) |
|
|
|
|
@ -77,7 +81,6 @@ func Run(encoding config.EncodeOpts, codec config.CodecOpts, pass int, pid int, |
|
|
|
|
"-b:a", fmt.Sprint(codec.AudioBitrate * 1024)) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if encoding.Test > 0 { |
|
|
|
|
encode.InputOptions("-ss", fmt.Sprintf("00:%d", encoding.TestStart)) |
|
|
|
|
extras = append(extras, "-t", fmt.Sprint(encoding.Test)) |
|
|
|
|
@ -125,7 +128,11 @@ func RenderFile(encoding config.EncodeOpts, pid int, path string, force bool) { |
|
|
|
|
for i := 0; i < len(encoding.Variants); i++ { |
|
|
|
|
codec := &encoding.Variants[i] |
|
|
|
|
|
|
|
|
|
SetCodecTarget(codec, path, encoding) |
|
|
|
|
if encoding.Dash { |
|
|
|
|
SetDashTarget(codec, path, encoding) |
|
|
|
|
} else { |
|
|
|
|
SetCodecTarget(codec, path, encoding) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_, err := os.Stat(codec.Target) |
|
|
|
|
|
|
|
|
|
|