Configure FFmpeg using the following command (use correct CUDA library path):.Clone the nv-codec-headers repository and install using this repository as header-only: make install.Download and install a compatible driver from the NVIDIA web site.Activating support for hardware acceleration when building from source requires some extra steps: Figure 2: Transcoding pipeline with FFmpeg using NVIDIA hardware accelerationįFmpeg supports hardware accelerated decoding and encoding via the hwaccel cuda, h264_cuvid, hevc_cuvid and h264_nvenc, hevc_nvenc modules. Figure 2 shows the different elements of the transcoding process with FFmpeg. Hardware acceleration dramatically improves the performance of the workflow. Using the FFmpeg library is common practice when transcoding video data. Figure 1: GPU hardware capabilities Hardware accelerated transcoding with FFmpeg An up-to-date support matrix can be found at the Video Encode and Decode Support Matrix page. Actual support depends on the GPU that is used. Figure 1 lists many of the codecs, format and features supported with current NVIDIA hardware. NVENC and NVDEC support the many important codecs for encoding and decoding. Separate from the CUDA cores, NVENC/NVDEC run encoding or decoding workloads without slowing the execution of graphics or CUDA workloads running at the same time. NVIDIA GPUs ship with an on-chip hardware encoder and decoder unit often referred to as NVENC and NVDEC. Let’s take a look at how NVIDIA GPUs incorporate dedicated video processing hardware and how you can take advantage of it. The massive video content generated on all fronts requires robust hardware acceleration of video encoding, decoding, and transcoding. Video providers want to reduce the cost of delivering more content with great quality to more screens. The ideal solution for transcoding needs to be cost effective in terms of cost (Dollar/stream) and power efficiency (Watts/stream) along with delivering high quality content with maximum throughput for the datacenter. This makes video transcoding a critical piece of an efficient video pipeline – whether it is 1:N or M:N profiles. Content in production may arrive in one of the large numbers of codec formats that needs to be transcoded into another for distribution or archiving. Video content distributed to viewers is often transcoded into several adaptive bit rate (ABR) profiles for delivery. Live streaming will drive overall video data traffic growth for both cellular and Wi-Fi as consumers move beyond watching on-demand video to viewing live streams. All social media applications now include the feature on their respective platforms. Consumer behavior has evolved, evident in the trends of OTT video subscription and the rapid uptake of live streaming. The processing demands from high quality video applications have pushed limits for broadcast and telecommunication networks. As of July 2019 Kepler, Maxwell, Pascal, Volta and Turing generation GPUs support hardware encoding, and Fermi, Kepler, Maxwell, Pascal, Volta and Turing generation GPUs support hardware decoding. Then I configured build according to package.All NVIDIA GPUs starting with the Kepler generation support fully-accelerated hardware video encoding, and all GPUs starting with Fermi generation support fully-accelerated hardware video decoding. Then I merged GitHub - jc-kynesim/rpi-ffmpeg: FFmpeg work for RPI (branch test/4.3/kodi_main), GitHub - lrusak/FFmpeg: mirror of git:///ffmpeg.git ( v4l2-drmprime-v5) and GitHub - LibreELEC/FFmpeg (branch 4.3-libreelec-misc). I used FFMPEG sources from Kodi(XBMC) branch 4.3.1-Matrix-Alpha1-1 from GitHub - xbmc/FFmpeg: mirror of git:///ffmpeg.git. I investigated LibreElec build system (mainly /gen-patches.sh at master And now here is the part where I am failing So I tried to make my own build of ffmpeg based on LibreElec. I have read that LibreElec uses a custom patched version of FFMPEG and supports HEVC HW accelerated decoding. And regarding HEVC - I was not able to enable HW acceleration for it. It also has h264_v4l2m2m encoder, but it produces video with a green tint (bug?). Unfortunatelly, the current stock FFMPEG provided with Raspberry OS only supports HW accelerated H264 encoding using h264_omx encoder. And for this I need hardware acceleration of both HEVC decoding and H264 encoding. In short - I am trying to achieve realtime transcoding of a HEVC video stream to H264. I have a Raspberry Pi 4 with official Raspberry OS. My question is related to FFMPEG that LibreElec is using. I was not sure where to put my question, feel free to move this thread.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |