News:

LATEST RELEASE:  FPP 8.5.1 - Download from here - https://github.com/FalconChristmas/fpp/releases/tag/8.5

+-+-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Site Stats

Members
Total Members: 16937
Latest: flints23
New This Month: 12
New This Week: 3
New Today: 1
Stats
Total Posts: 135628
Total Topics: 17022
Most Online Today: 114
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 1
Guests: 38
Total: 39

file format for FPP

Started by charleskerr, March 01, 2014, 06:04:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

charleskerr

With out having to dig through others code, is there a place that the file format for the FPP is documented, if one wanted to export to that format?
One is never too old to learn

David Pitts

Yes. When I get home I will place it in documents and place a link to it here.
PixelController, LLC
PixelController.com

smeighan

#2
and to go along with dave's document, here is the routine that writes a fpp *.fseq file from xlights

void xLightsFrame::WriteFalconPiFile(const wxString& filename)
{
    wxUint8 vMinor = 0;
    wxUint8 vMajor = 1;
    wxUint32 dataOffset = 28;
    wxUint16 fixedHeaderLength = 28;
    wxUint32 stepSize = SeqNumChannels + (SeqNumChannels%4);
    // Fixed 50 Milliseconds
    wxUint16 stepTime = 50;
    // Ignored by Pi Player
    wxUint16 numUniverses = 0;
    // Ignored by Pi Player
    wxUint16 universeSize = 0;
    // Gamma 0=encoded 1=linear
    wxUint8 gamma = 1;
    // Gamma 0=unknown 1=mono 2=RGB
    wxUint8 colorEncoding = 2;

    wxFile f;
    // Step Size must be multiple of 4
    //wxUint8 buf[stepSize];
    wxUint8* buf;
    buf = (wxUint8 *)calloc(sizeof(wxUint8),stepSize);

    size_t ch;
    if (!f.Create(filename,true))
    {
        ConversionError(_("Unable to create file: ")+filename);
        return;
    }

    // Header Information
    // Format Identifier
    buf[0] = 'F';
    buf[1] = 'S';
    buf[2] = 'E';
    buf[3] = 'Q';
    // Data offset
    buf[4] = (wxUint8)(dataOffset%256);
    buf[5] = (wxUint8)(dataOffset/256);
    // Data offset
    buf[6] = vMinor;
    buf[7] = vMajor;
    // Fixed header length
    buf[8] = (wxUint8)(fixedHeaderLength%256);
    buf[9] = (wxUint8)(fixedHeaderLength/256);
    // Step Size
    buf[10] = (wxUint8)(stepSize & 0xFF);
    buf[11] = (wxUint8)((stepSize >> 8) & 0xFF);
    buf[12] = (wxUint8)((stepSize >> 16) & 0xFF);
    buf[13] = (wxUint8)((stepSize >> 24) & 0xFF);
    // Number of Steps
    buf[14] = (wxUint8)(SeqNumPeriods & 0xFF);
    buf[15] = (wxUint8)((SeqNumPeriods >> 8) & 0xFF);
    buf[16] = (wxUint8)((SeqNumPeriods >> 16) & 0xFF);
    buf[17] = (wxUint8)((SeqNumPeriods >> 24) & 0xFF);
    // Step time in ms
    buf[18] = (wxUint8)(stepTime & 0xFF);
    buf[19] = (wxUint8)((stepTime >> 8) & 0xFF);
    // universe count
    buf[20] = (wxUint8)(numUniverses & 0xFF);
    buf[21] = (wxUint8)((numUniverses >> 8) & 0xFF);
    // universe Size
    buf[22] = (wxUint8)(universeSize & 0xFF);
    buf[23] = (wxUint8)((universeSize >> 8) & 0xFF);
    // universe Size
    buf[24] = gamma;
    // universe Size
    buf[25] = colorEncoding;
    buf[26] =0;
    buf[27] = 0;
    f.Write(buf,fixedHeaderLength);

    for (long period=0; period < SeqNumPeriods; period++)
    {
        //if (period % 500 == 499) TextCtrlConversionStatus->AppendText(wxString::Format("Writing time period %ld\n",period+1));
        wxYield();
        for(ch=0;ch<stepSize;ch++)
        {
          buf[ch] = ch < SeqNumChannels ? SeqData[(ch *SeqNumPeriods) + period] : 0;
        }
        f.Write(buf,stepSize);
    }
    f.Close();
}

Sean
Littleton, CO Latest releases http://nutcracker123.com/nutcracker/releases xLights/Nutcracker Forum http://nutcracker123.com/forum/index.php Facebook [url=https://www.facebook.com/groups

David Pitts

Here is the file.

[attachment deleted by admin]
PixelController, LLC
PixelController.com

MyKroFt

for future reference - please put pasted code into the CODE BBC - that way it does not get displayed differently - Seans code for me has smiles etc into it - so the forum software is not displaying it in its orig form.....

Myk

drlucas

Sean's code always makes me smile :p
Ryan

derekbackus

Quote from: David Pitts on March 02, 2014, 03:16:35 AM
Here is the file.

Been searching for this for a few minutes. Thank you!

charleskerr

Sorry to bring this thread back to life, but I have a few questions.

Just want to get some terminology understood. 

A "Step" is a buffer of data that is for one "50ms" (or whatever rate one has) worth of channels.

One has a "gamma" field with a 1 for "linear".  What does this field represent, and what are the other values.

One has a TYPE field, and it can be RGB or (1 for mono)????  If one has 2 (RGB) what does this indicate (in terms of the data stream)  What would a value of 1 (mono?) mean in terms of the data stream?

At offset 28 one has the step data starting. It says it is zero padded to be on 4 byte boundaries.  I assume this is not each "pixel" worth of information, but the entire step buffer must be on a 4 byte boundary (so I have 5 pixels (15 channels), my step buffer would be 16 bytes. Versus 20 bytes if it was each "pixel" had to be 4 byte boundary.).

Lastly, is the data assumed to be written in RGB order for the "channels" in the step buffer (so if I have one pixel, assume the format to alway be R=channel1, G=channel2, blue=channel 3). ?
One is never too old to learn

CaptainMurdoch

Correct on step size.

Gamma is not currently used so I will defer to David for the exact intention but I believe it was to allow FPP to adjust output if needed.

Type isn't used yet either.

The 4-byte padding is for the step size not for any pixel info.  FPP currently just deals with raw channels it does not know what features or colors those channels might be for.  There is no implicit or implied RGB channel ordering, it is whatever your hardware or lights require.

-
Chris

charleskerr

Ok, that helps a lot.  Curious why the step size must be a multiple of 4. 

The last thing I have having problems understanding is from the pdf:
Quote28 +(2* Channels)

That isn't actually correct is it, if I have to pad for multiples of four. Or is it just the all the step sizes combined that together must be on a multiple of 4 bytes?
One is never too old to learn

CaptainMurdoch

Don't have the code in front of me but I believe the step itself must be a multiple of four.  This was in case we wanted to optimize by prebufferjng or anything that might benefit from 4-byte alignment.
-
Chris

atoudam

Hi

Sorry to open and old topic, but I'm looking for the Protocal docs for FPP that were attached to this topic but now seam to have been removed. Are you able to post them again? Or point me to their new location?
Thanks
Adam

PlayGloria

Hi,

Adding here. I am interested in getting an understanding of the FSEQ format (latest 10/2019 iterations, including compression). I have browsed xlights github and think*** I am looking in the right places in fseq.cpp (though that code looks more pertinent to playback than file creation).

I love the FPP and really enjoy xlights; however, I am currently playing around with a pipe dream of shall we say a more modernized UI for sequence construction, and perhaps a cloud editing experience that would be a browser based show designer. In keeping with multi-platform, but making the development/release cycle faster. I really think web technology could make a lot of sense for this community.

Selfishly, my setup is standardized on FPP multi-sync, so I am most interested in creating this toolset to generate FSEQ files (as a starting point). I found deep on the forums a v1.1 FSEQ SPEC Doc ~2017 (http://falconchristmas.com/forum/index.php?topic=8041.0). Is this still accurate? It seems to only describe the header. With a little explanation, I'd happily build a visual doc to share with the forum on this file construction.

Thanks,

dkulp

The official "doc" is at:

https://github.com/FalconChristmas/fpp/blob/master/docs/FSEQ_Sequence_File_Format.txt

But for the most part, I strongly recommend just using the source from:

https://github.com/FalconChristmas/fpp/tree/master/src/fseq

That is the source that both xLights and FPP use for bother reading and writing fseq files.
Daniel Kulp - https://kulplights.com

PlayGloria

Thank You!

Really appreciate the reply. If I get my project a bit further off the ground, I will certainly post it back here for review by the masters.

I'm relatively new to this world, but completely hooked.

Cheers,

Patrick

Support FPP

+- Recent Topics

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod