FFMpegCore
FFMpegCore copied to clipboard
HardwareAcceleration CUDA
Hello, I want to perform a transcoding with HardwareAcceleration (Nvidia GPU), I tested with FFmpeg direct commands in CMD, and it works perfectly, now I am integrating .NetFramework with FFmpegCore, I have achieved good results with "HardwareAccelerationDevice.D3D11VA" but now we need to do it with CUDA, but the hardware acceleration devices don't give me this option, I tried with CUVID believing that it is the same as CUDA but I can't get it to work.
`FFMpegArguments
.FromFileInput(fileS, true, options => options
.WithHardwareAcceleration(HardwareAccelerationDevice.CUVID))
.OutputToFile(fileT + "." + format.ToLower(), true, options => options
.WithDuration(mediaInfo.Duration)
.UsingMultithreading(true)
//.WithVideoCodec(VideoCodec.LibX264)
.WithVideoCodec("h264_nvenc")
.WithAudioCodec(AudioCodec.Aac)
.WithVideoBitrate(150)
.WithVideoFilters(filterOptions => filterOptions
//CITY
.DrawText(DrawTextOptions
.Create("CDMX", "/Windows/Fonts/Arial.ttf")
.WithParameter("fontcolor", "white")
.WithParameter("fontsize", "70")
.WithParameter("box", "1")
.WithParameter("boxcolor", "[email protected]")
.WithParameter("boxborderw", "5")
.WithParameter("x", "0")
.WithParameter("y", "0"))
.Resize(340, 260)
.WithFramerate(15)
.UsingThreads(6)
.WithFastStart())
.NotifyOnProgress(OnPercentageProgess, mediaInfo.Duration)
.NotifyOnProgress(OnTimeProgess)
.ProcessSynchronously();`
This is the answer of Attempt with CUVID, anyway, CUVID and CUDA are not the same



This the comand in CMD with -hwaccel cuda
