Add AV1 merge option
This commit is contained in:
parent
98f8273cb7
commit
499be5ef98
24
main.go
24
main.go
|
|
@ -2949,6 +2949,8 @@ func (s *appState) showMergeView() {
|
||||||
return ".mpg"
|
return ".mpg"
|
||||||
case strings.HasPrefix(format, "webm"):
|
case strings.HasPrefix(format, "webm"):
|
||||||
return ".webm"
|
return ".webm"
|
||||||
|
case strings.HasPrefix(format, "av1"):
|
||||||
|
return ".mp4"
|
||||||
case strings.HasPrefix(format, "mkv"), strings.HasPrefix(format, "bd"):
|
case strings.HasPrefix(format, "mkv"), strings.HasPrefix(format, "bd"):
|
||||||
return ".mkv"
|
return ".mkv"
|
||||||
case strings.HasPrefix(format, "mp4"):
|
case strings.HasPrefix(format, "mp4"):
|
||||||
|
|
@ -2961,8 +2963,9 @@ func (s *appState) showMergeView() {
|
||||||
formatMap := map[string]string{
|
formatMap := map[string]string{
|
||||||
"Fast Merge (No Re-encoding)": "mkv-copy",
|
"Fast Merge (No Re-encoding)": "mkv-copy",
|
||||||
"Lossless MKV (Best Quality)": "mkv-lossless",
|
"Lossless MKV (Best Quality)": "mkv-lossless",
|
||||||
"High Quality MP4 (H.264)": "mp4-h264",
|
"MP4 (H.264)": "mp4-h264",
|
||||||
"High Quality MP4 (H.265)": "mp4-h265",
|
"MP4 (H.265)": "mp4-h265",
|
||||||
|
"MP4 (AV1)": "av1",
|
||||||
"WebM (VP9)": "webm-vp9",
|
"WebM (VP9)": "webm-vp9",
|
||||||
"DVD Format": "dvd",
|
"DVD Format": "dvd",
|
||||||
"Blu-ray Format": "bd-h264",
|
"Blu-ray Format": "bd-h264",
|
||||||
|
|
@ -2971,8 +2974,9 @@ func (s *appState) showMergeView() {
|
||||||
formatKeys := []string{
|
formatKeys := []string{
|
||||||
"Fast Merge (No Re-encoding)",
|
"Fast Merge (No Re-encoding)",
|
||||||
"Lossless MKV (Best Quality)",
|
"Lossless MKV (Best Quality)",
|
||||||
"High Quality MP4 (H.264)",
|
"MP4 (H.264)",
|
||||||
"High Quality MP4 (H.265)",
|
"MP4 (H.265)",
|
||||||
|
"MP4 (AV1)",
|
||||||
"WebM (VP9)",
|
"WebM (VP9)",
|
||||||
"DVD Format",
|
"DVD Format",
|
||||||
"Blu-ray Format",
|
"Blu-ray Format",
|
||||||
|
|
@ -3194,6 +3198,8 @@ func (s *appState) addMergeToQueue(startNow bool) error {
|
||||||
correctExt = ".mpg"
|
correctExt = ".mpg"
|
||||||
case strings.HasPrefix(s.mergeFormat, "webm"):
|
case strings.HasPrefix(s.mergeFormat, "webm"):
|
||||||
correctExt = ".webm"
|
correctExt = ".webm"
|
||||||
|
case strings.HasPrefix(s.mergeFormat, "av1"):
|
||||||
|
correctExt = ".mp4"
|
||||||
case strings.HasPrefix(s.mergeFormat, "mkv"), strings.HasPrefix(s.mergeFormat, "bd"):
|
case strings.HasPrefix(s.mergeFormat, "mkv"), strings.HasPrefix(s.mergeFormat, "bd"):
|
||||||
correctExt = ".mkv"
|
correctExt = ".mkv"
|
||||||
case strings.HasPrefix(s.mergeFormat, "mp4"):
|
case strings.HasPrefix(s.mergeFormat, "mp4"):
|
||||||
|
|
@ -3520,6 +3526,16 @@ func (s *appState) executeMergeJob(ctx context.Context, job *queue.Job, progress
|
||||||
"-b:a", "192k",
|
"-b:a", "192k",
|
||||||
"-movflags", "+faststart",
|
"-movflags", "+faststart",
|
||||||
)
|
)
|
||||||
|
case "av1":
|
||||||
|
args = append(args,
|
||||||
|
"-c:v", "libaom-av1",
|
||||||
|
"-crf", "30",
|
||||||
|
"-b:v", "0",
|
||||||
|
"-cpu-used", "6",
|
||||||
|
"-c:a", "aac",
|
||||||
|
"-b:a", "192k",
|
||||||
|
"-movflags", "+faststart",
|
||||||
|
)
|
||||||
default:
|
default:
|
||||||
// Fallback to copy
|
// Fallback to copy
|
||||||
args = append(args, "-c", "copy")
|
args = append(args, "-c", "copy")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user