Closed jcjveraa closed 4 months ago
Another user recently reported similar rotation issues with Intel Quick Sync. It doesn't seem to be a problem with our application or FFmpeg, I've already checked that.
Maybe you could do a little research on your own to find the related report and then check e.g. if the problem has already been fixed upstream or if there is a workaround that works for you? If it then turns out to be something we need to fix in our source code, we will do so. Thank you! :hugs:
Something seems to be happening in ffmpeg. When trying to 'emulate' the call from Photoprism (manually running ffmpeg in the Photoprism container) I noticed that when I pass the -noautorotate
flag the transcoding happens as expected without the incorrect rotation being applied - for my single test file. In both cases ffmpeg shows in it's logs the line displaymatrix: rotation of -90.00 degrees
, but apparently it's deciding to do something different with it in the software decoder or encoder.
The commandline then becomes something like this, guesstimating what the normal commandline looks like from the source (ignore the fact that I'm making the video square, I didn't know what I was doing :-) :
ffmpeg -noautorotate -hwaccel qsv -hwaccel_output_format qsv -qsv_device /dev/dri/renderD128 -i test.mov -c:a aac -vf scale_qsv=w=500:h=500:format=nv12 -c:v h264_qsv -r 30 -b:v 30M -bitrate 30M -f mp4 -movflags +faststart -y test_qsv.out.avc
Doesn't go anywhere to solving it though. For my use case, this investigation lead me to find that while qsv is faster, it is also much less efficient apparently with ~5x larger filesizes vs the software encoder with the same target bitrate (which is strange as it is a bitrate - pehaps the parameter is interpreted differently). The issue is there but I won't be looking into it more and will just stick to software encoding + calling the 'convert' function on a cron job.
Another user recently reported similar rotation issues with Intel Quick Sync. It doesn't seem to be a problem with our application or FFmpeg, I've already checked that.
Maybe you could do a little research on your own to find the related report and then check e.g. if the problem has already been fixed upstream or if there is a workaround that works for you? If it then turns out to be something we need to fix in our source code, we will do so. Thank you! 🤗
I have the same problem。
I found the video from smartphone,metadata orientation is tag 90 cw,when transcode by software it will keep the video state,but intel QSV have a 90 ccw degrees rotated ?it looks like QSV transcode set orientation default to horzonal or any other change
1. What is not working as documented?
I managed to get Intel transcoding to work on my Qnap T-453D using exacly the standard instructions on https://docs.photoprism.app/getting-started/advanced/transcoding/#intel-quick-sync.
After enabling, I can see that the HQ transcoding is used (transcoding speed improves 10x vs software) and the logging confirms the same.
2. How can we reproduce it?
see above
3. What behavior do you expect?
Same behavior from both software and 'intel' transcoding modes. Preferably the desired "unrotated" version of course :-)
4. What could be the cause of your problem?
n.a.
5. Can you provide us with example files for testing, error logs, or screenshots?
https://github.com/user-attachments/assets/177aa151-b8b1-4a14-b329-6c57955cc1a4
The live photo on the right was encoded with the software encoder and is fine, the one on the left is the hardware encoder and rotated 90 degrees. Exif data ignored with the hardware one?
6. Which software versions do you use?
The default Docker Compose with above additions for video transcoding, with Watchtower enabled so up to date with 'latest' on Docker Hub
(a) PhotoPrism Architecture & Build Number: amd64, build 240711-2197af848 (b)MariaDB 11 (c) Operating System Types & Versions: Linux, (d) Chrome,
(e) n/a
You can find the version/build number of the app in Settings by scrolling to the bottom. Note that MySQL 8 support has been discontinued, see system requirements at https://docs.photoprism.app/getting-started/#system-requirements.
Always provide database and operating system details if it is a backend, import, or indexing issue. Should it be a frontend issue, at a minimum we require you to provide web browser and operating system details. When reporting a performance problem, we ask that you provide us with complete information about your environment, as there may be more than one cause.
7. On what kind of device is PhotoPrism installed?
This is especially important if you are reporting a performance, import, or indexing issue. You can skip this if you're reporting a problem you found in our public demo, or if it's a completely unrelated issue, such as incorrect page layout.
(a) Device / Processor Type: QNAP nas, Celeron J4125, Intel® HD Graphics 600 (b) memory: 16 gb/0gb
(c) Storage Type: HDD (d) Anything else that might be helpful to know? n/a
Always provide device, memory, and storage details if you have a backend, performance, import, or indexing issue.
8. Do you use a Reverse Proxy, Firewall, VPN, or CDN?
n/a