diff --git a/handlers.go b/handlers.go index 27d8e28..e04b9a9 100644 --- a/handlers.go +++ b/handlers.go @@ -510,7 +510,7 @@ func processOriginal(originalID uint) { } // create video transcodes - for _, targetHeight := range []uint{480, 240, 144} { + for _, targetHeight := range []uint{540, 480, 360, 240, 144} { if targetHeight <= video.Height { newVideoTranscode(video.ID, originalID, targetHeight, video.FPS) break diff --git a/templates/video.html b/templates/video.html index b09e158..07f8455 100644 --- a/templates/video.html +++ b/templates/video.html @@ -47,6 +47,7 @@ + diff --git a/workers.go b/workers.go index 8aca3cc..decfd58 100644 --- a/workers.go +++ b/workers.go @@ -49,9 +49,9 @@ func videoToVideo(sem chan struct{}, transID uint, srcFilepath string) { // FIXME: ignoring any requested audio bitrate // determine audio bitrate var audioBitrate uint = 160 - if trans.Height <= 144 { + if trans.Height <= 240 { audioBitrate = 64 - } else if trans.Height <= 480 { + } else if trans.Height <= 540 { audioBitrate = 96 } else if trans.Height < 720 { audioBitrate = 128 @@ -276,7 +276,7 @@ func cleanupTranscodes() { var trans transcodes.Transcode err := db.Where("status = ?", "pending"). Order("CASE " + - "WHEN dst_kind = 'video' AND height = 480 THEN 0 " + + "WHEN dst_kind = 'video' AND height = 540 THEN 0 " + "WHEN dst_kind = 'audio' AND rate = 96 THEN 0 " + "ELSE 1 END").First(&trans).Error // err := db.First(&trans, "status = ?", "pending").Error