forkineye / ESPixelStick

Firmware for the ESPixelStick
http://forkineye.com/
528 stars 169 forks source link

Broken fseq file causes subsequent files to not play #694

Closed cybercop23 closed 6 months ago

cybercop23 commented 7 months ago

--------- Instructions -------- Please provide answers directly below each section. --------- Instructions ---------

ESPixelStick Firmware Version 4.0-ci6771207306

Hardware Version DigQuad w/ AE+ hat (8 outputs) ESP32 - esp32_quinled_quad_ae_plus_8

Binary release or compiled yourself? Released/github

Operating System (and version) Mac Ventura 13.6

Web Browser (and version) Chrome Version 119.0.6045.159 (Official Build) (arm64)

Access Point No

Describe the bug Uploaded sequence using FPP connect and I can see the FSEQ files in File Manager. If I reboot, it will play the current sequence using FPP Remote, but once it moves to the next sequence it gets stuck on 0/0 and shows a message that that it can't read the file.

image image

cybercop23 commented 7 months ago

and... using the master branch of FPP on a LePotato .... [v7.x-master-356-ge566548b (master branch)]

MartinMueller2003 commented 7 months ago

Please attaché the fseq file and post an image of the admin page.

cybercop23 commented 7 months ago

Hi Martin. Here's the Admin page. image

The FSEQ was generated by xLights and pushed to ESPx. Is there a way to download it from the GUI? I don't know that I can just read the card directly.

MartinMueller2003 commented 7 months ago

You can put the sd card into a USB SD Card reader and get the file using your PC drive explorer.

FYI: That image is 2 revs behind but none of the changes would impact this functionality.

MartinMueller2003 commented 7 months ago

No the GUI does not support downloading the file to your PC.

cybercop23 commented 7 months ago

I created a simple FSEQ with only models that are on that ESPixelStickV4. Manually uploaded it and is attached here. I added that to my playlist in the 2nd slot and kicked off the playlist. First SEQ played fine... as soon as it moved to the new/2nd seqeunce I got the error.

image TestESPV4.fseq.zip

cybercop23 commented 7 months ago

You can put the sd card into a USB SD Card reader and get the file using your PC drive explorer.

FYI: That image is 2 revs behind but none of the changes would impact this functionality.

Yeah. I looked the commits hoping there was something there but didn't see anything that would have affected this behaviour.

MartinMueller2003 commented 7 months ago

The file you sent me cannot be used on ESP V4. It is a compressed file and V4 only supports uncompressed files. V2.2 compressed (zstd) 162848 channels with 600 frames @ 50ms from xLights Macintosh 2023.21

MartinMueller2003 commented 7 months ago

There is a python script that dumps this information ...\ESPixelStick\tools\fseqinfo.py Pass in the fseq path and it will tell you about the file.

cybercop23 commented 7 months ago

Okay.. Made xLights save it as uncompressed... TestESPV4.fseq: V2.2 uncompressed 162848 channels with 600 frames @ 50ms from xLights Macintosh 2023.21

TestESPV4.fseq.zip

cybercop23 commented 7 months ago

Pulled the card and ran the script on all of them (+ they are attached). When I ran my script on them, I ran into an issue with spaces in the file name... Can that be the issue? It gets stuck on reading an fseq with space in the filename and then dies.... For my script I manually replaced the spaces with _

A_Christmas_Storm.fseq: V2.0 sparse uncompressed 3960 channels with 8777 frames @ 25ms from xLights Macintosh 2023.20

Animation7.fseq: V2.0 sparse uncompressed 3960 channels with 1200 frames @ 50ms from xLights Macintosh 2023.20

Christmas_Every_Day.fseq: V2.0 sparse uncompressed 3960 channels with 4587 frames @ 50ms from xLights Macintosh 2023.20

Just_Yellow.fseq: V2.0 sparse uncompressed 3960 channels with 600 frames @ 50ms from xLights Macintosh 2023.20

Reminder.fseq: V2.0 sparse uncompressed 3960 channels with 793 frames @ 50ms from xLights Macintosh 2023.21

TestESPV4_manual.fseq: V2.2 uncompressed 162848 channels with 600 frames @ 50ms from xLights Macintosh 2023.21

TheEnd.fseq: V2.0 sparse uncompressed 3960 channels with 600 frames @ 50ms from xLights Macintosh 2023.21

You_Make_It_Feel_Like_Christmas.fseq: V2.0 sparse uncompressed 3960 channels with 6270 frames @ 25ms from xLights Macintosh 2023.20 Archive.zip

MartinMueller2003 commented 7 months ago

Your script needs to add quotes areound the file name so that the command line treats the entire name as a single parameter. The spaces tell the OS that each word is a seperate parameter. The ESP has a similar problem. And there is a bug in the FPP code that blindly removes an apostrophe from the file name. That one drove me nuts for a week. That is why I want the exact file that the playback stops on so I can see if there is a filename issue.

Also it is unclear to me: Does it matter what the first played file is? Does it always stop on the 2nd file? Never the 3rd or 4th? If you manually tell the ESP to play the file that failed to play before, will it play?

MartinMueller2003 commented 7 months ago

And notice that the ESP files are all "sparse" files. The ESP can support a max of 9000 channels. Your test file can never play correctly on V4.

MartinMueller2003 commented 7 months ago

Missed your gets stuck on spaces. I have lots of filenames with spaces on ESP V4 running in my show with no issues. I am using FPP 5.1 and you are using FPP 7 so I have to switch over on a test rPI to try to reproduce your issue.

cybercop23 commented 7 months ago

Thank you very much Marin for your help. Yeah... with only 6 and 7 being supported and do a lot of zoom room support, i keep on the latest. Wondering if the fseq as they are work on your 5.1 setup. there's nothing in the fseq file that will make them not being backwards compatible. Thanks again for your assistance.

MartinMueller2003 commented 7 months ago

I had already verified last summer that there is nothing significantly different in the fseq header that would cause the ESP to have an issue. I did find that the latest version of the sync message did cause us a problem (since fixed) and that the ESP V4 is not sending all of the desired information in the status response messages. There does seem to be an oddity between multisync and broadcast sync messages and on my home system only the broadcast would work properly. FPP 5.1 did not have this issue so I am going to have to dig a little in the spring to see what is going on.

cybercop23 commented 7 months ago

Okay.... troubleshooting... I took another ESP32 and flashed it with the same version and loaded that same card and running it next to me.

First run through, it played first sequence, A Christmas Storm, and then got "stuck" on the 2nd sequnce - TestV4 - since it was compressed and displayed the error message that the file is compressed - fine. FPP moved onto the 3rd sequence, Animation7.fseq, and then I got the "Could not open file" message. Stopped the playlist and restarted it and the first sequence that originally played, A Christmans Storm, got the same "Could not open file" message.

Removed the Testv4 sequence from the playlist, restarted FPPD and rebooted the ESP32 and restarted the playlist. It played the first sequnce, A Christmans Storm, then played the 2nd sequence Animation7 and then got this error message ... "ParseFseqFile:: Could not start: Christmas Every Day.fseq File does not contain enough data to meet the Stated Channel Count * Number of Frames value. Expected 18164520, Got: 2232320"

I then played each one at a time with a reboot in the middle and 3 failed with that same message. Reuploaded them and one got fixed, but the other 2 didn't. I then uploaded the remaining 2, one at a time and now it seems like it is all working.

Wifi in the yard is pretty strong, 94%, so I'm thinking it is an xlights upload thing... maybe related to the possible slow throughput of the esp32.

MartinMueller2003 commented 7 months ago

Are you saying that after poking the ESP multiple times and redoing the downloads until they are all correct, that you can play all of the sequences from the FPP. And if you add in that test file, the ESP stops (as it should) but then fails to start on the next correct file?

cybercop23 commented 7 months ago

Ahhh.. did not think of that, but I just tested it that way. Been running for hours w/o any issues reading the files and no errors. I added the TestESPV4 compressed file in rotation and got the compressed message but after that.... I also get the Could not open file... although it has been running for hours... When I remove the bad Test file and restart ESP all is back to normal.

image

MartinMueller2003 commented 7 months ago

Latest dist file has been updated with a fix for this. We had a file handle leak triggered by not being able to read the fseq header.

cybercop23 commented 7 months ago

Thank you @MartinMueller2003. I'll flash the latest one and see how it works. Much appreciate the help.

MartinMueller2003 commented 7 months ago

Let's hope it addresses your issue. :)

cybercop23 commented 6 months ago

Okay... still testing it, but this seems to work so much better. I can even FPP Connect and send fseq files while the show is playing. There seems to be an issue with xLights not wanting to FPP Connect to other FPPs and ESPixel at the same time, but that's on the xLights side I think.