mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 08:26:00 +01:00
* HW Accel * CUDA Docker build and adjust the NVENC encoder * Removed NVENC preset Using legacy presets is removed in SDK 12 and deprecated since SDK 10. This commit removed the preset to allow ffmpeg to select the default one. --------- Co-authored-by: Nodude <> Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
39 lines
766 B
Go
39 lines
766 B
Go
package ffmpeg
|
|
|
|
type VideoCodec string
|
|
|
|
func (c VideoCodec) Args() []string {
|
|
if c == "" {
|
|
return nil
|
|
}
|
|
|
|
return []string{"-c:v", string(c)}
|
|
}
|
|
|
|
var (
|
|
// Software codec's
|
|
VideoCodecLibX264 VideoCodec = "libx264"
|
|
VideoCodecLibWebP VideoCodec = "libwebp"
|
|
VideoCodecBMP VideoCodec = "bmp"
|
|
VideoCodecMJpeg VideoCodec = "mjpeg"
|
|
VideoCodecVP9 VideoCodec = "libvpx-vp9"
|
|
VideoCodecVPX VideoCodec = "libvpx"
|
|
VideoCodecLibX265 VideoCodec = "libx265"
|
|
VideoCodecCopy VideoCodec = "copy"
|
|
)
|
|
|
|
type AudioCodec string
|
|
|
|
func (c AudioCodec) Args() []string {
|
|
if c == "" {
|
|
return nil
|
|
}
|
|
|
|
return []string{"-c:a", string(c)}
|
|
}
|
|
|
|
var (
|
|
AudioCodecAAC AudioCodec = "aac"
|
|
AudioCodecLibOpus AudioCodec = "libopus"
|
|
AudioCodecCopy AudioCodec = "copy"
|
|
)
|