immich icon indicating copy to clipboard operation
immich copied to clipboard

[BUG] Vertical videos have a too high resolution and have an inconsistent / to high bitrate

Open akoyaxd opened this issue 2 years ago • 4 comments

Describe the bug If videos with vertical resolution get uploaded, the width is still 1280 so the hight is 2276 which is a way to high resolution for a thumbnail, often actually higher then the original Videofile.

To Reproduce Steps to reproduce the behavior:

  1. Upload a video with vertical orientation
  2. wait til the preview is processed.
  3. download the preview from the browser and check the resolution

Expected behavior The previews resolution has a max width and hight of 1280. So either 1280x720 or 720x1280.

Screenshots grafik

System

  • Server Version: 1.43.1

Additional context I recognized it after rerunning the transcoding job for all my video assets after the last update. Super awesome to have previews for my android Videos now, btw. Thanks for your hard work! :)

akoyaxd avatar Jan 28 '23 17:01 akoyaxd

@zackpollard Just FYI in case you want to add more options to the transcoding improvement.

alextran1502 avatar Jan 28 '23 20:01 alextran1502

Potentially related to #795?

bo0tzz avatar Jan 28 '23 21:01 bo0tzz

I set [vf scale=]1280:1280:force_original_aspect_ratio=decrease form the mentioned issue. Thank to @raisinbear for sharing your research results.

The previews do now transcode to the correct resolution. They are still a bit large for a preview. While the crf Setting is nice, I think a setting for the bitrate would be make sense here as well, to make the playback of previews more consistent in loading times.

akoyaxd avatar Jan 29 '23 18:01 akoyaxd

We are planning to further improve the transcoder options. I'll be doing some work over the next week, we are going to simplify the settings a little so we can further improve on the transcoder and how it handles the different scenarios. The scaling filter will be going for example, and instead we will be showing an option like Resolution: 720p/1080p/1440p/4k in a dropdown. The server will then handle all the specific cases such as vertical videos etc

zackpollard avatar Jan 30 '23 00:01 zackpollard