Media In The Box: A full feature embedded entertainment system

Media In The Box is a full feature entertainment system that can run on your PC or low-cost embedded systems such as a Raspberry Pi 4. Its middleware, OS, and application is built customly using Yocto Linux, GNU Ecosystem and Qt framework.

The graphical and material design is made by myself with InkScape and Qt engine. The proposed hardware consists of a capacitive touchscreen display and a Raspberry Pi 4. For home use, you are suggested to use your TV as a bigger display.

It is directly rendered on OpenGL without any desktop system. Input management, and display management are taken care of our custom middleware, where as the boot sequence is based solely on System V init. Weston/wayland desktop support is also implemented on OpenEmbedded-based environments for feature testing.

With the new version of Media In The Box, the contraption has RS232 serial debug interface mounted on which is used for debugging. Additionaly, with the addition of our "meta-mib-fastboot" Yocto layer, one is able to remove/add debug features and on-demand features in order to optimize the boot.

Our boot optimization goals include being able to use our modular Yocto structure, debugging tools, dependent init services but still able to achieve faster boot times. To do this, we have reduced the kernel size, disabled non required distro features, tuned the boot scripts, and disabled unused drivers. We integrated and customized kernel and user space splash screens. We have also changed boot order of statically linked kernel modules to reduce more time. Additionaly, we have enabled Raspberry Pi 4 Hardware Random Number Generator (along with haveged to feed /dev/urandom) in order to be able to get fluid performance out of Qt (due to its QHash dependencies). We are now confident that the application and media works fluidly. With these in mind, we were able to achieve ~12 seconds for a full optimized boot. Considering that (1)- we still use devicetree, (2)- RPi4's bootloader is closed source and (3)- we have features such as sound, bluetooth, media, wifi connectivity, web browsing, HD display, this boot time is well enough for the features it comes with. We achieve ~14 seconds for the debug mode, which allows you to use UART debugging, draw boot graphs and use printk's. Further investigations will be directed toward Qt App optimization.

We present the following main features:

  • Play media files from internal or external storage. Matroska Video and Quick Time codecs are included and tuned in the OS stack. Formats include wav, mp3, mp4, mkv, mov.
  • Stream Bluetooth-based media using A2DP and AVRCP protocols. Protocol abstraction layers are created and integrated into the OS stack.
  • Listen to your favourite music from internet using internet radio. Wide variety of genres are available.
  • Browse and view PDF files. PDF viewing capability is based on libpoppler and Qt.
  • Browse the world wide web. Sophisticated web engine that is based on Qt Web Engine and Chromium infrastructure that includes downloads page, custom user script injections and navigational tools.
  • Watch your favourite movies on YouTube. YouTube application is provided with optimized settings.
  • Check out where and how to go on Maps. The maps application provides ability to retrieve information from Google Maps, Yandex Maps, HERE WeGO, or Open Street Maps based on the selection from Settings menu.
  • Customize your media-in-the-box. Settings menu provides various options: set the display resolution, change the volume level, tweak with clock and date format, change your time zone, select a city for weather retrieval, change unit for the weather, change browser home page, allow browser cookies, change maps service, allow credentials saved, and change between beautiful themes of "Night Blue" and "Calming Ivory".
  • Read news feeds using RSS sources. Yahoo and Anadolu Agency currently included.
  • Connect to Android Auto with your phone via USB or Wi-Fi (by using libusb and gstreamer libraries)
  • Cast audio, image, and video files from Media in the box to your Google Chromecast devices (such as Amazon Firestick and Xiaomi Mi TV Stick) (uses libavahi-client-dev)

Features and building blocks that constitute the hardware platform of the Media In The Box are illustrated as follows:

Media in the Box also has following additional side features recently implemented:

  • Can be controlled remotely via Home In The Box Android application.
  • Connect to WiFi networks directly from the application. Custom wireless library created based on connman and dbus libraries.
  • Display NTP-based real-time clock.
  • Check out the weather on your city.
  • Plug a gamepad, keyboard, or mouse to your device and control your application directly.
  • Touchscreen controls that are empowered using tslib.

Implementations regarding Android Auto integration can be seen in the following images. libusb and QML were used for seamless Android Auto playback.

Implementation regarding Google Chromecast integration:

You can watch the following video for all-hands demo. Keep in mind that the following demo is of the old version and it does not include our boot optimization improvements, performance improvements as well as News Feed feature.

DISCLAIMER: This project is not in commercial use or sales currently. All product and company names are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.

See More

In order to see more about my work, go back to Work page.