Re: The file format at the end of the universe
Should the FPP player support different size universes of data. If so would it be all right that the player make it mandatory that each universe be the same size. If supporting different size universes were needed i was thinking this would be specified in the configuration webpage. I am not against placing the universe size in the header of the file and for those that do not want to use this information it can be set to zero. Is anyone actually setting up different size universes on a universe by universe basis in any of the sequencers? What are the advantages.
Is there an implicit assumption that all of the output channels have the same data rate?
Yes. That rate was going to be located in the file. But the Xlights converter module I am going to create will hard code this value in file to 20Hz and create data at this rate also. This started out as a Pi player format but I am not against giving it ability to be flexible for other devices if it is just a few bytes in header. I can just create headers and data that match my usage for the Pi player.
WWxD - What would xLights do?
dpitts, I certainly don't want to hijack your thread.
Your discussion of a file format for your player comes in the context of earlier discussions of a good format for storing sequence data on flash storage for retrieval and display by microcontrollers. The design niche is very similar in many ways to what you are trying to resolve, and the existing formats unsuitable for many of the same reasons. I was struck by the similarity.
So it would be great to kill two birds with one stone, as my grandpa said. Then xLights, Vixen 2, Vixen 3, HLS, Vixen Plus, etc could all generate the same new file format, whether it was for an Arduino controlling pixels directly or a RPi sending e1.31. So far, I still think that's possible without much extra complication.
The only tricky part so far is the question of broadening the file format beyond being a transcription of e1.31 while maintaining the functionality that the "transcribed e1.31 only" format would have. If describing universes is optional (need not be generated, or heeded, unless meaningful) then it's probably feasible to serve these related purposes well, without needing two formats.
And if all that requires is two optional fields in the header, for number of universes and a common channel count for all universes, that's easy! So I'm waiting to hear responses to your question about whether that's sufficient. I'm guessing that implies that the the first N channels would be in universe 1, the next N in universe 2, and so on sequentially. (I was proposing an approach which would allow each universe to have its own length and its own universe number which need not be sequential starting at 1; perhaps nobody needs that).
Let's look at xLights when it's doing file conversions. Is there enough information in each of the source file formats it accepts to discern universes, if converting from them into the new binary format? Does xLights take universes into account now, when doing conversion between file formats? Or would binary sequence files with universe descriptions need to be exported directly by the sequencers, using extra metadata which isn't in the input formats xLights supports?
If you prefer, we could create a new thread about a new common binary file format for players, and keep this thread specialized in describing just the FPP implementation.
Phil, would you want to be able to describe different rates for different (groups of) channels?
Based on that suggestion, which I hadn't considered, I thought "we could let the speed be configured by universe, or by channel block". But then how would we interleave the data for channels being played at different rates?
If so, my thought would be that if you really want channels to be played back at different rates, make a file for each rate and put the relevant channels into it, then write a player which can play multiple files at once. That could be tricky (the time to send out one set of channels might be just as you were trying to load another set), but the RPi might be able to handle it (big programs, big ram, fast processor - compared to uCs anyway). Using separate files probably makes it easier, if one does take that on.
I'm not thinking it would need to go into the file format. A single speed for the file seems appropriate.
(This is similar to the idea of putting the music in another file to be played simultaneously, rather than try to interleave music sample data with pixel data at different rates).
