ioctl mem-alloc FAILED

If while trying to play a video on the RaspberryPi, in particular with Kodi, the video doesn’t play and you get this error on the terminal:

[CGPUMEM]: ioctl mem-alloc FAILED [-1]

Then hopefully this post will help you.

You may have read elsewhere that you should increase your GPU memory in /boot/config.txt, then add gpu_mem=256.

But that’s not enough. You also need to increase the limit of the contiguous memory allocator. In /boot/cmdline.txt add the option cma=256M. Then reboot and you should be fine.

Archos plugins fee

I wanted to watch a movie on my Archos tablet just to find out that actually I can’t !
Archos charges me with additional fees to watch movies with Dolby AC-3 or MPEG-2 codec. But I’m glad we have free alternatives, I mean Flac, Vorbis and Google’s VP8. And now I’ve a reason to reencode all of these using free codecs. Yeah !

So I made a little script to ease encoding with ffmpeg and another program to manage concurrent queues to leverage the dual core cpu. I use a combination of the above codecs which I put in a Matroska container. Actually VP8 is doing quite well with high quality VOB (far better than Theora which came from VP3 anyway) but it still shows some encoding artifacts here and there. Though it may take up to 2 days to encode and I’m still struggling to integrate multiples soundtrack in the resulting Matroska with ffmpeg.