Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

VideoViewer: rotated (portrait phone) videos shown sideways when system decimal separator is a comma

Open Beginner friendly
#2,020 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp
Domain
desktop

Research direction

The rotation value is parsed with the current culture in QuickLook.Plugin.VideoViewer/ViewerPanel.xaml.cs and again in QuickLook.Plugin.VideoViewer/Plugin.cs for window sizing; start with those two double.TryParse calls on the MediaInfo "Rotation" field. Done when both parse with CultureInfo.InvariantCulture and NumberStyles.Float, and a ru-RU locale shows a portrait video upright. Check whether the existing rotation /= 1e3 workaround still holds.

Written by the indexing model from the issue text.

Description

Describe the bug Portrait videos recorded on iPhone (stored as 1920x1080 with a rotation flag) are previewed sideways. This is likely the root cause of #762, which was closed without being reproduced.

Cause MediaInfo returns the rotation as "90.000". The VideoViewer parses it with the current culture:

QuickLook.Plugin.VideoViewer/ViewerPanel.xaml.cs — double.TryParse(info?.Get(StreamKind.Video, 0, "Rotation"), out var rotation);
QuickLook.Plugin.VideoViewer/Plugin.cs — same call for the window size
When the decimal separator is a comma (ru-RU, uk-UA, many other locales), "90.000" fails to parse, so rotation stays 0 and no rotation is applied. With a dot as the group separator (de-DE etc.), it parses as 90000. The existing if (rotation > 360) rotation /= 1e3; workaround covers that case, but not the comma-separator case.

Proposed fix Parse the value with the invariant culture in both places:

double.TryParse(info?.Get(StreamKind.Video, 0, "Rotation"),
NumberStyles.Float, CultureInfo.InvariantCulture, out var rotation);
After this change, the /= 1e3 workaround is probably no longer needed.

To Reproduce

Windows region format ru-RU (decimal separator ,).
Take a portrait iPhone video (HEVC .MOV, rotation=-90 in ffprobe, MediaInfo Rotation = 90.000).
Preview it in QuickLook. It is shown sideways.
Change the decimal separator to . and restart QuickLook. It is shown correctly.
Environment

Windows 11 Home 24H2 (10.0.26100)
QuickLook 4.5.0.0 (Microsoft Store)

Dominant language
C#
Stars
25.2k
Forks
1.3k
Avg merge
10d 4h
Merged PRs (30d)
2

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from QL-Win/QuickLook

All issues in QL-Win/QuickLook

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.