[FFmpeg-user] Problem when using scale_cuda filter
Dennis Mungai
dmngaie at gmail.com
Thu Mar 21 10:17:06 EET 2019
On Thu, 21 Mar 2019 at 05:25, Александр via ffmpeg-user <
ffmpeg-user at ffmpeg.org> wrote:
> 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
> (default)
> Output stream:
> 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
> scale_cuda.
>
> Could you help me to make this filter work as expected?
>
>
Hello there,
Unfortunately, the scale_cuda parameters are quite limited, as you can
confirm:
ffmpeg -h filter=scale_cuda
Compared to scale_npp:
ffmpeg -h filter=scale_npp
Is there a specific reason as to why you'd prefer scale_cuda over
scale_npp?
I wouldn't want to make the assumption that scale_cuda is analogous to the
scale filter, wherein you'd be able to use specific flags that the latter
supports:
ffmpeg -h filter=scale
Considering that some of the options mapped to the scale filter are not
present in the scale_cuda filter in the documentation:
https://ffmpeg.org/ffmpeg-filters.html#scale-1
The scale_cuda filter was contributed by Yogender Gupta <ygupta at nvidia.com>
so you may try contacting him for clarification on this.
More information about the ffmpeg-user
mailing list