Question

I am going to be generating images once every minute or so from a low resolution camera. I would like to take runs of 10 to 20 images and compress them for transmission over a very bandwidth limited channel. I have looked at using x264 but it feels like over kill.

Given that my images are 320x240, with high level of redundancy between frames, what would be the best way to go?

The encoding does not have to be particularly fast, its more about finding a balance between difficulty in implementing on an embedded device, and the reduction in total file size.

I will have full control over the viewing software, so using a modified version of some compression scheme would be ok.

I will be using freeRTOS

Was it helpful?

Solution

Is there a port of libavcodec to that device? I think it has a h.264 encoder built in. I don't think that h.264 is overkill.

Define "bandwidth limited", though. If you have enough bandwidth to transmit at 1 bit per pixel (that would be 160 bytes per second at 1 frame/minute frequency), you don't need to go beyond jpeg. If you have even less than that, temporal compression (some kind of MPEG) is warranted.

OTHER TIPS

A simple and robust way to do this is to just encode each frame as a JPEG. This may be presented as an M-JPEG stream. Compression usually is decent, even if not optimal. If this is good enough for you, go for it.

Why is x264 overkill? It's a really efficient encoder and if you want to exploit spatio-temporal redundancy, you need to use compression algorithms like H.264 instead of a bunch of JPEGs.

In an embedded system, H.264 is an overkill because encoding requires computation and so is decoding. What is even more important (and hence overkill) to use ffmpeg is the fact that ffmpeg has some 150 odd codecs. So porting them becomes a problem too.

A simpler approach is to see if IJG's is portable in your system. (As such this is found to be most portable on various platforms.

In this case, you can apply simple frame difference between consecutive frames and make individual JPEG of them. If there is redundency, the subsequent JPEG's will be much lesser size.

Before exercising the porting, you should just check if the redundancy is indeed helping the reduction of bit rate.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top