-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best way to use GIFs with HUB75 screens. #172
Comments
Hi, nice project 😃 the main problem with all options is available RAM. The HUB75 driver is very hungry for RAM, however storing a 64x64 bitmap in a preset creates a huge JSON file that cannot be parsed / read on classic esp32 due to size. Are you using esp32, or esp32-S3? On an esp32-S3 with PSRAM you might be lucky, and it could work. As alternative solution, try to make your "face" segment smaller than the panel - like 32x32 or maybe 24x24. For a smaller segment, it should be possible to show a pixel graphic. Or - in case you don't mind a "blocky" look - you can set the segment to "grouping: 2" (plus "spacing: 1" for real blocks) and keep it at full 64x64 size. |
@1liminal1 @dosipod I've played with images a bit. Now it works the same way as in upstream. Using PixelArtConverter, i was able to upload images to my HUB75 test setup (esp32-S3 with PSRAM, 128x64 HUB75 panel). Copy & Paste for creating a 64x64 preset first did not work, but I managed with a bit of manual "post-processing". Basicially you need to join all the sections manually; i.e. join the array segments into one array --> use one If you want to test something, copy everything from the attached file into a new preset in WLEDMM: For the future, we could look into adopting the "GIF" branch from Aircoookie. Edit: PNG seems promising, too. However decoding a PNG requires lots of RAM (>50KB). We could check if NetPBM formats (.ppm, .pnm) work better. |
@softhack007 Excellent and I will surely test that . |
Thanks so much for that :) I thought that might be the case and tried joining the parts last week, but I guess I need that update? Is that now in the nightly for MM? (LOL, Im prob getting the lingo wrong, I come from a systems background) Let me know and I'll update. Im guessing I need to wait till its the 29th? I'm not really sure how these things work; https://wled-install.github.io/ Ill test the DK json when I get home and let you know if that works. If I can get three frames of BMOs face in a playlist ill be happy :) The plan is that a mmwave will turn him on when I walk in the room, it's his face for 3s and then goes to soap or something :) I think it will be cool. Ill be posting the remix for the STLs at some point, if you love BMO and want to make him, I'll post the link at some point :) |
Ok, so you're saying if I use the https://github.com/hughc/wled-pixelart-client this as a usermod and compile my own binary, it will work? Sorry to be a pain, I have compiled stuff before, but just to be clear, so I download the MM code base(?) and then following these instructions https://mm.kno.wled.ge/advanced/compiling-wled/ Set up VSCode and PlatformIO ect and then following the instructions on wled-pixelart-client to get the usermod to add in the usermod. And this will have hub75. Or I need to add that as well? |
Oh, and last comment lol. Im using a Trinity ESP32 |
For the usermod ,you would have to add it to MM first , i have added it to AC here https://github.com/dosipod/WLED_15/tree/ALDIY_15/usermods/pixelart_client and then try it with MM HUB75 bin which i never did . I am not really sure of how stable HUB75 on a esp32 as I faced issue with that a while back so I got HD-WF2 and it works fine ( this is a cheap s3 board ) Cheers |
Awesome :) thanks for that. Im happy to help testing as well. I have a few more HUB75 64x64 and Trintys coming. I want to see if I can string 3 64x64s together and make one of my Prisms out of it. WHen you see some of the things Troy is doing with HUB75 on the S3 with 128x128... Its just amazing! |
That is good you are aware of what is going on , since you are aware of what Troy is doing ,might be you are on discord already and I think that would be the place to help for testing but not really sure about using more "Trintys" as it seems to be too much for esp32 vs s3 board I listed if the performance okay for you then why not |
HAHA, we have spoken a couple of times on Discord :) You and Wildcats helped me with Pixel Mapping for my prisms. I actually posted in support and the standard WLED discord about this But its easy for things to get lost on Discord, people are busy with their own projects ect ect. SO thanks for taking the time to give me some advice, I appreciate it :) This is the Trinity, its working well actually with any of the default effects. Not sure how it will scale, but will see. |
Hi @1liminal1, the trinity is based on "classic" esp32, right? For more than 64x64 pixels HUB75, you should use esp32-S3 - preferably with octal PSRAM. See https://mm.kno.wled.ge/2D/HUB75/#panel-size-and-chain-length |
I have only tested MM briefly on a normal esp32 I was using with https://github.com/mrcodetastic/ESP32-HUB75-MatrixPanel-DMA and in that I faced few issues but might be that is fixed or something about trinity that is different . It is still the case that the guys recommend s3 hence I got HD-WF2 but I also only plan to use single 64x64 per esp so might be esp32 is okay . And I thought the avatar looked familiar :) |
I normally do not like to send others on a wild guess chase so I was trying to test each option and the first one is the usermod which I have now added to MM but the size was an issue so i had to kill animatrix for it to fit on the HD-WF2 s3 board
After that some of the pics worked okayish ( some crashes are there ) but gifs never worked at all on HD-WF2 , i have a node.js local server somewhere which i could try also but things do not look so promising . The full video of the test is too large to fit here so I had to reduce the size |
@1liminal1 @dosipod the "unexpected restart" messages might be a crash when free RAM on your device went too low. You could tinker with the HUB75 bit depth limits in the code to gain some free RAM: Lines 555 to 558 in 85035e5
for example, replace with lower values from the -S2 section which gives you 4bit (instead of 8) on 64x64 #define MAX_PIXELS_8BIT ( 48 * 48)
#define MAX_PIXELS_6BIT ( 64 * 48)
#define MAX_PIXELS_4BIT ( 96 * 64) |
@dosipod another way of saving a bit on RAM is by adding this to your
or even try lower values for JSON_BUFFER_SIZE (minimum size is ~12000). This might work for the "usermod" option, but it won't work with other options that send images via JSON API. Edit: another workaround if RAM is very low:
This removes "live preview", but it also reduces RAM fragmentation (ws is very wild on malloc/free) and could make your firmware more stable. |
@softhack007 I will try all you listed as I have setup node.js locally now but seeing a bit of odd behavior when testing on latest AC which may have to do with the gif sizes ( the same gifs worked fine on AC gif branch ) and once i sort that out I will for sure test a lot on MM , I am still hoping that might be with the change of license that we could focus on the end goal ( either gif branch on MM or HUB75 on ac ) as this is just a temporary option but will try our best . |
@softhack007 Thank you , I updated bus_manager.cpp and also set the build flag as you listed And HD-WF2 is really much more stable now and the pics playlist works fine exactly the same as on AC esp32 with 16x16 matrix , so that is for sure a good progress . |
Hey guys, Just going though the posts now. I have ordered some HD-WF2, wish I had of known about those before I ordered the Trinitys, far far cheaper :( lol, Anyway.
So, just to be clear, I copy the json and put it into a preset yes?
I missed that before :( lol, wish I had of seen that before ordering more Trinities LOL So I guess the Trinities are a dead end lol OK, so I just tried merging my own file and it only reads the first few lines. I guess that's why pixel art splits them in the first place. So I tried making a playlist out of that and it does work; Bmo_WLED.mp4But the issue is I added soap to the end and when It tries to play that it just goes turns off (I see the power button on the webUI go off). Also I cant set the playlist lengthy for anything less then 1 sec, so its super janky anyway lol EDIT! SO I managed to get soap to play at the end, it was just presets being presets lol BUT, Is there anyway to speed up the preset playing so that the playlist will play everything at once? "playlist":{"ps":[1,2,3],"dur":[01,01,30] I tried changing it to 01,01,30 but I cant seem to edit it directly :( Ahh!!! min duration is 0.2 Nice :).. |
@softhack007 @1liminal1 A stable workaround found , I used the gif branch ( only changed MAX_LEDS_PER_BUS 4096 in const.h so I could use DDP with 64x64 running on MM ) Might be we could see value in adding gifs to MM else this will have to do for now |
Hey, so I updated to use firmware-ALDIY_esp32dev_audioreactive_gif.bin But there is no hub75, you mentioned DDP but that needs as IP ect. What am I doing wrong here. And how do I get the gifs on there. Is it this? |
@1liminal1 |
Ahh ok, so I need to run two, I just updated my hub75 ESP HAHA. Ok cool, no worries. I have plenty of ESPs around lol Ill let you know how I go :) Thanks mate! I appreciate it |
This is just a workaround as we can not wait for gif to be added to MM or for hub75 to be added to AC so we could use one esp . |
So been testing it for a bit and its pretty much unusable on a ESP32. Pages are not loading, Got the gif, uploaded And then is just stopped responding. Power cycle, makes no difference Have you run this on a ESP32 or just the S3. I have an ESP32-S3-WROOM-1 N8R2 N16R8 44Pin Type-C 8M PSRAM If you have a bin I can try? |
For the gif branch DDP master I am using classic esp32 and for the Hub75 I am using HD-WF2 All the MM bins last CI run is here , |
You can use |
So my trinity responds ok, and if I go to the web server, I actually get the streaming dialogue for DDP. But nothing happens. Is there a limit of gif size? (I'm at work and cant remember lol, it was either 15kb or 30kb.) So just to be clear, EPS32 Trinity for the Hub75 (with some HD-WF2 on the way) And a ESP32dev board for the gif branch. Which is pretty much not responding, Ill see if I can get to the setting page with the ram usage and let post it here. Also it was a fresh install of AC (thats the base version right?) from the webtools and then I updated to your Bin Frank :)
Same, I could do the harness, but... so much time lol |
This is the gif files I tested with. So I think the easy way is for you to test with the gif branch bin and ddp to any other smaller unit first and then test on the hub75 after . I am using HD-WF2 with MM for the hub as I did face memory issue when I tested using classic esp32 but I thought since that was a while back it might have been better by now . |
I´m trying to connect the hub75 port to an esp32s3 does anyone know how to connect the pins? Because in the official wiki and the pinout for the esp32 there are pins that the wroom esp32s3 does not have :D. So if somone could give me a hint that would be amazing. |
@8bignic8 Good question , there is an example of s3 wiring here |
Hi, Which build do you use?
|
Im currently using: WLEDMM_0.14.1-b32.41.dev_esp32S3_16MB_PSRAM_M_HUB75-> i dont have the pinout for it yet so i dont kow if it will work. Im using a wroom 32S3-1 16MB, the adafruit one was unstable and could not allocate enough ram for my 64x128px matrix. What worked to flash the software was to first flash the tasmota-4mb version than use the ota flasher after connecting to the tasmota ui of the esp32S3, and afterwards selecting and uploading the choosen wledxxxxxx.bin file :) |
Well, this works exactly once.
If the normal "esp32S3_16MB_PSRAM_M" firmware works for you, it means you don't have WROOM-2. The reason we added the WROOM-2 buildenv is that these boards need their own special firmware, and they won't boot with anything else.
This one uses the "Moonhub" pinout. See the first bullet in my previous answer |
@softhack007 Read yes but understand not all the time :) , I will try to make a picture of the wiring if I get s3 that I could wire and test with HUB75 but I remember a long time ago that on esp32 with DMA project that you could use any pins as long as it matches what you assigned in the sketch so the example you listed from bus_manger.cpp is fine |
Yeah, ill second that. A lot of times I have no context for what you guys are saying, so I read it. But I make a wrong assumption about what it means HAHA. We are all learning though :) I know you guys have helped me a lot :) |
Hey sorry my bad RTFM and thank you it is amazing! Today I will try:
The Setup with the adafruit_matrixportal_esp32s3 and 64x64 matrix and length 2 resulted in a frozen esp32/ui because of a memory problem. only one 64px mirrored image was possible. |
Yeah it depends on the effect you want to run - WLED wasn't designed as a screensaver engine, so bigger displays won't work well with some effects. It is as it is. 128x64 means you have 8196 pixels, while upstream (Aircoookie WLED) still recommend to not go beyond 2000-3000 pixels. Especially animArtix effects tend to become slow, and some won't work above 48x48 due to memory needed by the effect. Edit:You can use "Grouping: 2" (segment) to reduce resolution by 50%, but still be able to fill the panel with an effect. |
The adafruit matrixportal firmware is exactly for that board and nothing else. |
My HD-WF2 with 64x64 is slow specially when streaming , so yeah I will be using grouping , more buffer and websocket disabled . I also tried from Jinx with art-net and sACN and could only stream to half of it so might be it is only local effects for now on that HD-WF2 board . Not sure there is an affordable s3 Ethernet board might be a bit better but Troy warned about wifi so it was expected but I thought it would not be much of an issue on 64x64 but apparently it is |
Could be true, as this "path" for setting pixels did not receive much attention and optimization yet. The bottleneck could be network receiving, to small buffers, or very inefficient handling inside |
from my side total love to everyone that works on a wled distro and/or feature its amazing work you all doing tanks:)! |
im searching for the fastest and best, so far working Version that runs on the esp32s3 with this resolution thats all :) |
Is your feature request related to a problem? Please describe.
I have a HUB75 64x64 screen that I'm using in a BMO. I want to create a face and then have it go to an effect after 3 seconds or so.
Ive tried using https://github.com/ajotanc/PixelMagicTool But 64x64 may not work;
ajotanc/PixelMagicTool#4 (comment)
Ive tried using https://github.com/werkstrom/WLED-PixelArtConverter/ and while this does allow me to upload frames to the device, I cant seem to save these as presets. (well I can, but they dont seem to save as different "images" though I see the different images on the HUB75 device. I posted about this issue here https://discord.com/channels/700041398778331156/1298611305002831912/1298611309029490708)
Describe the solution you'd like
An easy way to add pixel art to WLED with either
Gif branch https://github.com/Aircoookie/WLED/tree/gif , the bins are here if you cant compile from source https://github.com/dosipod/WLED_gif_update/actions/runs/10116313741 , as I re-based that on 15
Usermod (client and server ) https://github.com/hughc/wled-pixelart-client
Describe alternatives you've considered
Stated above
Additional context
Add any other context or screenshots about the feature request here.
Thank you for your ideas for making WLED better!
The text was updated successfully, but these errors were encountered: