Audio Peak Signal to Noise Ratio (PSNR) Analysis
Peak Signal to Noise Ratio is a comparison between the maximum intensity of the signal over time compared to the noise floor. This can be a useful metric to approximate quality of compression by comparing the source “signal” to the encoded target and reporting how much compression “noise” affected the signal in the output.
Read more technical detail: https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio
Example PSNR Analyze Task
{
"uid": "analyze_task",
"kind": "analyze",
"payload": {
"compare_asset": {
"kind": "asset_url",
"payload": {
"storage_provider": "s3",
"url": "s3://path/to/source/tears_of_steel_1080p_letterboxed.mp4"
}
},
"general_properties": {
"enabled": true
},
"deep_properties": {
"audio": [
{
"track_selector": {
"index": 0
},
"psnr": {
"enabled": true
}
}
]
}
}
}
Results
The results of the analysis are reported as shown in the two examples below, with higher values representing a better score.
For this example, we transcoded the original source to a higher bitrate (128 kbps) and a lower bitrate (64 kbps) and compared them both to the source using PSNR.
64kbps aac audio results
psnr::nr_samples 35240960
psnr::total_db 64.31
channels0::psnr::channel 0
channels0::psnr::compared 35240960
channels0::psnr::channel_db 64.35
channels1::psnr::channel 1
channels1::psnr::compared 35240960
channels1::psnr::channel_db 64.26
128kbps aac audio results
psnr::nr_samples 35240960
psnr::total_db 80.85
channels0::psnr::channel 0
channels0::psnr::compared 35240960
channels0::psnr::channel_db 80.85
channels1::psnr::channel 1
channels1::psnr::compared 35240960
channels1::psnr::channel_db 80.85
The higher values for channel_db
show that the encoded asset made at 128 kbps is a better representation of the original audio source.
Job Flow
A common pattern for PSNR analysis if you want to verify the quality of the output from a transcode
task is to add an analyze task to follow in the same job. You can then either programmatically or manually review the analysis results. An example can be found below
Job Examples
- Simple analyze audio psnr example job
- Transcode & analyze audio psnr example job