For example, consider the situation in which the hardware encoder has more capacity than the decoder. In some situations, it is necessary to perform video decoding in software. Multiple 1:N Transcode with Scaling (SW Decode->HW Scaling->HW Encode) hwaccel cuda -hwaccel_output_format cuda -i input2.mp4 480p (from input2.mp4) (audio same as input)įfmpeg -y -hwaccel cuda -hwaccel_output_format cuda -i input1.mp4 These are achieved using a single command line. Simultaneously it reads file input2.mp4 and transcodes it to output21.mp4 at 720p and output22.mp4 at 480p as H.264 videos. The following command reads file input1.mp4 as the input, decodes it in GPU hardware, scales the input in hardware, and re-encodes as H.264 videos to output11.mp4 at 480p and output12.mp4 at 240p using the GPU hardware encoder. One of the typical workloads for transcoding consists of videos being transcoded and archived at different resolutions and bitrates so that they can be served to different clients later. This method should be used to realize the full potential of GPU hardware-accelerated transcoding. Multiple 1:N HWACCEL Transcode with Scaling The pixel format (pix_fmt) should be changed to yuv444p/p010/yuv444p16 for encoding YUV 444, 420-10 and 444-10 files respectively. Workaround for this error - Copy all DLLs under C:\msys64\mingw64\bin in the folder where ffmpeg.exe is present.įfmpeg -y -vsync 0 -pix_fmt yuv420p -s 1920x1080 -i input.yuv -filter_complex "hwupload_cuda,split=4" -map "" -c:v h264_nvenc -b:v 8M output1.mp4 -map "" -c:v h264_nvenc -b:v 10M output2.mp4 -map "" -c:v h264_nvenc -b:v 12M output3.mp4 -map "" -c:v h264_nvenc -b:v 14M output4.mp4 Msys2 gives errors such as - " Libbz2-1.dll missing from your computer” while running FFmpeg.Use -vsync 0 option with decode to prevent FFmpeg from creating output YUV with duplicate and extra frames.To work around this error, use -nvccflags="-gencode arch=compute_52,code=sm_52 -O2" which overrides the default nvcc flags. This will cause the configure script to fail with the message 'ERROR: failed checking for nvcc.'. nvcc from CUDA toolkit version 11.0 or higher does not support compiling for 'compute_30'.Not specifying -extra-ldflags in the correct format will lead to error - argument not recognized.It is required for enabling NVCUVID, otherwise the configuration will lead to an error - “ CUDA Not found”. Make sure cuda.h is available in /usr/local/cuda/include along with SDK header files.Msys (and not Msys2) cannot launch the mingw64 command shell.Using mingw32 would result in errors such as - “ Relocation truncated to fit - R_X86_64_32”. Make sure you are using mingw64 for a 64-bit system.Please check out a release version if it is broken, or use an older snapshot. To compile FFmpeg on WSL, follow the steps as specified in Compiling for Linux.Ĭommonly faced issues and tips to resolve them To compile FFmpeg on Linux, do the following:Ĭompiling for Windows Subsystem for Linux (WSL)įFmpeg with NVIDIA GPU acceleration is supported on WSL. More Information on building FFmpeg can be found at: įFmpeg with NVIDIA GPU acceleration is supported on all Linux platforms. Download the FFmpeg source code repository and compile it using an appropriate compiler. To compile FFmpeg, the CUDA toolkit must be installed on the system, though the CUDA toolkit is not needed to run the FFmpeg compiled binary.īefore using FFmpeg, it is recommended to refer to the FFmpeg documentation, note the version of the Video Codec SDK it uses, and ensure that the minimum driver required for that version of the Video Codec SDK is installed.įFmpeg is an open-source project. FFmpeg has been compiled and tested with Microsoft Visual Studio 2013 SP2 and above (Windows), MinGW (msys2-x86_64-20161025) (Windows) and gcc 4.8 and above (Linux) compilers.įFmpeg requires separate git repository nvcodec-headers for NV-accelerated ffmpeg build. įor the rest of this document, it is assumed that the system being used has a GPU which has both NVENC and NVDEC.įFmpeg supports both Windows and Linux. FFmpeg with NVIDIA GPU acceleration requires a system with Linux or Windows operating system and a supported NVIDIA GPU.įor a list of supported GPUs, refer to.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |