Lemmy Fans

35 readers
2 users here now

Welcome to Lemmy.fan!

This instance succeeds on one simple mantra: Be kind, and do unto others as you have done to yourself. Consider for a moment that we're ALL on the the same rapidly-spinning, mostly-watery orb, hurtling through space at fantastic speeds, and trading metal and paper for our livelihoods. The unknown will always dwarf the known. Learning never ends. We may be experts in something, but no one person is an expert in all things.

Given that, here our are very simple

Rules

Facts based in reality and science are not debatable.

Opinions are great, just be ready to back yours up with a solid foundation of factual information and/or research.

No NSFW communities are allowed to be created on this instance.

Community creation is encouraged so long as it is actively moderated.

Donations are not being accepted or expected. This rule may change IF the instance grows beyond current capacity. Please enjoy an ad-free, donation-free social media experience.

Lastly, negative behaviors such as trolling, harassment, stalking, brigading, and other offensive behaviors as judged by the instance admin(s) will not be tolerated. Immediate and permanent bans are issued for spammers, trollers, vote brigaders, stalkers, harassers, and those of similar ilk. All decisions will be made by the instance admin(s). Those decisions are final and incontestable.

That's the end of the boring but necessary stuff.

Alternate UIs

Want a reddit-like experience? Check out https://old.lemmy.fan (mlmym)

Alexandrite is a gorgeous, highly-customizable Lemmy frontend. https://a.lemmy.fan (Alexandrite)

Photon UI offers a sleek and responsive Lemmy experience. https://photon.lemmy.fan (Photon)

founded 7 months ago
ADMINS
1
0
submitted 2 months ago* (last edited 2 months ago) by [email protected] to c/[email protected]
 
 

Small disclaimer this is from the txt log which is not exactly complete, there are few pixels missing here and there.

One second of the video is about 30 minutes of drawing (one frame contains 1 minute of drawing, 30 frames per second)

Also a little bit of bragging - couldn't resist the challenge and got this all glued together in Python! Which is obviously a valid tool for this considering the rich data processing ecosystem.
Well maybe except the video generation part... definitely except the video generation - Pyav - bindings for ffmpeg, are really badly documented, luckily they have at least good enough examples.

The short story of how:

  • little bit of python script to convert the txt log into csv
  • from csv to pandas, there I made a few cleaning passes to get the "format" just right (mainly dealing with the mod_fill action)
  • pyav, ffmpeg and the world of video - oh boy:
    • for each one minute of drawing data
    • replay them over the canvas (numpy RGB array)
    • embed/copy the canvas into the video frame (another ndarray)
    • (add the timestamp above the canvas - cv2)
    • invoke pyav magic to mux/append it into the video
    • hope that your numpy array slices, splices, "broadcasts", pyav codec options and stream configurations are correct. Otherwise, watch as you end up with 1GB+ of mp4 file - 3 hours to watch whole (1s/30fps) with really bad resolution or inverted/wrong colors:)

If anyone wants to tweak this or has ideas how to make this better just hit me up. Can also put the code somewhere if wanted.

What a wild ride ha!

E: streamable didn't offer title change so final1 it is lol, before there was test.mp4 test_x30, test_x2, test_grain, test_1 ...

2
 
 

Small disclaimer this is from the txt log which is not exactly complete, there are few pixels missing here and there.

One second of the video is about 30 minutes of drawing (one frame contains 1 minute of drawing, 30 frames per second)

Also a little bit of bragging - couldn't resist the challenge and got this all glued together in Python! Which is obviously a valid tool for this considering the rich data processing ecosystem.
Well maybe except the video generation part... definitely except the video generation - Pyav - bindings for ffmpeg, are really badly documented, luckily they have at least good enough examples.

The short story of how:

  • little bit of python script to convert the txt log into csv
  • from csv to pandas, there I made a few cleaning passes to get the "format" just right (mainly dealing with the mod_fill action)
  • pyav, ffmpeg and the world of video - oh boy:
    • for each one minute of drawing data
    • replay them over the canvas (numpy RGB array)
    • embed/copy the canvas into the video frame (another ndarray)
    • (add the timestamp above the canvas - cv2)
    • invoke pyav magic to mux/append it into the video
    • hope that your numpy array slices, splices, "broadcasts", pyav codec options and stream configurations are correct. Otherwise, watch as you end up with 1GB+ of mp4 file - 3 hours to watch whole (1s/30fps) with really bad resolution or inverted/wrong colors:)

If anyone wants to tweak this or has ideas how to make this better just hit me up. Can also put the code somewhere if wanted.

What a wild ride ha!

view more: next ›