|
|

This web frontend is part of a larger project to homebrew a TV station playout system using only common open source software.
At the current stage of the project, I have a headless server streaming out video and audio that it captures from MPV (video player) and Audacious (audio player).
The server has premade playlists loaded onto a shared drive. For now these playlists are made manually, the long term goal is to have them autogenerated from a SQL database.
Switching stream output between MPV and Audacious is done by another web interface I did not develop, so isn't shown here.
Under the hood

Client server communication is by websockets, one per media player. Asyncronous python scripts listen to the commands passed through those websockets and then match them to the player's control mechanism.
Despite the controls being exactly the same, the implementation is completely different. MPV is controlled and monitored by sending JSON back and forth through a socket, while audacious uses a GNOME ailment called D-BUS. Luckily the utility audtool accepts plain english flags and outputs directly to the console. The knock on effect is that there's a slightly different split between client and server when it comes to processing the feedback, since stripping file paths in JSON format is much easier to do in JS than it is in Python.
The CSS is clever enough to adapt the page layout based on width. On mobile, the two control panels stack vertically.
Future
I want to replace the text boxes for playlist selection with dropdown lists. I also want to add controls for other parts of the streaming backend, and an SQL database program that can generate playlists automatically. Further updates to follow.
I'd like to thank recent ko-fi contributors for keeping me solvent through a difficult period, and particularly Dex The Dragon, who's long term patronage can't go unacknowledged. What I've shown here is trivial, but it's only part of a much larger project yet to be publicly revealed. The groundwork for that has cost me somewhere in the region of £300 over the past couple of years. (ouch!)