[FFmpeg-user] Recent build - transpose not working

Tim Greiser tgreiser at gmail.com
Tue Jul 7 21:39:41 CEST 2015


I have been using -vf "transpose=1" and similar filters for some time with
good results to rotate mp4 files that have been taken on mobile devices. In
my latest build of ffmpeg, the transpose filter no longer seems to have any
effect. Any suggestion how to resolve this issue or exactly which libraries
might be affecting the outcome?

This version works great:
ffmpeg version N-69185-g9a9b088 Copyright (c) 2000-2015 the FFmpeg
developers
  built on Jan 21 2015 22:19:24 with gcc 4.9.1 (Debian 4.9.1-19)
  configuration: --disable-debug --enable-small --enable-shared
--enable-pic --extra-libs=-ldl --enable-gpl --enable-libass
--enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx
--enable-libx264
  libavutil      54. 17.100 / 54. 17.100
  libavcodec     56. 20.100 / 56. 20.100
  libavformat    56. 19.100 / 56. 19.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5.  8.101 /  5.  8.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100


This version outputs a file that has not been transposed.
ffmpeg version N-73436-gd44cf5e Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 4.9.2 (Debian 4.9.2-10)
  configuration: --disable-debug --enable-small --enable-shared
--enable-pic --extra-libs=-ldl --enable-gpl --enable-libass
--enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx
--enable-libx264
  libavutil      54. 28.100 / 54. 28.100
  libavcodec     56. 46.101 / 56. 46.101
  libavformat    56. 40.100 / 56. 40.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 20.100 /  5. 20.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
  libpostproc    53.  3.100 / 53.  3.100



Here is the output of the non-functioning transpose command. As you can
see, the resolution of stream 0 stays at 480x360 after the encode.

$ ffmpeg -i 1436227351094248085.mp4 -vf "transpose=1" -metadata:s:v:0
rotate=0 -acodec copy -crf 20 -preset slow -movflags +faststart -profile:v
main -level 3.1 -flags +global_header server-out.mp4

ffmpeg version N-73436-gd44cf5e Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 4.9.2 (Debian 4.9.2-10)
  configuration: --disable-debug --enable-small --enable-shared
--enable-pic --extra-libs=-ldl --enable-gpl --enable-libass
--enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx
--enable-libx264
  libavutil      54. 28.100 / 54. 28.100
  libavcodec     56. 46.101 / 56. 46.101
  libavformat    56. 40.100 / 56. 40.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 20.100 /  5. 20.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1436227351094248085.mp4':
  Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
    creation_time   : 2015-07-07 00:02:12
    model           : iPod touch
    model-eng       : iPod touch
    encoder         : 8.3
    encoder-eng     : 8.3
    date            : 2015-07-06T18:02:12-0600
    date-eng        : 2015-07-06T18:02:12-0600
    make            : Apple
    make-eng        : Apple
  Duration: 00:00:01.24, start: 0.000000, bitrate: 892 kb/s
    Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv,
smpte170m/bt709/bt709), 480x360, 801 kb/s, 29.96 fps, 29.97 tbr, 600 tbn,
1200 tbc (default)
    Metadata:
      rotate          : 90
      creation_time   : 2015-07-07 00:02:12
      handler_name    : Core Media Data Handler
      encoder         : H.264
    Side data:
      displaymatrix: rotation of -90.00 degrees
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono,
fltp, 59 kb/s (default)
    Metadata:
      creation_time   : 2015-07-07 00:02:12
      handler_name    : Core Media Data Handler
[libx264 @ 0x23ed3a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x23ed3a0] profile Main, level 3.1
[libx264 @ 0x23ed3a0] 264 - core 146 r2538 121396c - H.264/MPEG-4 AVC codec
- Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1
ref=5 deblock=1:0:0 analyse=0x1:0x111 me=umh subme=8 psy=1 psy_rd=1.00:0.00
mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11
fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1
sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0
constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3
weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40
intra_refresh=0 rc_lookahead=50 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=0
qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'server-out.mp4':
  Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
    make-eng        : Apple
    model           : iPod touch
    model-eng       : iPod touch
    make            : Apple
    encoder         : Lavf56.40.100
    date            : 2015-07-06T18:02:12-0600
    date-eng        : 2015-07-06T18:02:12-0600
    Stream #0:0(und): Video: h264 (libx264) ([33][0][0][0] / 0x0021),
yuv420p, 480x360, q=-1--1, 29.97 fps, 30k tbn, 29.97 tbc (default)
    Metadata:
      handler_name    : Core Media Data Handler
      creation_time   : 2015-07-07 00:02:12
      rotate          : 0
      encoder         : Lavc56.46.101 libx264
    Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, mono,
59 kb/s (default)
    Metadata:
      creation_time   : 2015-07-07 00:02:12
      handler_name    : Core Media Data Handler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0x23ec140] Starting second pass: moving the moov atom to the
beginning of the file
frame=   37 fps=0.0 q=26.0 Lsize=      82kB time=00:00:01.30 bitrate=
518.8kbits/s
video:70kB audio:9kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 3.277564%
[libx264 @ 0x23ed3a0] frame I:1     Avg QP:18.70  size: 16695
[libx264 @ 0x23ed3a0] frame P:10    Avg QP:20.78  size:  3618
[libx264 @ 0x23ed3a0] frame B:26    Avg QP:23.22  size:   710
[libx264 @ 0x23ed3a0] consecutive B-frames:  5.4%  0.0%  8.1% 86.5%
[libx264 @ 0x23ed3a0] mb I  I16..4: 26.8%  0.0% 73.2%
[libx264 @ 0x23ed3a0] mb P  I16..4:  1.9%  0.0%  0.6%  P16..4: 45.0% 22.7%
13.6%  0.0%  0.0%    skip:16.2%
[libx264 @ 0x23ed3a0] mb B  I16..4:  0.2%  0.0%  0.0%  B16..8: 50.0%  5.3%
 0.5%  direct: 1.2%  skip:42.8%  L0:50.5% L1:46.9% BI: 2.6%
[libx264 @ 0x23ed3a0] direct mvs  spatial:96.2% temporal:3.8%
[libx264 @ 0x23ed3a0] coded y,uvDC,uvAC intra: 76.4% 78.5% 28.2% inter:
7.5% 18.7% 0.3%
[libx264 @ 0x23ed3a0] i16 v,h,dc,p: 25% 12%  6% 56%
[libx264 @ 0x23ed3a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 12% 10%  7% 10%
10% 12% 11% 11%
[libx264 @ 0x23ed3a0] i8c dc,h,v,p: 42% 21% 27% 11%
[libx264 @ 0x23ed3a0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x23ed3a0] ref P L0: 63.6%  7.2% 18.7%  4.9%  4.5%  1.1%
[libx264 @ 0x23ed3a0] ref B L0: 87.2% 11.6%  0.9%  0.3%
[libx264 @ 0x23ed3a0] ref B L1: 95.2%  4.8%
[libx264 @ 0x23ed3a0] kb/s:462.24

Thanks,
Tim.


More information about the ffmpeg-user mailing list