参考情報
スマホで縦構図で動画を撮影すると、プレイヤーによって縦で再生されたり横で再生されたりする。つまり、縦横情報のようなものが埋め込まれていると思われる。
以前(記憶は定かでないがデジカメだったかも)は縦で撮ってしまっても横(長)に倒れた状態で再生されるので、動画編集ソフト(shotcut等)で変換をするしかなく、jpegのExifみたいなものはないのかなと思っていた。
調べてみると、Exifみたいなよく知られた名前はないみたいだが、メタデータはある事がわかった。
確認方法
Windowsのエクスプローラーからプロパティーの詳細を見ても、Exifは内容が表示されるが、動画は一部しか表示されない。今回のきっかけになった向きの情報は表示されない。
専用のツールもあるみたいだが、なんかこれって感じのがなかった。
普段から使っているMPC-BEでプロパティーを見ると表示されることが分かった。(File→Properties→MediaInfo)
General Complete name : D:\*\VID20241114121829.mp4 Format : MPEG-4 Format profile : Base Media / Version 2 Codec ID : mp42 (isom/mp42) File size : 39.0 MiB Duration : 16 s 487 ms Overall bit rate : 19.9 Mb/s Frame rate : 22.882 FPS Encoded date : 2024-11-14 03:18:48 UTC Tagged date : 2024-11-14 03:18:48 UTC com.android.version : 11 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : High@L4 Format settings : CABAC / 1 Ref Frames Format settings, CABAC : Yes Format settings, Reference fra : 1 frame Format settings, GOP : M=1, N=30 Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 16 s 301 ms Source duration : 16 s 301 ms Bit rate : 19.8 Mb/s Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Rotation : 90° Frame rate mode : Variable Frame rate : 22.882 FPS Minimum frame rate : 9.981 FPS Maximum frame rate : 30.540 FPS Real frame rate : 30.000 FPS Standard : NTSC Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.417 Stream size : 38.4 MiB (99%) Source stream size : 38.4 MiB (99%) Title : VideoHandle Language : English Encoded date : 2024-11-14 03:18:48 UTC Tagged date : 2024-11-14 03:18:48 UTC Color range : Limited colour_range_Original : Full Color primaries : BT.709 colour_primaries_Original : BT.601 NTSC Transfer characteristics : BT.709 Matrix coefficients : BT.709 mdhd_Duration : 16301 Codec configuration box : avcC Audio ID : 2 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 16 s 487 ms Source duration : 16 s 469 ms Bit rate mode : Constant Nominal bit rate : 96.0 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 SPF) Compression mode : Lossy Source stream size : 193 KiB (0%) Title : SoundHandle Language : English Encoded date : 2024-11-14 03:18:48 UTC Tagged date : 2024-11-14 03:18:48 UTC mdhd_Duration : 16487
長くてわかりにくいが、真ん中あたりに"Rotation : 90°"という記載がある。
縦横がおかしい時は、これだけ書き換えれば正しく表示されるようになるはず…。
0 件のコメント:
コメントを投稿