linux:ffmpeg

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:ffmpeg [2024/03/31 09:00] – [Ffmpeg support QSV] adminlinux:ffmpeg [2024/06/09 13:39] (current) admin
Line 1: Line 1:
 ====== FFmpeg ====== ====== FFmpeg ======
  
 +  * examples https://jeremyrouet.medium.com/simple-commands-to-learn-ffmpeg-in-real-use-case-a53f4360efa7
   * qsv params [[https://gist.github.com/nico-lab/58ac62e359bd63feed36af64db3e4406|gist]] \\   * qsv params [[https://gist.github.com/nico-lab/58ac62e359bd63feed36af64db3e4406|gist]] \\
   * install ffmep qsv https://gist.github.com/Brainiarc7/4f831867f8e55d35cbcb527e15f9f116 \\   * install ffmep qsv https://gist.github.com/Brainiarc7/4f831867f8e55d35cbcb527e15f9f116 \\
Line 73: Line 74:
  
 ==== Ffmpeg support QSV ==== ==== Ffmpeg support QSV ====
-[[https://www.michaelstinkerings.org/gpu-virtualization-with-intel-12th-gen-igpu-uhd-730/| configure qsv 12th gen ]] \\ +[[https://www.michaelstinkerings.org/gpu-virtualization-with-intel-12th-gen-igpu-uhd-730/| configure qsv 12th gen on proxmox lxc ]] \\ 
-[[https://jellyfin.org/docs/general/administration/hardware-acceleration/intel|jellyfin configure QSV on intel]] [[https://trac.ffmpeg.org/wiki/Hardware/VAAPI|wiki ffmpeg vaapi]] [[https://trac.ffmpeg.org/wiki/Hardware/QuickSync| QSV quick sync]]  \\+[[https://jellyfin.org/docs/general/administration/hardware-acceleration/intel|jellyfin configure QSV on intel]] [[https://trac.ffmpeg.org/wiki/Hardware/VAAPI|off wiki ffmpeg vaapi]] [[https://trac.ffmpeg.org/wiki/Hardware/QuickSync|off wiki QSV quick sync]]  \\
 [[https://github.com/intel/media-driver?tab=readme-ov-file#decodingencoding-features| intel decoding/encoding features ]] \\ [[https://github.com/intel/media-driver?tab=readme-ov-file#decodingencoding-features| intel decoding/encoding features ]] \\
 +:!:[[https://www.reddit.com/r/Proxmox/comments/14c8bpj/igpu_passthrough_for_intel_quick_sync/|igpu_passthrough_for_intel_quick_sync]]
 +
 +=== Proxmox install ===
 +  - on proxmox see in [[linux:proxmox|Linux.proxmox]] install [[https://www.derekseaman.com/2023/11/proxmox-ve-8-1-windows-11-vgpu-vt-d-passthrough-with-intel-alder-lake.html| alderlake ]]
 +  - in lxc container(CT) configure like [[https://www.michaelstinkerings.org/gpu-virtualization-with-intel-12th-gen-igpu-uhd-730/| configure qsv 12th gen on proxmox lxc ]]
 +  - inside CT upgrade and add jellifin  repository and install jellyfin ffmpeg 
 +
 <code bash [enable_line_numbers="true"]> <code bash [enable_line_numbers="true"]>
 # for N100 cpu use VAAPI not QSV # for N100 cpu use VAAPI not QSV
Line 84: Line 92:
  
 cliinfo  cliinfo 
 +
 +intel_gpu_top -d sriov
 +
  
  
Line 98: Line 109:
  
 #Example vaapi #Example vaapi
-ffmpeg -init_hw_device vaapi=foo:/dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device foo -i d.mp4 -filter_hw_device foo -vf 'format=nv12|vaapi,hwupload' -c:v h264_vaapi output.mp4+ffmpeg -init_hw_device vaapi=foo:/dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device foo -i input.mp4 -filter_hw_device foo -vf 'format=nv12|vaapi,hwupload' -c:v h264_vaapi output.mp4 
 +# frame= 6348 fps=248 q=-0.0 size=   87040kB time=00:04:24.68 bitrate=2693.9kbits/s speed=10.3x     
 + 
 +# codecs param  
 +ffmpeg -help encoder=h264_vaapi
  
  
 #example QSV #example QSV
 LIBVA_TRACE=/tmp/libva_trace.log DRI_PRIME=0 LIBVA_DRIVER_NAME=iHD /usr/lib/jellyfin-ffmpeg/ffmpeg -init_hw_device qsv=hw -filter_hw_device hw -i input.mp4 -vf hwupload=extra_hw_frames=64,format=qsv -c:v h264_qsv -b:v 5M -maxrate 5M output.mp4 LIBVA_TRACE=/tmp/libva_trace.log DRI_PRIME=0 LIBVA_DRIVER_NAME=iHD /usr/lib/jellyfin-ffmpeg/ffmpeg -init_hw_device qsv=hw -filter_hw_device hw -i input.mp4 -vf hwupload=extra_hw_frames=64,format=qsv -c:v h264_qsv -b:v 5M -maxrate 5M output.mp4
 +#frame= 1285 fps=122 q=19.0 Lsize=   33332kB time=00:00:53.50 bitrate=5103.5kbits/s speed=5.07x   
 +
 +#on host check stat of gpu
 +oot@pve:/usr/src/i915-sriov-dkms-6.5.13-3# intel_gpu_top -d sriov
 +
 +intel-gpu-top: Intel Alderlake_n (Gen12) @ /dev/dri/card0 -  749/ 737 MHz;   0% RC6
 +    1.11/12.68 W;        0 irqs/s
 +
 +         ENGINES     BUSY                                                 MI_SEMA MI_WAIT
 +       Render/3D   42.18% |███████████████████                          |      0%      0%
 +         Blitter    0.00% |                                                  0%      0%
 +           Video   18.49% |████████▍                                    |      0%      0%
 +    VideoEnhance   12.34% |█████▋                                            0%      0%
 +       [unknown]    0.00% |                                                  0%      0%
 +
 +
 </code> </code>
  
  • linux/ffmpeg.1711875624.txt.gz
  • Last modified: 2024/03/31 09:00
  • by admin