Quality code and lots of coffee

Tag: debian

Server Architecture

Building an application is only part of the process; a platform to run your code on is just as important to know about. Environmental differences can cause unexpected bugs in your code and having a knowledge of of server architectures can be a vital asset to your tech stack. Servers need to perform a range of tasks, including manage domains and user groups, permissions, and run your applications – ultimately to provide a service to you.  These services can include web services like IIS or Apache, Databases such as SQL Server or MySQL, email services like Exchange or Postfix/Dovecot.

As well as having an in depth knowledge of desktop operating systems Windows XP – Windows 10, and Linux environments such as Ubuntu, Fedora and OpenSuse I have an extensive knowledge in both Unix and Windows Server. Windows server as always provides the advantage of managing everything through a GUI, giving your server management a little bit of ease, and being able to run some development tools natively is always a bonus.

Running a Unix server by comparison is a lot more hands on, but provides much greater flexibility when it comes to server architecture (As well as having the bonus of being free), and with the new territory of .Net Core Unix is becoming a more viable option in businesses. I am familiar with most Debian and Redhat bases systems – in fact this website is running on a CentOS system running in the cloud.

It is one thing to know that these services are available to you, but understanding the alternatives on both platforms, as well as how to set up and use these platforms is a valuable skill.

Raspberry Pi – Media Player

I recently took the plunge and bought a Raspberry Pi to replace my tired and decrepit old Dell Server. The main purpose of which was to hook it up to an external hard drive, leave it plugged into my TV and watch some movies on it. Basically a torrent/video box with maybe some web hosting thrown into the mix.

So the pi works out the box with NOOBS and I went straight for Raspbian as I preferred the Debian based system. However when I started with the machine it became apparent that there is actually a problem with playing videos…

The Pi isn’t a powerful computer, and as such has problems playing videos outside of specific environments such as XBMC, and since I wanted to stay away from dual boots I thought I better make it work. I tried a few solutions like VLC and Gnome-MPlayer but the hardware platform made videos a bit difficult, there was only one application that worked, OMXPlayer.

OMX is a command line video player (which sounded redundant from the start) and when I ran the command to open a video it seemed to work audio and video perfectly, however using the command line for everything is not my style, I was quite happy to keep using OXM but I was more in the mood for a double click and play situation.

Luckily I found a forum post (X) that showed me just what I was after, you can create a symbolic shortcut to OXMplayer that you can launch from the menu, and you can add an argument into the command so that you can pass a file path with a double click of the file.

First of all you need to open up a terminal and enter the following command to create the shortcut.

sudo nano /usr/share/applications/oxmplayer.desktop

then paste in the following lines

[Desktop Entry]
Type=Application
Name=OMXPlayer
Categories=AudioVideo;Player;
Exec=lxterminal –command “omxplayer -o hdmi %f”
Terminal=false
Icon=/usr/share/icons/nuoveXT2/96x96/categories/applications-multimedia.png

Use CTRL+X to save the shortcut and when closed there should be a new item in your menu showing OMXplayer

OMX Player Shortcut

Double clicking this item will not do much as there is no file to actually play, however you can change the default player of video files to use this application using by right clicking a video and pointing to this shortcut.

OMX Default Player

You can now double click on a video and it will launch in OMXPlayer command line.

There is however further problems, specifically to do with resolutions, because unfortunately for some reason if the video doesn’t match your monitor resolution you will end up with bars on the sides of the screen

Philadelphia

as you can see in the picture the sides are still visible because unfortunately earlier episodes of Sunny in Philadelphia wasn’t shot in widescreen. The video is already running as large as we can, but we need to find some way to blacken the screen.

Checking the man options for OMXplayer I found that by adding the -b argument to OMXPlayer it will black the edges of the screen for you to make video time a bit better.

Some people have indicated that there are issues with the screen refreshing or not coming back on after a video which was discussed in this bug.

So to make the screen blackout during your video change the following

[Desktop Entry]
Type=Application
Name=OMXPlayer
Categories=AudioVideo;Player;
Exec=lxterminal –command “omxplayer -b -o hdmi %f
Terminal=false
Icon=/usr/share/icons/nuoveXT2/96x96/categories/applications-multimedia.png

and that should do it easy videos.

Since the OMXPlayer is in command line there is no GUI so here is a helpful list of how to actually control the player here

© 2025 Joe van de Bilt

Theme by Anders NorenUp ↑