segunda-feira, 21 de setembro de 2015

Solving the "COMXAudio::Decode timeout" error in omxplayer with Raspberry Pi

I have been receiving the error message "COMXAudio::Decode timeout" repeated several times when trying to play large files in omxplayer, often 1080p mkv or mp4 files.

Messages appear like this

 COMXAudio::Decode timeout  
 COMXAudio::Decode timeout  
 COMXAudio::Decode timeout  
 COMXAudio::Decode timeout  

The solution is to allocate more memory to the video processing unit. To do so, you should add the following line in your /boot/config.txt, and reboot your Raspberry Pi.

 gpu_mem=128  

When you apply this solution in a Raspberry Pi 2 model, with 1GB RAM memory, the unit will remain with 860 MB for linux use.

 :~# free -m  
        total    used    free   shared  buffers   cached  
 Mem:      860    757    103     24    250    189  
 -/+ buffers/cache:    316    543  
 Swap:      0     0     0  

See what other options can be configured at config.txt.