shaka-project / shaka-streamer

A simple config-file based approach to preparing streaming media, based on FFmpeg and Shaka Packager.
https://shaka-project.github.io/shaka-streamer/
Apache License 2.0
198 stars 62 forks source link

How do I control output folders and file names? #133

Open aradalvand opened 1 year ago

aradalvand commented 1 year ago

The Overview > Features section in the docs says that Shaka Streamer lets you:

Control output folders and file names

But I couldn't find any relevant options in https://shaka-project.github.io/shaka-streamer/configuration_fields.html. With Shaka Packager, I used to use playlist_name, and segment_template with placeholders like $Number$ in its value. How do I achieve the same thing with Shaka Streamer?

mariocynicys commented 1 year ago

These are the options you can play with: https://github.com/shaka-project/shaka-streamer/blob/c6c5b924b617fea1e0c52268368a9ed236a50f4b/streamer/pipeline_configuration.py#L292-L299

But media file names are hard coded to a predefined template: https://github.com/shaka-project/shaka-streamer/blob/c6c5b924b617fea1e0c52268368a9ed236a50f4b/streamer/output_stream.py#L64-L89

aradalvand commented 1 year ago

Yes but none of those correspond to segment_template or playlist_name in Shaka Packager. Setting segment_folder just moves all the segments into a single folder; whereas segment_template in Shaka Packager would've allowed you to put the segments of each stream into its own directory. Likewise, hls_output corresponds to the --hls_master_playlist_output argument in Shaka Packager, which as the name implies determines the name of the master playlist. playlist_name in Shaka Packager on the other hand, specifies the name of the playlist file of an individual stream.

Update: I hadn't read the second part of your answer where you actually did mention this:

But media file names are hard coded to a predefined template:

Well, that's a bummer, I thought I was missing something. That's exactly what I needed :/ Any plans to add the ability to customize this in the future?

joeyparrish commented 11 months ago

It's not planned, but PRs are welcome. We could maybe move the filename templates into the configuration, with the current templates as default.