this post was submitted on 02 Jul 2026
-19 points (4.8% liked)

Shell Scripting

163 readers
4 users here now

From Bash to Batch, Ash to Zsh; all shell languages are welcome here!

Rules:

  1. Follow Lemmy rules!
  2. Posts must relate to shell scripting. (See bottom of sidebar for more information.)
  3. Only make helpful replies to questions. This is not the place for low effort joke answers.
  4. No discussion about piracy or hacking.
  5. If you find a solution to your problem by other means, please take your time to write down the steps you used to solve your problem in the original post. You can potentially help others having the same problem!
  6. These rules will change as the community grows.

I want to make a clear delineation on what is and is not allowed. From my experience on Reddit, communities in this niche were far too numerous and fractured. This community casts a fairly wide net, but intends to stay focused on the joy and pain of writing scripts.


In general, if your submission text is primarily shell code, then it is welcome here!

founded 3 years ago
MODERATORS
 

This is my first software project, "vibe coded" with unpaid chat bots. Open source / public domain.

It's a shell script that converts files to data matrix video sequences that can be embedded in bigger videos, and then it decodes the files back out. I was not able to find any other tool that could do the same before I created this.

Encoder dependencies: zint, ffmpeg, optionally par2 for dropped frame error correction

Encoder usage: -e <input_dir> <output_dir>

Decoder dependencies: ffmpeg, ZXingReader, optionally par2

Decoder usage: -d <input_video> <output_dir>

While it's generating a video, it also generates 2 QR codes of the scripts users need for decoding: the extractor and reassembler. So you can add those to the final video and users should have everything they need, no matter if download links get taken down or anything, as long as the video itself is still there.

There's also enough error correction to handle reasonable amounts of video compression + dropped frames (don't push it though).

Tested on Devuan Linux and Google Cloud Shell, but should work on many other systems.

Alternate link (archive.org)

To do:

  • inspect trapping+cleanup
  • inspect usage() exits
  • fix inaccurate messages like "Error: -t requires an integer level (1-15)." (it should say 0-15)
  • hunt and destroy any duplicate logic left over by inefficient chat bots
  • maybe add -v / --version or have usage() mention the version
  • consider overhauling zxing sections to use zxing's -bytes option
  • consider adding a decoder option to use -fast in zxing
  • consider adding a decoder option that has ffmpeg downscale its frame dump PNGs to save more overhead
  • don't know what else right now

I won't be very responsive to replies here due to how fucked up this place is, and I don't check archive.org enough to see comments there quickly either, so if you want to discuss this, I suggest following the main link (nostr / jumble). It doesn't require an email or anything to sign up. If I don't see your replies on there (due to how unreliable notifications are there), feel free to ping me here too. This post doesn't really even need to be on lemmy/piefed at all, except as a "fuck you" to how lemmy/piefed people keep burying my posts and abusing me.

you are viewing a single comment's thread
view the rest of the comments