Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
generating an AVI file from still images?
#1
With @SpriggsySpriggs' webcam code, we can capture still images as they come in at 30 FPS. Then QB64PE can further manipulate each frame as an image and display it to the screen & write to an image file. I find the lag to be minimal at 320x240 resolution. The one thing we don't have is the ability to output it to a video file (AVI or some common format), ideally appending to the file from QB64PE images as they come in?

I googled making an AVI file from still images, and didn't find anything in QB64. Everything I found indicated that making an AVI from scratch from frame data is a non-trivial task, but there is a Microsoft API for it, with an example at
https://www.wischik.com/lu/programmer/avi_utils.html that references "avi_utils.h". However Spriggsy looked at it and said it uses an interface, which he had not had any luck with in QB64PE.

I also found people talking about generating AVI from a bunch of image files using FFMPEG, so my low-hanging-fruit workaround would be to save still frames to a folder, then shell out to FFMPEG to make it a video.

I figure it can't hurt to ask, does anyone have any idea for generating a video file from a stream of images, say 320x240 at 30 FPS? If someone can figure out that API interface that might be a way, but that is way beyond me...
Reply
#2
I guess I ain't moving fast enough for you lol. If you want to just dump them all to image sequences and then turn them into an AVI, just do it with ffmpeg until I can get something together.
The noticing will continue
Reply
#3
(03-02-2025, 07:03 PM)SpriggsySpriggs Wrote: I guess I ain't moving fast enough for you lol. If you want to just dump them all to image sequences and then turn them into an AVI, just do it with ffmpeg until I can get something together.
Oh no worries... it just sounded like you thought it wasn't possible, because interfaces. 
But if you think maybe it's doable after all, by all means, at your leisure! 

Meanwhile I think I'll play with the 2 laptops over the network thing - I had this crazy idea that placing 2 cameras as far apart as a pair of eyes, where camera #1 renders its image in varying levels of brightness of cyan, and camera #2 in varying levels of red, and the 2 images superimposed, it could result in the old school 3D effect when you watch it with red/blue glasses...  Cool

But back to the AVI thing, another thought I had was that maybe FFMPEG has a command line switch to tell it to "append" a frame to the end of an existing movie, so as each frame comes in, it could add it on to the end of the file (as opposed to just saving all the still images first and making them into a movie later)...
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  about Hardware Images and _DisplayOrder,Help! qbfans 11 541 02-11-2026, 07:10 AM
Last Post: SMcNeill
  Nth problem with hardware images Ikerkaz 9 474 01-23-2026, 02:58 PM
Last Post: bplus
  Hardware images questions Dav 5 462 12-04-2025, 04:18 PM
Last Post: Pete
  Hardware images...Talk to me! Unseen Machine 5 723 09-22-2025, 11:12 PM
Last Post: TempodiBasic
  need help generating fixed-width BDF fonts with sizes other than 8x8 madscijr 10 1,069 07-12-2025, 03:33 PM
Last Post: madscijr

Forum Jump:


Users browsing this thread: 1 Guest(s)