Opened 22 months ago

Last modified 22 months ago

#9822 new defect

`ffplay` filter output differs from `ffmpeg` output when `-noautorotate` is used

Reported by: goekce Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: ffplay
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by goekce)

Summary of the bug:

ffplay filter output differs from ffmpeg output when -noautorotate is used.

I am processing a video which is rotated in the metadata:

Side data:
      displaymatrix: rotation of -90.00 degrees

Video link: https://nextcloud.th-deg.de/s/MAbbjb6QfgANgE8/download/short90.mp4

How to reproduce:

% ffmpeg -noautorotate -i short90.mp4 -vf crop=in_w-2000:in_h:0 autorotate_disabled.avi

ffmpeg version N-107288-g8154cb7c2f Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.1.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-shared --enable-version3
  libavutil      57. 27.100 / 57. 27.100
  libavcodec     59. 35.100 / 59. 35.100
  libavformat    59. 25.100 / 59. 25.100
  libavdevice    59.  6.100 / 59.  6.100
  libavfilter     8. 41.100 /  8. 41.100
  libswscale      6.  6.100 /  6.  6.100
  libswresample   4.  6.100 /  4.  6.100
  libpostproc    56.  5.100 / 56.  5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'short90.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    ...
  Duration: 00:00:00.96, start: 0.000000, bitrate: 42228 kb/s
  Stream #0:0[0x1](eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuvj420p(pc, smpte170m/bt470bg/smpte170m, progressive), 3840x2160, 74557 kb/s, 30.06 fps, 30.06 tbr, 90k tbn (default)
    Metadata:
      creation_time   : 2022-07-02T16:44:43.000000Z
      handler_name    : VideoHandle
      vendor_id       : [0][0][0][0]
    Side data:
      displaymatrix: rotation of -90.00 degrees
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 96 kb/s (default)
    Metadata:
      creation_time   : 2022-07-02T16:44:43.000000Z
      handler_name    : SoundHandle
      vendor_id       : [0][0][0][0]

Then with -autorotate:

% ffmpeg -i short90.mp4 -vf crop=in_w-2000:in_h:0 autorotate.avi

...

If -autorotate is used, then width and height parameters in the filter are set correctly and results are ok:

% ls -alh autorotate*.avi
... 804K Jul  2 22:09 autorotate.avi
... 2.0M Jul  2 22:10 autorotate_disabled.avi

But in ffplay -noautorotate does not have any effect on the filters:

%  ffplay -i short90.mp4 -vf crop=in_w-2000:in_h:0
Output same as autorotate_disabled.avi

% ffplay -noautorotate -i short90.mp4 -vf crop=in_w-2000:in_h:0
Output differs from autorotate.avi

Can someone confirm this?

Change History (1)

comment:1 by goekce, 22 months ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.