add 540p and 360p options
This commit is contained in:
@@ -510,7 +510,7 @@ func processOriginal(originalID uint) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create video transcodes
|
// create video transcodes
|
||||||
for _, targetHeight := range []uint{480, 240, 144} {
|
for _, targetHeight := range []uint{540, 480, 360, 240, 144} {
|
||||||
if targetHeight <= video.Height {
|
if targetHeight <= video.Height {
|
||||||
newVideoTranscode(video.ID, originalID, targetHeight, video.FPS)
|
newVideoTranscode(video.ID, originalID, targetHeight, video.FPS)
|
||||||
break
|
break
|
||||||
|
@@ -47,6 +47,7 @@
|
|||||||
<option value="240">240p</option>
|
<option value="240">240p</option>
|
||||||
<option value="360">360p</option>
|
<option value="360">360p</option>
|
||||||
<option value="480">480p</option>
|
<option value="480">480p</option>
|
||||||
|
<option value="540">540p</option>
|
||||||
<option value="720">720p</option>
|
<option value="720">720p</option>
|
||||||
<option value="1080">1080p</option>
|
<option value="1080">1080p</option>
|
||||||
<option value="2160">2160p</option>
|
<option value="2160">2160p</option>
|
||||||
|
@@ -49,9 +49,9 @@ func videoToVideo(sem chan struct{}, transID uint, srcFilepath string) {
|
|||||||
// FIXME: ignoring any requested audio bitrate
|
// FIXME: ignoring any requested audio bitrate
|
||||||
// determine audio bitrate
|
// determine audio bitrate
|
||||||
var audioBitrate uint = 160
|
var audioBitrate uint = 160
|
||||||
if trans.Height <= 144 {
|
if trans.Height <= 240 {
|
||||||
audioBitrate = 64
|
audioBitrate = 64
|
||||||
} else if trans.Height <= 480 {
|
} else if trans.Height <= 540 {
|
||||||
audioBitrate = 96
|
audioBitrate = 96
|
||||||
} else if trans.Height < 720 {
|
} else if trans.Height < 720 {
|
||||||
audioBitrate = 128
|
audioBitrate = 128
|
||||||
@@ -276,7 +276,7 @@ func cleanupTranscodes() {
|
|||||||
var trans transcodes.Transcode
|
var trans transcodes.Transcode
|
||||||
err := db.Where("status = ?", "pending").
|
err := db.Where("status = ?", "pending").
|
||||||
Order("CASE " +
|
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 " +
|
"WHEN dst_kind = 'audio' AND rate = 96 THEN 0 " +
|
||||||
"ELSE 1 END").First(&trans).Error
|
"ELSE 1 END").First(&trans).Error
|
||||||
// err := db.First(&trans, "status = ?", "pending").Error
|
// err := db.First(&trans, "status = ?", "pending").Error
|
||||||
|
Reference in New Issue
Block a user