ubuntu:video:ffmpeg:hardware_acceleration_using_gpu:amd_gpu:benchmark
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ubuntu:video:ffmpeg:hardware_acceleration_using_gpu:amd_gpu:benchmark [2023/06/13 09:54] – [Timing decoding] peter | ubuntu: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 - | ||
- | </ | ||
- | |||
- | <WRAP info> | ||
- | **NOTE: | ||
- | -f null - | ||
- | </ | ||
- | |||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== Timing decoding ===== | ||
- | |||
- | Linux and macOS users can add the time command: | ||
- | |||
- | <code bash> | ||
- | time ffmpeg -i input -f null - | ||
- | </ | ||
- | |||
- | returns: | ||
- | |||
- | <code bash> | ||
- | [...] | ||
- | real 0m3.115s | ||
- | user 0m0.223s | ||
- | sys 0m0.244s | ||
- | </ | ||
- | |||
- | <WRAP info> | ||
- | **NOTE: | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== 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 - | ||
- | </ | ||
- | |||
- | returns: | ||
- | |||
- | <code bash> | ||
- | [...] | ||
- | bench: utime=7.314s | ||
- | bench: maxrss=72280kB | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== 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 - | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== Threads ===== | ||
- | |||
- | You can decode with one thread if you want to: | ||
- | |||
- | <code bash> | ||
- | ffmpeg -threads 1 -i input -f null - | ||
- | </ | ||
- | |||
- | <WRAP info> | ||
- | **NOTE: | ||
- | |||
- | You can check decoder details such as <code bash> | ||
- | |||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== 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 - | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== Example ===== | ||
- | |||
- | <code bash> | ||
- | ffmpeg -hwaccel vaapi -hwaccel_device / | ||
- | </ | ||
- | |||
- | returns: | ||
- | |||
- | <code bash> | ||
- | ... | ||
- | bench: utime=0.156s stime=0.195s rtime=3.003s | ||
- | bench: maxrss=358944kB | ||
- | </ | ||
- | |||
- | <WRAP info> | ||
- | **NOTE: | ||
- | |||
- | * **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. | ||
- | |||
- | </ | ||
ubuntu/video/ffmpeg/hardware_acceleration_using_gpu/amd_gpu/benchmark.1686650055.txt.gz · Last modified: 2023/06/13 09:54 by peter