Opened 18 months ago

Last modified 18 months ago

#2415 new defect

Wrong orientation of mp4 video

Reported by: plorenzo Owned by: beastd
Priority: normal Component: undetermined
Version: unspecified Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

If I play the attached video without any option the orientation is wrong (the ground is on the right and the sky on the left).
I can play the same file with VLC or mpv and the orientation is right, so I think this is a problem with mplayer rather than an issue in the file.

This was reported in Debian [1] mplayer version 1.5+svn38408 and I can reproduce with svn38423

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040168

Change History (4)

comment:1 by plorenzo, 18 months ago

Sorry, the sample video size is beyond the limit and I can't attach here but you can download it from the Debian bug
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040168

comment:2 by reimar, 18 months ago

Hi!
That is currently the expected behaviour, due to the performance impact of rotation it is not applied per default, but requires adding the rotate filter.
Adding
vf-pre=rotate
in the default config would change that default behaviour.
Admittedly, the better solution would be to implement rotation support in the video outputs that can do it (essentially) for free, like -vo gl.
I've not yet checked how much effort that would be.
It would not help when vo_xv is the default - but maybe XVideo can somehow support rotation for cheap as well?

comment:3 by reimar, 18 months ago

Sorry, I think I got this wrong, -vf rotate just works by chance here.
There is supposed to be partial auto-detection of rotation, where it should print:
ID_VID_0_ROTATE=90
but even that seems to not be working yet.

comment:4 by reimar, 18 months ago

SVN r38434 makes ID_VID_0_ROTATE work again - though possibly the sign of the rotation is flipped, not sure...
But more infrastructure would be needed to make this work automatically.
Some parts are there, for example vo_rotate which is currently used for -monitor-orientation is quite similar.
But I am not sure this will be addressed soon.
Note that it's really a missing feature (displaying the video not as encoded, but with extra options applied as specified by the stream) rather than a bug though.

Note: See TracTickets for help on using tickets.