LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

image to mpeg / create mpeg

Hello.  Recently I wrote a small vi to take a 3d array of binary images and convert it to avi format.  I have been asked to research and find out if it is possible to convert an array of images to mpeg as well.  I am aware of freeware that is available to convert avi to mpeg and vice-versa, but I was told to make the conversion directly from the binary arrays to mpeg. 

Has anybody out there ever had a need to convert an array of images to mpeg format instead of avi?? 


all thoughts/suggestions are appreciated.
0 Kudos
Message 1 of 7
(3,834 Views)
I did images(bmp, jpg, png, gif, and tiff) to avi conversion.
I used divX codec to compress data to mpeg.
The file format is avi, but is compressed in mpeg.
 
BMP to AVI can be downloaded from my website:
 
 
George Zou
0 Kudos
Message 2 of 7
(3,810 Views)

Hi Candice,

I have only ever seen IMAQs saving to AVI format.  I've never seen directly to mpeg, although it would be useful...

You're already aware of the freeware or other applications that can convert avi to mpeg.  It is (or may be) possible to implement a vi which would do the conversion, especially if the application has API's available to do this.  I do not know tht it can be done directly from the binary data.

RayR

0 Kudos
Message 3 of 7
(3,805 Views)
Hello Candice,
 
Thank you for contacting National Instruments.  Assuming that you have the Vision Development Module installed, there is an "AVI Compressor Comparison Example.vi" shipping example that can be found by searching for "AVI" in the Search tab of the Example Finder.  This example scans your PC for all of the available compression filters that are installed on your machine, and creates different AVI files using them.  The extension on the files are still AVI, but they are compressed using the filters.
 
If you are curious to know what filters are installed on your machine without having to run the example, simply place a "IMAQ AVI Get Filter Names.vi" down on a new block diagram, and create an indicator off of the Filter Names output.  Run the VI, and the indicator will list all of the available compression filters on your machine.
 
To read any of these files back in LabVIEW, open the "Read AVI Example.VI" and specify one of the files that were created from the previous shipping example.
 
Regards,
 
Mike T
National Instruments
0 Kudos
Message 4 of 7
(3,789 Views)


@Torba wrote:
 
To read any of these files back in LabVIEW, open the "Read AVI Example.VI" and specify one of the files that were created from the previous shipping example.

Hi Mike,

It's relatively late and many of my braincells are asleep...  However, the above statement caught my attention....

Do you mean that a video compression file (let's say MPEG-2 for instance) could be renamed to ".avi" and be read by Labview?  --- I must have missed something somewhere... --- ?? 😐 ??

RayR

0 Kudos
Message 5 of 7
(3,780 Views)
Hi Joe,
 
When I suggested to read any of the files back in LabVIEW, I was particularly referring to the files that were created using the "AVI Compressor Comparison Example.vi."  There will be a folder created that will contain different versions of the original AVI that were generated using the different compression filters that were found on the PC.  The "Read AVI Example.VI" should be able to read those files back.
 
In general, as long as the "IMAQ AVI Get Filter Names.vi" can detect the compression filters that you are planning to use to read or write video files, they should work with the AVI functions in LabVIEW.
 
Regards,
 
Mike T
National Instruments
Message 6 of 7
(3,747 Views)

Thanks Mike,

I think I understand...  I'll check it out.

RayR

0 Kudos
Message 7 of 7
(3,736 Views)