Creating video files in BlitzMax

BlitzMax Forums/BlitzMax Programming/Creating video files in BlitzMax

Leon Brown(Posted 2013) [#1]
Is it possible to create video files with BlitzMax?


xlsior(Posted 2013) [#2]
There's several video playback modules (mpeg, quicktime, ogg theora, etc.) but I don't recall ever seeing anything that can create a video in a common file format...


Leon Brown(Posted 2013) [#3]
Do you know if it would be possible to create video manually? All I need is to combine image files into a video format - and with sound too. Not sure where to start with that though.


Banshee(Posted 2013) [#4]
I did something similar once before by saving out each frame as a bmp image and then compiling them into a sequence. It was back in 2006 so I might be sketchy here, but I think I used Adobe Premier Pro to stitch it back into a movie sequence, or perhaps even Windows Movie Maker.


UNZ(Posted 2013) [#5]
This program creates an avi of single images with the option to add an audio file.
http://qbasic.east-power-soft.de/index.php?menu=software_software_progs_bivi

But it is only in german language I think.


Jesse(Posted 2013) [#6]
>is it possible to create a video file with BlitzMax?

There is no encoder or encoder wrapper for video in BlitzMax. Not that I know of at the moment.

If you have a set of images you can simulate one by display one pixmap at a time to the video screen. It can probably be done really easy and smoothly in threads.

why do you want to do that when you have free software such as Windows movie maker and oters that can do the job very efficiently.


Leon Brown(Posted 2013) [#7]
Thanks everyone. The feature is for a requirement of someone who wants bespoke software written. I will give their work a miss if it is too problematic to write the feature.


Dabhand(Posted 2013) [#8]
Bit of work... But, you could look into OpenCV:-

http://opencv.org/

Example:-

int main()
  {
  CvVideoWriter *writer = 0;
  int isColor = 1;
  int fps     = 5;  // or 30
  int frameW  = 1600; //640; // 744 for firewire cameras
  int frameH  = 1200; //480; // 480 for firewire cameras
  //writer=cvCreateVideoWriter("out.avi",CV_FOURCC('P','I','M','1'),
  //                           fps,cvSize(frameW,frameH),isColor);
  writer=cvCreateVideoWriter("out.avi",-1,
                       fps,cvSize(frameW,frameH),isColor);
  IplImage* img = 0; 

  img=cvLoadImage("CapturedFrame_0.jpg");
  cvWriteFrame(writer,img);      // add the frame to the file
  img=cvLoadImage("CapturedFrame_1.jpg");
  cvWriteFrame(writer,img);
  img=cvLoadImage("CapturedFrame_2.jpg");
  cvWriteFrame(writer,img);
  img=cvLoadImage("CapturedFrame_3.jpg");
  cvWriteFrame(writer,img);
  img=cvLoadImage("CapturedFrame_4.jpg");
  cvWriteFrame(writer,img);
  img=cvLoadImage("CapturedFrame_5.jpg");
  cvWriteFrame(writer,img);

  cvReleaseVideoWriter(&writer);
  return 0;
  }


I spied this a while back, as I wanted something similar a few years ago, much of registered in the auld grey matter, which only surfaced when I saw your post! :D

Maybe the answer?

Dabz