Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recoded video - rotation wrong #10498

Closed
1 of 3 tasks
Str1atum opened this issue Jun 20, 2024 · 1 comment · Fixed by #10905
Closed
1 of 3 tasks

Recoded video - rotation wrong #10498

Str1atum opened this issue Jun 20, 2024 · 1 comment · Fixed by #10905

Comments

@Str1atum
Copy link

The bug

With 1.106.4 if have an issue with the recoded videos being the wrong orientation.
It affects HEVC encoded videos in 1080p or 4k from iPhone 13 and 15.
Videos in portrait orientation are rotated to landscape. Videos in landscape are rotated 180°.
The videos do not just play that way in the browser but also when I download the recoded videos with Chrome to my local disk.

recode config is:

"ffmpeg": {
"crf": 28,
"threads": 0,
"preset": "medium",
"targetVideoCodec": "hevc",
"acceptedVideoCodecs": [
"hevc"
],
"targetAudioCodec": "aac",
"acceptedAudioCodecs": [
"libopus",
"mp3",
"aac"
],
"targetResolution": "720",
"maxBitrate": "2500",
"bframes": -1,
"refs": 0,
"gopSize": 0,
"npl": 0,
"temporalAQ": false,
"cqMode": "auto",
"twoPass": true,
"preferredHwDevice": "auto",
"transcode": "required",
"tonemap": "hable",
"accel": "qsv",
"accelDecode": true

The OS that Immich Server is running on

Ubunti 24.04

Version of Immich Server

1.106.4

Version of Immich Mobile App

v.106

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

default

Your .env content

default

Reproduction steps

see above

Relevant log output

No response

Additional information

No response

@Str1atum Str1atum changed the title Rcoded video rotation wrong Recoded video - rotation wrong Jun 20, 2024
@Str1atum
Copy link
Author

log output of two sample videos:

�[32m[Nest] 7 - �[39m06/20/2024, 8:34:15 AM �[32m LOG�[39m �[33m[Microservices:MediaService]�[39m �[32mStarted encoding video 196cae26-f6d7-43c0-afae-37a7f88864db {"inputOptions":["-hwaccel qsv","-hwaccel_output_format qsv","-async_depth 4","-threads 1"],"outputOptions":["-c:v hevc_qsv","-c:a copy","-movflags faststart","-fps_mode passthrough","-map 0:0","-map 0:1","-bf 7","-refs 5","-g 256","-tag:v hvc1","-v verbose","-vf scale_qsv=720:-1:async_depth=4:mode=hq,hwmap=derive_device=opencl,tonemap_opencl=desat=0:format=nv12:matrix=bt709:primaries=bt709:range=pc:tonemap=hable:transfer=bt709,hwmap=derive_device=qsv:reverse=1,format=qsv","-preset 4","-global_quality:v 28","-maxrate 2500","-bufsize 5000"],"twoPass":false}�[39m

�[32m[Nest] 7 - �[39m06/20/2024, 8:34:16 AM �[32m LOG�[39m �[33m[Microservices:MediaService]�[39m �[32mSuccessfully encoded 196cae26-f6d7-43c0-afae-37a7f88864db�[39m

�[32m[Nest] 7 - �[39m06/20/2024, 8:34:16 AM �[32m LOG�[39m �[33m[Microservices:MediaService]�[39m �[32mStarted encoding video 9fcbe395-fc0d-4933-8248-6d582fd6e255 {"inputOptions":["-hwaccel qsv","-hwaccel_output_format qsv","-async_depth 4","-threads 1"],"outputOptions":["-c:v hevc_qsv","-c:a copy","-movflags faststart","-fps_mode passthrough","-map 0:0","-map 0:1","-bf 7","-refs 5","-g 256","-tag:v hvc1","-v verbose","-vf scale_qsv=-1:720:async_depth=4:mode=hq,hwmap=derive_device=opencl,tonemap_opencl=desat=0:format=nv12:matrix=bt709:primaries=bt709:range=pc:tonemap=hable:transfer=bt709,hwmap=derive_device=qsv:reverse=1,format=qsv","-preset 4","-global_quality:v 28","-maxrate 2500","-bufsize 5000"],"twoPass":false}�[39m

�[32m[Nest] 7 - �[39m06/20/2024, 8:34:18 AM �[32m LOG�[39m �[33m[Microservices:MediaService]�[39m �[32mSuccessfully encoded 9fcbe395-fc0d-4933-8248-6d582fd6e255�[39m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant