[FFmpeg-user] Corrupted output when resizing with scale_npp filter

Christian Kaik christian.kaik at cinepostproduction.de
Mon Jan 8 14:55:56 EET 2018


Follow-up on this in case anyone is interested.

I've been using the latest version of the NVENC SDK (8.0.14) as well as the CUDA Toolkit (9.1).

I tried downgrading the CUDA Toolkit version to the latest 8.0 patch.
The scale_npp filter is working as expected now.

For testing purposes I've been transcoding the Tears of Steel short film
available here: https://mango.blender.org/download/ (using the 4K rendered mov as input)
There seems to be something odd about this file - or my transcoding, I'm not sure.

When I downscale this to 2K using scale_npp I get a few pixel wide
horizontal green bar at the bottom of the video.

ffmpeg -y \
  -hwaccel cuvid -c:v h264_cuvid -i tears_of_steel/tearsofsteel_4k.mov \
  -filter_complex scale_npp=1920:-1 -c:v h264_nvenc tears.of.steel.1080p.mp4

This does NOT happen with other resolutions I've tested with scale_npp:

* 1280:-1
* 960:-1
* 768:-1
* 640:-1
* 480:-1

Here's the output from the above command (limited to 30s):

ffmpeg version N-89748-g2050464 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.5) 20160609
  configuration: --prefix=/home/user/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/user/ffmpeg_build/include --extra-ldflags=-L/home/user/ffmpeg_build/lib --bindir=/home/user/bin --enable-cuda-sdk --enable-cuvid --enable-libnpp --extra-cflags=-I../nv_sdk --extra-ldflags=-L../nv_sdk --extra-cflags=-I/usr/local/cuda/include/ --extra-ldflags=-L/usr/local/cuda/lib64/ --enable-libass --enable-libfdk-aac --enable-nvenc --enable-nonfree
  libavutil      56.  7.100 / 56.  7.100
  libavcodec     58.  9.100 / 58.  9.100
  libavformat    58.  3.100 / 58.  3.100
  libavdevice    58.  0.100 / 58.  0.100
  libavfilter     7. 11.101 /  7. 11.101
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tears_of_steel/tearsofsteel_4k.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf54.29.104
  Duration: 00:12:14.00, start: 0.000000, bitrate: 73434 kb/s
    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 3840x1714 [SAR 1:1 DAR 1920:857], 73244 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc (default)
    Metadata:
      handler_name    : DataHandler
      encoder         : libx264
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 182 kb/s (default)
    Metadata:
      handler_name    : DataHandler
Stream mapping:
  Stream #0:0 (h264_cuvid) -> scale_npp (graph 0)
  scale_npp (graph 0) -> Stream #0:0 (h264_nvenc)
  Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mp4, to 'tears.of.steel.1080p.mp4':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf58.3.100
    Stream #0:0: Video: h264 (h264_nvenc) (Main) (avc1 / 0x31637661), cuda, 1920x857 [SAR 1:1 DAR 1920:857], q=-1--1, 2000 kb/s, 24 fps, 12288 tbn, 24 tbc (default)
    Metadata:
      encoder         : Lavc58.9.100 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay: -1
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : DataHandler
      encoder         : Lavc58.9.100 aac
frame=  720 fps=204 q=27.0 Lsize=    7377kB time=00:00:30.00 bitrate=2014.5kbits/s speed=8.51x
video:6885kB audio:474kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.248955%


More information about the ffmpeg-user mailing list