Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#2,020 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp
領域
desktop

調査の方向性

回転値は QuickLook.Plugin.VideoViewer/ViewerPanel.xaml.cs で現在のカルチャを使って解析され、ウィンドウサイズ調整のために QuickLook.Plugin.VideoViewer/Plugin.cs でも再度解析されています。MediaInfo の "Rotation" フィールドに対するこの 2 つの double.TryParse の呼び出しから始めてください。両方が CultureInfo.InvariantCulture と NumberStyles.Float で解析され、ru-RU ロケールで縦向きの動画が正しい向きで表示されれば完了です。既存の回避策 rotation /= 1e3 がまだ有効かどうかも確認してください。

索引モデルが issue の本文から書いたものです。

説明

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)

主要言語
C#
スター
25.2k
フォーク
1.3k
平均マージ
10日 4時間
マージ済み PR(30日)
2

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

QL-Win/QuickLook のほかの issue

QL-Win/QuickLook の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。