diff --git a/internal/photoprism/convert.go b/internal/photoprism/convert.go index cee8c4738..397e0657e 100644 --- a/internal/photoprism/convert.go +++ b/internal/photoprism/convert.go @@ -313,6 +313,8 @@ func (c *Convert) AvcBitrate(f *MediaFile) string { if bitrate <= 0 { return "8M" + } else if bitrate >= 50 { + return "50M" } return fmt.Sprintf("%dM", bitrate) diff --git a/internal/photoprism/convert_test.go b/internal/photoprism/convert_test.go index afa53a706..ef920dfd2 100644 --- a/internal/photoprism/convert_test.go +++ b/internal/photoprism/convert_test.go @@ -297,7 +297,7 @@ func TestConvert_AvcBitrate(t *testing.T) { assert.Equal(t, "32M", convert.AvcBitrate(mf)) }) - t.Run("133M", func(t *testing.T) { + t.Run("50M", func(t *testing.T) { fileName := filepath.Join(conf.ExamplesPath(), "gopher-video.mp4") assert.Truef(t, fs.FileExists(fileName), "input file does not exist: %s", fileName) @@ -311,6 +311,6 @@ func TestConvert_AvcBitrate(t *testing.T) { mf.width = 4096 mf.height = 2160 - assert.Equal(t, "133M", convert.AvcBitrate(mf)) + assert.Equal(t, "50M", convert.AvcBitrate(mf)) }) }