Monitor video and audio transcoding with the new Media Queue page

Monitor video and audio transcoding with the new Media Queue page

By | 2016-12-01T16:37:37+00:00 June 7th, 2016|Announcements|0 Comments

When the FFmpeg.exe utility from the Gallery Server Binary Pack is installed, Gallery Server is able to create web-optimized media files from your video and audio assets. This provides several benefits:

  • Videos that normally cannot be played in a browser such as AVI, WMV and others are converted to H.264 MP4 videos, which can be played in all major browsers, including those on mobile devices, with no plugin requirements.
  • Sizes are dramatically reduced, which improve playback times on cellular networks, reduce bandwidth costs, and are generally easier to deal with than the originals. For example, a 10-second video clip from a Samsung S6 phone clocks in around 16 MB. When added to a gallery, the web-optimized version is 2-3 MB, roughly an 85% reduction.

Creating the web-optimized version takes some time, so Gallery Server starts a background thread when you add a video or audio file. You can monitor this process with the new Media Queue page in Gallery Server 4.0:

The new Media Queue page in Gallery Server 4.0

 

This screenshot shows a web-optimized video named zOpt_Bike ride.mp4 being generated from Bike ride.mp4. It also shows two additional videos that will be processed next.

The best part is that it is updated in real time, with no need to refresh the page to check the current status. It does this by using the WebSocket protocol to create a live, full-duplex communication channel between the server and all connected browsers. For example, here are two browsers, side by side, open to the same gallery. In one browser we upload three videos. The other shows the Media Queue page and updates automatically when the transcoding begins.

 

There are buttons for cancelling the current item or pending items, viewing the FFmpeg output of completed items, and removing completed items from the list.

The WebSocket protocol is pretty recent, included only in Windows Server 2012 and later. Note that it is disabled by default, so use the Server Manager to enable it. In 2012 you will find it on the Server Roles tab in the Add Roles and Features Wizard:

Enabling WebSockets on Windows Server 2012

In Windows Server 2012 R2, it’s in a slightly different place, on the Role Services tab:

Enabling WebSockets on Windows Server 2012 R2

If you can’t use WebSockets because your web hosting company has it turned off or you are using an older version of Windows Server (e.g. 2008, 2008 R2), you’re not out of luck. Gallery Server, which uses SignalR under the hood, will fall back to more primitive techniques such as forever frame and long polling. It’s not quite as efficient and the page may not respond as quickly, but the Media Queue page should generally work just fine.

This is a big improvement over what we had in 3.X, where the status was shown as a static area at the bottom of the Video & Audio page in the site admin area.

About the Author:

Founder and Lead Developer of Gallery Server

Leave A Comment