User Tools

Site Tools


ubuntu:video:ffmpeg:hardware_acceleration_using_gpu:amd_gpu:benchmark

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
ubuntu:video:ffmpeg:hardware_acceleration_using_gpu:amd_gpu:benchmark [2023/06/13 10:06] peterubuntu:video:ffmpeg:hardware_acceleration_using_gpu:amd_gpu:benchmark [2023/06/13 10:23] (current) – removed peter
Line 1: Line 1:
-====== Ubuntu - Video - ffmpeg - Hardware Acceleration using GPU - AMD GPU - Benchmark ====== 
- 
-===== Null muxer ===== 
- 
-A simple way to benchmark decoding is to use the null muxer: 
- 
-<code bash> 
-ffmpeg -i input -f null - 
-</code> 
- 
-<WRAP info> 
-**NOTE:**  The following parts of the command forces a null file: <code bash> 
--f null - 
-</code> 
- 
-</WRAP> 
- 
----- 
- 
-===== Timing decoding ===== 
- 
-Linux and macOS users can add the time command: 
- 
-<code bash> 
-time ffmpeg -i input -f null - 
-</code> 
- 
-returns: 
- 
-<code bash> 
-[...] 
-real 0m3.115s 
-user 0m0.223s 
-sys 0m0.244s 
-</code> 
- 
-<WRAP info> 
-**NOTE:**  See **man time** for more info. 
-</WRAP> 
- 
----- 
- 
-===== Benchmark option ===== 
- 
-The **-benchmark** option can be added to output CPU time and maximum memory consumption: 
- 
-<code bash> 
-time ffmpeg -i input -benchmark -f null - 
-</code> 
- 
-returns: 
- 
-<code bash> 
-[...] 
-bench: utime=0.154s stime=0.196s rtime=3.000s 
-bench: maxrss=365256kB 
-</code> 
- 
----- 
- 
-===== Choosing streams ===== 
- 
-If you want to just decode a particular stream then use the map option: 
- 
-<code bash> 
-ffmpeg -i input -map 0:a:0 -f null - 
-</code> 
- 
-<WRAP info> 
-**NOTE:**  Another approach to ignore streams is to use: 
- 
-  * **-an** to ignore audio streams. 
-  * **-vn** to ignore video streams. 
- 
-</WRAP> 
- 
----- 
- 
-===== Threads ===== 
- 
-You can decode with one thread if you want to: 
- 
-<code bash> 
-ffmpeg -threads 1 -i input -f null - 
-</code> 
- 
-<WRAP info> 
-**NOTE:**  Not all decoders have threading capabilities and some have several. 
- 
-You can check decoder details such as <code bash>ffmpeg -h decoder=h264</code> 
- 
-</WRAP> 
- 
----- 
- 
-===== Choosing a decoder ===== 
- 
-There can be several decoders available for a format. 
- 
-You can name the decoder if you do not want to rely on the default: 
- 
-<code bash> 
-ffmpeg -c:v vp8 -i input -f null - 
-ffmpeg -c:v libvpx -i input -f null - 
-</code> 
- 
----- 
- 
-===== Example ===== 
- 
-<code bash> 
-ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i input.mp4 -c:v hevc_vaapi -q:v 28 -f null - -benchmark 
-</code> 
- 
-returns: 
- 
-<code bash> 
-... 
-bench: utime=0.156s stime=0.195s rtime=3.003s 
-bench: maxrss=358944kB 
-</code> 
- 
-<WRAP info> 
-**NOTE:**  **maxrss** indicates the maximum RAM used during the ffmpeg execution. 
- 
-  * **utime**: user time. 
-    * utime is the sum of processing time across all threads. Since they may operate in parallel, utime can exceed rtime. 
-  * **stime**: system time. 
-  * **rtime**: real time. 
- 
-</WRAP> 
  
ubuntu/video/ffmpeg/hardware_acceleration_using_gpu/amd_gpu/benchmark.1686650765.txt.gz · Last modified: 2023/06/13 10:06 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki