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

Videos are shown with incorrect rotation #762

Closed
SimJoSt opened this issue Oct 18, 2020 · 28 comments
Closed

Videos are shown with incorrect rotation #762

SimJoSt opened this issue Oct 18, 2020 · 28 comments

Comments

@SimJoSt
Copy link

SimJoSt commented Oct 18, 2020

Describe the bug
Record video on a phone in portrait mode. The video is still saved in 16:9 aspect ratio, but a flag is added to play the video in a different rotation. Video players like VLC respect this flag and play the video in the correct orientation. The flag can be inspected with MediaInfo for example.

To Reproduce
Steps to reproduce the behavior:

  1. Record video on phone in portrait mode (or have any video with a rotation value not being 0).
  2. Open the video in QuickLook

Expected behavior
Play the video in the correct orientation.

Desktop (please complete the following information):

  • OS Version: Windows 10 Pro 2004
  • QuickLook Version: 3.6.10 MSI edition
@xupefei
Copy link
Member

xupefei commented Oct 19, 2020

The video viewer already handling roration: https://github.com/QL-Win/QuickLook/blob/master/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ViewerPanel.xaml.cs#L310 so something is going wrong here.
Could you share me a sample video?

@rabelux
Copy link
Member

rabelux commented Nov 20, 2020

Closing this due to missing feedback

@rabelux rabelux closed this as completed Nov 20, 2020
@SimJoSt
Copy link
Author

SimJoSt commented Jan 4, 2021

@xupefei here is an example video: https://cloud.freiheitswolke.org/s/a9Qs2dPJr5fT6iw (link is active until the end of January)
I also noticed that videos recorded with a higher frame rate are played in slow motion. I will have to confirm and investigate that. If correct, I will open another ticket.

Sorry for the delay. I'm just getting my GitHub notifications under control.

@rabelux rabelux reopened this Jan 4, 2021
@rabelux
Copy link
Member

rabelux commented Jan 5, 2021

Confirming that some videos don't have the correct rotation. In my case its a video taken from an Iphone 7.
When playing it with VLC the rotation is correct.
Example video:
https://user-images.githubusercontent.com/16120882/103677804-0e0d6100-4f83-11eb-93e0-46a2f6960b79.mp4

edit, alternative link:
https://we.tl/t-V8YU9lAOs8

@xupefei
Copy link
Member

xupefei commented Jan 10, 2021

I'm not able to reproduce this issue with both video samples you provided:
Untitled
Could you confirm?

@rabelux
Copy link
Member

rabelux commented Jan 11, 2021

Just downloaded the latest nightly and unfortunately rotation is still wrong.
Any idea what could be the reason?
I'm still on Win 7 but the creator of this issue is on Win 10 so that shouldn't be causing this,

@xupefei
Copy link
Member

xupefei commented Jan 11, 2021

@rabelux Have you installed any codec package?

@rabelux
Copy link
Member

rabelux commented Jan 11, 2021

No I haven't. Have you?

@xupefei
Copy link
Member

xupefei commented Jan 11, 2021

Me neither. Could you try this build to see if it fixes the problem: https://github.com/QL-Win/QuickLook/releases/tag/3.6.6?
I suspect it's due to #603.

@rabelux
Copy link
Member

rabelux commented Jan 11, 2021

Installed 3.6.6 and the behaviour stays the same. I even uninstalled everything, deleted files from AppData\roaming as I wanted to make sure no old files are present but no success. Might this be another Intel bug - I have an onboard Intel HD Graphics card in my laptop (and a NVIDIA NVS 3100M)

@SimJoSt
Copy link
Author

SimJoSt commented Jan 14, 2021

I can also check, if my system has some anomalies. The only codec I have installed is the H265 support app from Microsoft. Everything else is done via MPC and VLC.
I have some plugins installed in QuickLook. Could they interfere? But I believe the issue existed before as well.

@mooflu
Copy link
Contributor

mooflu commented Jan 20, 2021

These vids show fine for me, too. While working on #818 I noticed that rotation was wrong if the mediainfo lib failed to load. Maybe try the build artifact in that pull request since it changes how the mediainfo lib is loaded (once at the very beginning). If it fails to load now, it'll probably crash and there should at least be a hint in the log file.

@xupefei
Copy link
Member

xupefei commented Jan 20, 2021

@mooflu Yeah I am thinking the same. The mediainfo lib may require some C++ Runtime packages to be present. Haven't got any time to check.

@rabelux
Copy link
Member

rabelux commented Jan 20, 2021

Hey guys, thx for digging into this. Just installed mooflu's latest artifact and rotation is still the same. No crash, no error logs, so the mediainfo lib seems to be working fine. Is there some way to call the lib on the video and check the output?

@xupefei
Copy link
Member

xupefei commented Jan 21, 2021

@rabelux One easy way to check:

  1. Download OllyDbg 1.10: http://www.ollydbg.de/.
  2. Run OllyDbg, drag MediaInfo x86 DLL (https://github.com/QL-Win/QuickLook/tree/master/QuickLook.Plugin/QuickLook.Plugin.VideoViewer/MediaInfo-x86) into the window.
  3. See if it loads correctly, or an error message (DLL not found) pops up.

@rabelux
Copy link
Member

rabelux commented Jan 21, 2021

This is what I get:
grafik

I also downloaded MediaInfo.exe hoping to find out if any c++ runtime is missing (don't know whether that's the right way to do it tho) and running it on my testvideo returns:
Rotation : 90°

Anything else I could do?

@xupefei
Copy link
Member

xupefei commented Jan 23, 2021

So it seems the DLL can be loaded. I'll send you a simple testing app to further debugging.

@xupefei
Copy link
Member

xupefei commented Jan 24, 2021

Can you download this zip file, extract it, and drag an video file onto ConsoleApp1.exe? What's the output?

mediainfo1.zip

@rabelux
Copy link
Member

rabelux commented Jan 24, 2021

Can you download this zip file, extract it, and drag an video file onto ConsoleApp1.exe? What's the output?

The video with the rotation issue returns 90000, two other videos i tested return 0.
Is that the degrees? 90000 would be 360°x250

@xupefei
Copy link
Member

xupefei commented Feb 15, 2021

Reminder to @xupefei.
I'll try to look at this issue in the weekend.

@xupefei
Copy link
Member

xupefei commented Feb 21, 2021

On my machine the return value is 90. No idea why it's different to yours.

@xupefei xupefei reopened this Feb 21, 2021
@xupefei
Copy link
Member

xupefei commented Feb 21, 2021

@rabelux
Copy link
Member

rabelux commented Feb 21, 2021

Installed it but somehow behaviour is still the same:
image

@xupefei
Copy link
Member

xupefei commented Feb 22, 2021

Oops, my mistake. There's one more place to fix. I'll to it late today.

@xupefei
Copy link
Member

xupefei commented Feb 22, 2021

@rabelux
Copy link
Member

rabelux commented Feb 24, 2021

Solved!! Thank you 🥳

@rabelux rabelux closed this as completed Feb 24, 2021
@SimJoSt
Copy link
Author

SimJoSt commented Mar 27, 2021

I can confirm this works now. Great work 💪 🚀

@Dreamer-4pda
Copy link

Have this issue.
Latest build from MS Store.

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

No branches or pull requests

5 participants