Closed irsl closed 1 year ago
There's a lot of special casing, what if you instead created a pattern that identified dynamic streams (like a special extension, and a check that they are executable) and then execute them? They could take a parameter to flag what kind of output to produce, such as producing metadata to output in a content listing, or the actual content. Then you might have a directory with regular items and the special items side by side:
somevideo.mkv
livestream.sh.dms-dynamic-stream
Executing them with special flag to produce metadata could be expensive at directory browsing.
Instead, but driven by your idea, what if DMS supported special metadata files with dms.json suffix (e.g. anything.dms.json), and it contained the title, DLNA profile, mimetype and the command to be executed?
That seems fair!
Thanks. I'll open a new PR when I'm ready.
This change allows serving streams generated on the fly, e.g. exporting the live stream of an rtsp camera over DLNA.
Consider the following script (
/mkv-hd.mkv
) in the DMS path (/dms-data-dir
):Would make the camera stream available over DLNA when dms is started with the
-allowDynamicStreams
command line option:Tested on an LG WebOS 2021 TV.