Hi
ffmpeg from git is running OK with cuda 9.1
Video encoding is OK by using following command
./ffmpeg -hwaccel cuvid -c:v h264_cuvid -i /data/1920x800.mkv -vf scale_npp=1280:720 -b:a 320k -c:v h264_nvenc -preset slow -rc vbr_hq -b:v 3M -maxrate:v 4M /data/out.avi
But i need to crop video file to 16:9 aspect ratio.
How can i do this?
I’m trying this:
./ffmpeg -hwaccel cuvid -c:v h264_cuvid -crop 10x100x10x100 -i /data/t1920x800.mkv -vf scale_npp=1280:720 -b:a 320k -c:v h264_nvenc -preset slow -rc vbr_hq -b:v 3M -maxrate:v 4M /data/out.avi
and this:
./ffmpeg -hwaccel cuvid -c:v h264_cuvid -i /data/1920x800.mkv -vf crop=1421:820;scale_npp=1280:720 -b:a 320k -c:v h264_nvenc -preset slow -rc vbr_hq -b:v 3M -maxrate:v 4M /data/out.avi
But crop no worked for me (
From FFMPEG you have this options for this decoder:
Decoder h264_cuvid [Nvidia CUVID H264 decoder]:
General capabilities: delay avoidprobe hardware
Threading capabilities: none
Supported hardware devices: cuda
Supported pixel formats: cuda nv12 p010le p016le
h264_cuvid AVOptions:
-deint <int> .D.V...... Set deinterlacing mode (from 0 to 2) (default weave)
weave 0 .D.V...... Weave deinterlacing (do nothing)
bob 1 .D.V...... Bob deinterlacing
adaptive 2 .D.V...... Adaptive deinterlacing
-gpu <string> .D.V...... GPU to be used for decoding
-surfaces <int> .D.V...... Maximum surfaces to be used for decoding (from 0 to INT_MAX) (default 25)
-drop_second_field <boolean> .D.V...... Drop second field when deinterlacing (default false)
-crop <string> .D.V...... Crop (top)x(bottom)x(left)x(right)
-resize <string> .D.V...... Resize (width)x(height)
Try first to make it simple:
ffmpeg -hwaccel cuvid -c:v h264_cuvid -crop 10x100x10x100 -i /data/t1920x800.mkv -c:v h264_nvenc /data/out.avi
If that doesn’t work, enable the debug mode -loglevel debug so you can see how the pipeline is executed.