mpv does not support video rotation metadata in OpenCamera-recorded MP4 video
Open
Nobody has claimed this yet.
core
core:file
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
mpv version and platform
$ mpv --version
mpv 0.27.0-270-g0358cca39e (C) 2000-2017 mpv/MPlayer/mplayer2 projects
built on Mon Oct 23 11:32:08 CEST 2017
ffmpeg library versions:
libavutil 55.58.100
libavcodec 57.89.100
libavformat 57.71.100
libswscale 4.6.100
libavfilter 6.82.100
libswresample 2.7.100
ffmpeg version: 3.3.4
Arch Linux
Reproduction steps
- Play sample file
- Notice how it's not rotated correctly
- Open sample file in gwenview (or look at the generated thumbnail from KDE's thumbnailer)
- Note how it is correctly rotated -90 degrees there
Expected behavior
mpv shows the video in the proper rotation
Actual behavior
mpv shows the video rotated 90 degree clockwise
Log file
Sample files
Additional info:
$ ffprobe VID_20171023_132840.mp4
ffprobe version 3.3.4 Copyright (c) 2007-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-avresample --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxvid --enable-shared --enable-version3
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VID_20171023_132840.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2017-10-23T11:29:09.000000Z
com.android.version: 6.0.1
Duration: 00:00:27.67, start: 0.000000, bitrate: 20280 kb/s
Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 19950 kb/s, SAR 1:1 DAR 16:9, 29.88 fps, 29.92 tbr, 90k tbn, 180k tbc (default)
Metadata:
rotate : 90
creation_time : 2017-10-23T11:29:09.000000Z
handler_name : VideoHandle
Side data:
displaymatrix: rotation of -90.00 degrees
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 95 kb/s (default)
Metadata:
creation_time : 2017-10-23T11:29:09.000000Z
handler_name : SoundHandle
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the linked MP4 sample and inspect its FFmpeg rotation metadata and display matrix alongside the linked log. Trace how mpv handles that metadata during video playback; done means the OpenCamera sample displays with the expected -90-degree rotation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100