#9895: Autorotate wrong direction for some android mp4 videos
-------------------------------------+-------------------------------------
Reporter: Taylor | Owner: (none)
Hughes |
Type: defect | Status: new
Priority: normal | Component:
| undetermined
Version: unspecified | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Description changed by Taylor Hughes:
Old description:
> Summary of the bug: For some mp4 uploads from native android apps
> (probably using a weird and/or broken encoder), ffmpeg interprets the
> rotation differently from Chrome/Quicktime and autorotates the video
> incorrectly, despite the rotation/display matrix appearing correct via
> ffprobe.
>
> How to reproduce:
> Given video in this unusual format (attached) with rotation = 90
> ffmpeg -i upsidedown-original.mp4 -y upsidedown-out.mp4
> Upside down video results with rotation = 0
>
> ffprobe output:
> {{{
> [STREAM]
> index=1
> codec_name=h264
> ...
> [SIDE_DATA]
> side_data_type=Display Matrix
> displaymatrix=
> 00000000: 0 -65536 0
> 00000001: 65536 0 0
> 00000002: 0 0 1073741824
>
> rotation=90
> [/SIDE_DATA]
> [/STREAM]
> }}}
>
> but log indicates cclock instead of clock rotation for 90deg:
>
> {{{
> [transpose @ 0x149f0a260] Setting 'dir' to value 'cclock'
> }}}
>
> resulting output video thus appears 180deg from expectation
New description:
Summary of the bug: For some mp4 uploads from native android apps
(probably using a weird and/or broken encoder), ffmpeg interprets the
rotation differently from Chrome/Quicktime and autorotates the video
incorrectly, despite the rotation/display matrix appearing correct via
ffprobe.
How to reproduce:
Given video in this unusual format (attached) with rotation = 90
{{{
ffmpeg -i upsidedown-original.mp4 -y upsidedown-out.mp4
}}}
Upside down video results with rotation = 0
ffprobe output:
{{{
[STREAM]
index=1
codec_name=h264
...
[SIDE_DATA]
side_data_type=Display Matrix
displaymatrix=
00000000: 0 -65536 0
00000001: 65536 0 0
00000002: 0 0 1073741824
rotation=90
[/SIDE_DATA]
[/STREAM]
}}}
but log indicates cclock instead of clock rotation for 90deg:
{{{
[transpose @ 0x149f0a260] Setting 'dir' to value 'cclock'
}}}
resulting output video thus appears 180deg from expectation
--
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9895#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker_______________________________________________
FFmpeg-trac mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".