Skip to content
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

Support preview of jpeg and png topics #86

Open
thomasnordquist opened this issue Apr 2, 2019 · 7 comments
Open

Support preview of jpeg and png topics #86

thomasnordquist opened this issue Apr 2, 2019 · 7 comments

Comments

@thomasnordquist
Copy link
Owner

Could be nice.

Topics can be identified by magic numbers:
http:https://www.ntfs.com/jpeg-signature-format.htm
https://en.wikipedia.org/wiki/List_of_file_signatures

JPEG

Magic number: FF D8 FF
Trailer: FF D9

PNG

Magic number: 89 50 4E 47 0D 0A 1A 0A

GIF

Magic number: 47 49 46 38 37 61
Magic number: 47 49 46 38 39 61

@thomasnordquist
Copy link
Owner Author

thomasnordquist commented Apr 2, 2019

While this would be very cool, there are 3 issues with this.

Using Buffers seems not to be a viable option

  • Nodejs uses Buffers, browser ArrayBuffers it is uncertain how the IPC / SocketIO converts them
  • Working with ArrayBuffers in Browsers sucks
  • Reliability for different browsers and encoding issues are in question.

Using Base64 solves most issues but

  • mqttjs in browsers may still use some sort of Buffer, it may require different handling. Seem to be nodejs buffers supporting base64 encoding

@thomasnordquist
Copy link
Owner Author

The first step is complete, messages are stored as Base64 and can be Data-URI encoded with methods from Base64Message.

However, buffers are currently truncated to a size of 10k in the MQTT data source.

@Andoramb
Copy link

Still rooting for this. 🙂

@Twanislas
Copy link

Hi team,

Bringing this back to the top 🤘

My use case would be to be able to peek into Frigate snapshot topics like frigate/cam01/person/snapshot which contains the raw JPEG data of the snapshot in the message.

I hope it gets implemented one day :)

@ilgrank
Copy link

ilgrank commented Feb 9, 2024

The author (@thomasnordquist ) is absent from this project since very long, just telling you @Twanislas in case you had hope for a reply

@Twanislas
Copy link

Oh...

Thanks for flagging ! Well at least this FR is there, maybe one day xD

@Andoramb
Copy link

it's already done in a parallel universe 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants