0

I am trying to develop a transoding service which makes use of nvidia hardware acceleration capabilities ( The gpu used in this process is a Tesla T4); I want to generate a mpeg-dash playlist for my video so that i can stream it;

ffmpeg -y -hwaccel cuda -hwaccel_output_format cuda -i mobil1.mp4 -c:v h264_nvenc -c:a aac  \
-map v:0 -b:v:0 4000k -maxrate:0 5500k -bufsize:0 4500k -filter:v:0 "scale_npp=1920:1080:force_original_aspect_ratio=decrease" -map 0:a -b:a 128k \
-f dash dash.mpd

But when mobile videos are uploaded ( which have rotation metadata ) I encounter the following error:

Impossible to convert between the formats supported by the filter 'transpose' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0

How can i solve this issue? I am using the following docker image: jrottenberg/ffmpeg:4.4-nvidia

ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-shared --enable-avresample --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-gpl --enable-libass --enable-fontconfig --enable-libfreetype --enable-libvidstab --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxcb --enable-libx265 --enable-libxvid --enable-libx264 --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-postproc --enable-small --enable-version3 --enable-libbluray --enable-libzmq --extra-libs=-ldl --prefix=/opt/ffmpeg --enable-libopenjpeg --enable-libkvazaar --enable-libaom --extra-libs=-lpthread --enable-libsrt --enable-libaribb24 --enable-nvenc --enable-cuda --enable-cuvid --enable-libnpp --extra-cflags='-I/opt/ffmpeg/include -I/opt/ffmpeg/include/ffnvcodec -I/usr/local/cuda/include/' --extra-ldflags='-L/opt/ffmpeg/lib -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib32/'
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'mobil1.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2021-04-25T16:21:32.000000Z
    com.android.version: 11
    com.android.capture.fps: 30.000000
  Duration: 00:02:17.75, start: 0.000000, bitrate: 17255 kb/s
  Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 16996 kb/s, SAR 1:1 DAR 16:9, 30.02 fps, 30 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      rotate          : 90
      creation_time   : 2021-04-25T16:21:32.000000Z
      handler_name    : VideoHandle
      vendor_id       : [0][0][0][0]
    Side data:
      displaymatrix: rotation of -90.00 degrees
  Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)
    Metadata:
      creation_time   : 2021-04-25T16:21:32.000000Z
      handler_name    : SoundHandle
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_nvenc))
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Impossible to convert between the formats supported by the filter 'transpose' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0
[aac @ 0x5618677050c0] Qavg: 9442.968
[aac @ 0x5618677050c0] 2 frames left in the queue on closing
Conversion failed!
4
  • Copy and paste all of the text from the log.
    – llogan
    Commented Aug 11, 2021 at 17:00
  • @llogan i have added the full logs of the command
    – Eduard6421
    Commented Aug 11, 2021 at 17:24
  • Lazy answer is to add the -noautorotate input option.
    – llogan
    Commented Aug 11, 2021 at 17:24
  • Yes but this is a huge issue; Because in this way portrait filmed videos are not correctly displayed on mobile / web apps
    – Eduard6421
    Commented Aug 11, 2021 at 17:25

0

You must log in to answer this question.

Browse other questions tagged .