Hi,
I need to adjust to contrast of some mkv file I have tried this code:
but I get this error:Code:ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i title00.mkv -c:v hevc_nvenc -b:v 5M -vf eq=contrast=1.0 output.mkv
Code:Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' 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
If I run the some line without "-vf eq=contrast=1.0":
Code:ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i title00.mkv -c:v hevc_nvenc -b:v 5M output.mkv
the command work and don't show any error message but don't allow me to adjust the contrast.
There is a way to modify the contrast with nvidia hevc_nvenc codec ?
Thanks !
+ Reply to Thread
Results 1 to 16 of 16
-
-
Remove "-hwaccel_output_format cuda " when you want to apply software based filters.
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
Thank you, unfortunatenly if I add "-pix_fmt yuv420p" after "-vsync 0" I get
Code:Option pixel_format not found.
Probably encode via software.
I need to process 6 TB of video.
There is another way ? -
Option pixel_format not found.
There is another way ?users currently on my ignore list: deadrats, Stears555, marcorocchini -
From what I've read (since my earlier reply) that option leaves the decompressed video in video memory. The CPU can't access that memory so CPU filters cannot be used on it. Removing that option causes the decompressed video to be copied back to CPU memory so the CPU can access it. Then when it's ready to be compressed it is copied back to video memory. That's the cause of the slowdown. Switching to CPU encoding would likely be a much bigger drop in performance (depending on encoder and settings).
https://developer.nvidia.com/blog/nvidia-ffmpeg-transcoding-guide/
I don't now if there's any way to get the GPU to perform the contrast adjustment. -
If the contrast or other setting is not make by GPU, this is not a problem becouse it is a fast operation.
The most important think is the encode / decode that must be done by GPU otherwise will be a high drop of performace.
Hope exist a solution. -
I only saw scale_npp and transpose_npp in the ffmpeg filters doc:
https://ffmpeg.org/ffmpeg-filters.html#scale_005fnpp
https://ffmpeg.org/ffmpeg-filters.html#transpose_005fnpp
It's the copy operations that are slowing it down:
Copy decompressed frame from video memory to CPU memory, apply CPU eq filter, copy frame from CPU memory back to GPU memory for compression. -
just to let you known I have found the solution:
-vf hwdownload,format=nv12,eq=contrast=1,hwupload_cuda
in short: Add "hwdownload,format=nv12," before and ",hwupload_cuda" after my filter and work perfectly.
Thanks ! -
here full command line:
ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i title00.mkv -an -sn -c:v:0 hevc_nvenc -cq 30 -vf hwdownload,format=nv12,eq=contrast=1.03,hwupload_c uda output_ottimale.mkv
there is no any speed drop (for some strange reason in this post cut "hwupload_cuda").
Only for my curiosity:
Someone have experience about option like these:
-rc-lookahead 32 -spatial-aq 1 ?
someone tell that improve the quality but I don't known if is true or not ? I have GTX 1060 6GB video card -
you might want to read: https://docs.nvidia.com/video-technologies/video-codec-sdk/pdf/Using_FFmpeg_with_NVIDI...celeration.pdf
Both Lookahead and Adaptive Quantization (AQ) are explained there,...users currently on my ignore list: deadrats, Stears555, marcorocchini
Similar Threads
-
Using ffmpeg batch file with Nvidia GTX 1650 super
By G4SAQ Russ in forum Video ConversionReplies: 6Last Post: 4th Apr 2021, 11:34 -
ffmpeg and NVIDIA support under Linux
By jeyjey in forum LinuxReplies: 1Last Post: 19th Mar 2021, 08:47 -
crf wit hevc_nvenc in ffmpeg?
By mathias_freire in forum Video ConversionReplies: 5Last Post: 4th Dec 2020, 01:55 -
FFMPEG - hevc_nvenc & h264_nvenc lossless presets not truly lossless?
By AnomalyDetected in forum Video ConversionReplies: 5Last Post: 27th Oct 2019, 02:24 -
ffmpeg nvidia-gpu-accelerated encoding using NVENC - commandline settings
By hydra3333 in forum Video ConversionReplies: 3Last Post: 7th Sep 2016, 09:11