I am just getting back to the project, after taking a couple of weeks to write up a new shared resource, rewrite an old app, and prepare all of my apps for the next version of the Apple operating systems (LGV, RVS). Now, I’m back to the grind.
Before we start, here’s the tag for the work so far (Week 1.5).
ffmpeg is a deep rabbithole. I can tell that I’ll need to spend a lot of time learning up on it.
Because of this, I’ve decided to “retool” the RVS_MediaServer into a “breadboard,” which is an old EE term for an experimental prototyping device; usually easily reconfigurable, and not especially pretty or robust.
So I’ve added a couple of items to the persistent preferences (one of the reasons that I took the time to refactor the preferences into a standalone project, was because I had an inkling I’d need to have a robust supporting infrastructure for this kind of thing).
I am extremely happy with the job that did on RVS_PersistentPrefs. It was a matter of two minutes to completely retool the prefs to include the new parameters. The nice thing about the persistent prefs, is the project is astonishingly high-quality, so I don’t have worries about bugs in the infrastructure.
PROTIP: When you write infrastructure components, ALWAYS go way beyond what you think is sufficient for testing. You won’t be sorry. RVS_PersistentPrefs
has an INSANE amount of test code, for a tiny little 250-line source code file.
The Preferences Screen now has three more items: a segmented switch that selects between a “simple HLS server” (what we already have), a “Direct Command-Line Entry,” where we can actually manually add ffmpeg arguments in a text box, and a checkbox to disable the HTTP server. I’ll probably also need to add a couple more items to control input and output files/streams. Right now, it has the simple RTSP input, and HTTP output.
Once I have that all set up, I’ll be experimenting with various combinations of ffmpeg arguments. Once I have established what I want, I’ll probably hide the “geeky” stuff behind some kind of “developer mode,” and “bake in” what I land upon as the best approach.
As of the writing of this entry, I have changed the user interface of the Preferences screen to allow election of a “Direct Text Entry” into the ffmpeg command line.
The way that it works, is that each line is an argument, with the key being the first part, and the value being the second.
I have made it so that I can disable the HTTP server, if I want to do a direct UDP stream, or something.
Tomorrow, I will add a console window to display the ffmpeg standard output and error.