1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00

Use H.264 codec first

This commit is contained in:
Tatsuya Otsuka
2020-09-20 17:17:46 +09:00
parent 33dfac1b0c
commit 01d74f815f
2 changed files with 10 additions and 10 deletions

View File

@@ -195,12 +195,12 @@ func buildArgs(feedConfig *config.Feed, episode *model.Episode, outputFilePath s
if feedConfig.Format == model.FormatVideo {
// Video, mp4, high by default
format := "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best"
format := "bestvideo[ext=mp4][vcodec^=avc1]+bestaudio[ext=m4a]/best[ext=mp4][vcodec^=avc1]/best[ext=mp4]/best"
if feedConfig.Quality == model.QualityLow {
format = "worstvideo[ext=mp4]+worstaudio[ext=m4a]/worst[ext=mp4]/worst"
format = "worstvideo[ext=mp4][vcodec^=avc1]+worstaudio[ext=m4a]/worst[ext=mp4][vcodec^=avc1]/worst[ext=mp4]/worst"
} else if feedConfig.Quality == model.QualityHigh && feedConfig.MaxHeight > 0 {
format = fmt.Sprintf("bestvideo[height<=%d][ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best", feedConfig.MaxHeight)
format = fmt.Sprintf("bestvideo[height<=%d][ext=mp4][vcodec^=avc1]+bestaudio[ext=m4a]/best[height<=%d][ext=mp4][vcodec^=avc1]/best[ext=mp4]/best", feedConfig.MaxHeight, feedConfig.MaxHeight)
}
args = append(args, "--format", format)