With our own hands: installing AirVideo server in Linux

I don’t know about you, but my home network is heterogeneous, which I consider rather its advantage. This poses interesting questions for me. For example, I fell in love with the AirVideo program, which we use on iPads and less often on iPhones. The recent appearance in the family of media receivers Apple TV gave a new impetus to the use of the program – I can now redirect video to a TV that is not covered by the already existing cable network. The scheme seems a little strange: from the server, the video is sent to the iPhone, which, in turn, sends everything to the Apple TV and the TV connected to it. But all this is done conveniently and simply, so there is no difficulty, there is magic.

But the main server on my network is a small box running one of the latest versions of Ubuntu. This raised the question of how to use it for streaming purposes, since the official versions of AirVideo server are available only for Mac and Windows.

But it turned out that there is a completely working, but unsupported version for Linux. But in order to start it, you need to play a little bit. The number of steps is small, so I suggest not to be afraid: it is not difficult.

  • Download AirVideoServer for Linux. It assumes you have java on your linux box.
  • Put it in the directory from which the launch will be made. Let’s say /home/%username%/AirVideo
  • Download the source code of the modified (important) ffmpeg.
  • Unpack it into a suitable folder, I suggest – into a subfolder of your AirVideo Server, so you definitely won’t destroy the main version that many programs in Linux use, according to my logic – /home/username/AirVideo/ffmpeg… Linux purists may choose a more suitable location, but I hesitate to move anything in alpha to the main “repository” of programs.
  • Build binaries .:
  • Open the console
  • Download all necessary libraries (run the command sudo apt-get install for the following libraries: libmp3lame-dev, libfaad-dev, libx264-dev, mpeg4ip-server, git-core, pkg-config
  • Change to the directory with our ffmpeg. In the console it will look like this: cd /home/username/AirVideo/ffmpeg
  • Run the command ./configure —enable-pthreads —disable-shared —enable-static —enable-gpl —enable-libx264 —enable-libmp3lame —enable-libfaad —disable-decoder=aac to create the correct configuration and
  • Run the procedure with the command make
  • Create a settings file. I suggest putting it in the directory with AirVideo Server. It’s more logical to call it AirVideoServer.properties, but this is unimportant.

    Its content is simple:

    path.ffmpeg = /home/alex/AirVideo/ffmpeg/ffmpeg

    path.mp4creator = /usr/bin/mp4creator

    path.faac = /usr/bin/faac

    password =

    subtitles.encoding = windows-1251

    subtitles.font = Verdana

    folders = Movies:/media/Movies, Series:/media/Series

    Let’s figure out the lines.

    path.ffmpeg should point to the ffmpeg you built in the previous step. The next two lines show where the standard programs are located, for my version of Ubuntu the paths are correct, but may differ in your case. We do not set a password, but we set how to encode subtitles (if you need them). Then we set the subtitle font and in the last line – the list of folders with your video collections.

  • All that remains is to start your server and make sure it works.

    java -jar /home/alex/AirVideo/AirVideoServerLinux.jar /home/alex/AirVideo/AirVideoServer.properties

  • Due to the lack of Bonjour (which is also being treated, but this is no longer the topic), you will have to add the ip of your server manually.
See also  Productivity and Linux - the Jedi Way

Voila – the iPhone sees lists of files, moreover, it plays them. And the server “on the go” turns almost any video into a format understandable for iOS devices.

I leave it up to you to play with the video size and quality settings in the AirVideo program itself. Another point that I have not decided for myself is how best to organize the auto-start and auto-stop of the service when the system boots and shuts down. Therefore, I ask you to describe the best method in the comments to this post for everyone’s good.

If you have any questions, I will try to answer them as best I can.

2021-07-26

Leave a Reply