Florian Wesch

info-beamer pi 0.9.0 released

Posted Jun 11 2015 by Florian Wesch

info-beamer 0.9.0 is the result of three months of development. It has some pretty awesome improvements.

Revamped video subsystem

The new release contains a complete rewrite of the video subsystem. This is a change that was waiting to happen for a while now. I'm quite happy how the rewrite turned out. You can now use info-beamer to precisely play videos: You can preload them and start them instantly. And you can loop them seamlessly.

Both of those features allow pretty nice visualizations that weren't doable previously:

Synced multiscreen videos

You can now use info-beamer to load multiple videos on multiple PIs and then start all those videos at the same time. Previously slightly different loading times made this kind of setup difficult and unreliable. Now it's easy to do.

There will be another blog post in the future that explains how to do this.

Seamless loops

info-beamer is now one of the very few tools on the Pi that can seamlessly loop videos. Just set the loop parameter in the resource.load_video to true and the video will restart at the first frame once the last frame is reached without any noticable gap.

Raw video output (for perfectly smooth FullHD)

The normal video support in info-beamer decodes videos into OpenGL textures. As a result you can do all kind of effects with the video: You can rotate them, apply shaders for realtime effects and other things. The downside is, that this requires quite a bit of memory bandwidth and GPU power: The video has to be decoded to a texture, then drawn to the GL context which is then rendered to the screen. This adds up and prevents FullHD videos from being perfectly smooth.

There is a new way to play back videos. You lose the ability to do any effects besides applying a transparency value and moving it over the screen. But it avoids all the downsides of the previous mode: Now the video is directly rendered to the screen. You can move videos above or below the layer that info-beamer uses. You can use that for example to have perfectly smooth FullHD background videos.

Since using this video playback mode is a bit complicated there is going to be a blog post covering this topic.

New way to load and preload your assets

Normally when you load videos or images you specify their filename. This is a problem if you have a sequence of files you must play but you cannot guarantee that none of the files gets deleted while the sequence is running. This might happen if you switch and update content all the time.

Now almost all functions that accept a filename also accept an openfile. It's a special object you can create with resource.open_file.

Learn more about this feature in the blog post about how unix sematics help info-beamer.

Smaller improvements

Drawing parts of images and textures

Images and videos can now draw sub-areas. So you don't have to draw the complete texture each time. While this was previouly possible using shaders it is now possible without them. Just specify the two x/y coordinates of the sub-area inside the texture. So for example:

image:draw(0, 0, WIDTH, HEIGHT, 1, 0.5, 0.5, 1, 1)

draws the bottom right quadrant of the given image. Have a look at this flap display that uses this feature.

Module loading from zip files

require will now also try to load modules from the file luabundle.zip. You can use this file to store required modules so they don't pollute the filesystem. Nested directories are supported inside the zip, so you can use standard module layout.

Example usage:

$ mkdir test
$ cat > test/init.lua
return {
    test = function() print "test module!" end
}
^D

$ zip -r luabundle.zip test
adding: test/ (stored 0%)
adding: test/init.lua (deflated 5%)
$ cat > node.lua
gl.setup(100, 100)
require("test").test()
^D

$ info-beamer .

Time functions

os.time and os.date are now accessible. See the Lua manual. It's not recommended to actually use them, since providing time from an external source by sending time information using UDP to info-beamer most likely makes your code more flexible.

New network defaults

info-beamer now doesn't allow connections outside the local machine by default. So you cannot connect to info-beamer from another machine now.

If need to connect from other machines just set the environment variable INFOBEAMER_ADDR=0.0.0.0.

Performance improvements

On the Pi the visible output consists of different layers. To prevent the console layer from being visible while info-beamer is running, info-beamer created a black layer in previous versions. Doing that adds more load to the hardware video scaler so now info-beamer just blanks the console by default. Doing that avoids an extra layer. This feature requires root permissions. If you want to restore the previous behavior just define the environment variable INFOBEAMER_BLANK_MODE=layer.

Running compiled byte code

info-beamer now supports precompiled Lua code. You can now use the built-in luajit compiler to make it easy to convert your plain text Lua code to precompiled Lua files. Use the -c command line argument to compile lua code.

$ cat > node.plain.lua
gl.setup(100, 100)
print "Hello"
^D

$ info-beamer -c node.plain.lua node.lua
$ info-beamer .

Compiled byte code is most likely compatible with future versions of info-beamer. But since that depends on how luajit behaves in the future it cannot be guaranteed. So keep your plain text code available :)

Update now!

Give the new version a try. I'd love to get feedback, so get in contact.


Read more...


info-beamer.com offers the most advanced digital signage platform for the Raspberry Pi. Fully hosted, programmable and easy to use. Learn more...


Get started for free!

Trying out the best digital signage solution for the Raspberry Pi is totally free: Use one device and 1GB of storage completely free of charge. No credit card required.


Follow @infobeamer on twitter to get notified of new blog posts and other related info-beamer news. It's very low traffic so just give it a try.

You can also subscribe to the RSS Feed RSS feed.


Share this post:

Share using Twitter


Questions or comments?
Get in contact!