Add support for rotated videos

Issue #1087 new
Giovanni Musto created an issue

When recording in portrait many phones will not produce a 9:16 video (e.g. 1080x1920), but a standard 16:9 video with the rotation attribute set. If the video is too big to be played on the TV (for example 1920x1080 vertical video on 1080p TV), Serviio will not transcode it, because it's reading the resolution as 1920x1080.

Comments (2)

  1. Giovanni Musto reporter

    Here's the output:

    ffmpeg version N-77710-g5b4da8a Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
      configuration: --prefix=/home/rapperskull/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/rapperskull/ffmpeg_build/include --extra-ldflags=-L/home/rapperskull/ffmpeg_build/lib --bindir=/home/rapperskull/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
      libavutil      55. 12.100 / 55. 12.100
      libavcodec     57. 21.100 / 57. 21.100
      libavformat    57. 21.100 / 57. 21.100
      libavdevice    57.  0.100 / 57.  0.100
      libavfilter     6. 23.100 /  6. 23.100
      libswscale      4.  0.100 /  4.  0.100
      libswresample   2.  0.101 /  2.  0.101
      libpostproc    54.  0.100 / 54.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VID_20180904_204706.mp4':
      Metadata:
        major_brand     : mp42
        minor_version   : 0
        compatible_brands: isommp42
        creation_time   : 2018-09-04 18:47:08
        com.android.version: 8.0.0
      Duration: 00:00:01.66, start: 0.000000, bitrate: 25270 kb/s
        Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuvj420p(pc, bt470bg/bt470bg/smpte170m), 1920x1080, 23065 kb/s, SAR 1:1 DAR 16:9, 27.57 fps, 120 tbr, 90k tbn, 180k tbc (default)
        Metadata:
          rotate          : 90
          creation_time   : 2018-09-04 18:47:08
          handler_name    : VideoHandle
        Side data:
          displaymatrix: rotation of -90.00 degrees
        Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 193 kb/s (default)
        Metadata:
          creation_time   : 2018-09-04 18:47:08
          handler_name    : SoundHandle
    At least one output file must be specified
    

    I only removed the location tag

  2. Log in to comment