Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Frequently asked questions

Ian Auty edited this page May 7, 2020 · 4 revisions

Confession: This is largely a place where I can dump info I've learned about MMAL and various niggles throughout my time with MMALSharp.

Videos won't play correctly through VLC

The videos produced by the MMAL Video Encoder component are in a raw format i.e. they are not within a H.264/MJPEG container. There is a fair bit of info surrounding this on the web, but in order to successfully open a video file produced by MMALSharp, you can do the following:

vlc --demux=mjpeg /path/to/your/video.mjpeg vlc --demux=h264 /path/to/your/video.h264

H.264 videos played through VLC show pixelated artifacts and appear to drop frames

As the Raspberry Pi camera produces a H.264 elementary stream and is stored in a containerless format, some media players have issues playing the video correctly. I've noticed VLC to be one of those players. In order to work around this, try converting the video to a container format such as MKV:

sudo apt-get install mkvtoolnix
mkvmerge test.h264 -o test.mkv

Where test.h264 is the name of your video file. I've seen good results with this.

Video renderer not working with OpenGL driver

You will experience issues when using the Video renderer if you have the OpenGL driver enabled. Firstly, it won't display anything to the HDMI output, and second you will likely cause your Pi to freeze. If you intend on using the Video renderer, please use the legacy (non-GL) desktop environment.

SD Card IO performance

It is well documented on the Internet regarding the IO performance of the Pi's SD Card reader. Typically when using MMALSharp this will not be an issue as the Pi can keep up with writing a to a single file, however if you begin to output multiple FileStreams (e.g. Splitter component) you will most likely need to use a faster storage medium or use the ramdisk. Guidance on how to create and mount a ramdisk can be found here.