[FFmpeg-user] Problem when using scale_cuda filter
alexspace at mail.ru
Thu Mar 21 04:25:29 EET 2019
Hello, I am trying to do full hardware video transcoding with scaling.
Here is my console command:
ffmpeg -hwaccel nvdec -hwaccel_output_format cuda -i "input.mp4" -vf
scale_cuda=-2:360 -c:v h264_nvenc -b:v 2000k "output.mp4"
Input stream info:
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1920x1080 [SAR 1:1 DAR 16:9], 1711 kb/s, 1 fps, 1 tbr, 16384 tbn, 2 tbc
Stream #0:0(und): Video: h264 (h264_nvenc) (Main) (avc1 / 0x31637661),
cuda, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 2000 kb/s, 1 fps, 16384 tbn,
1 tbc (default)
Unfortunately, the output video is stretched vertically. It seems like
filter crops around 60px from the bottom of original video, then scales
1860x1080 to 640x360. Curious that the very first frame is scaled correctly.
Scale_npp function doesn't have this problem, but I would prefer use
Could you help me to make this filter work as expected?
More information about the ffmpeg-user