Jump to content

Recommended Posts

For years now in the student labs we've used firewire video cams and the IMAQ 1394 driver to create AVI files which then get read and converted to intensity arrays for motion analysis in a Labview app. The cheap cams are going extinct, and they want to use I-pads to create the videos which are MOV Quicktime format. So far it looks like the I-pad app they want to use can't be made to spit out an uncompressed AVI. So now I need to find out if I can either:

1) automate conversion of an MOV to uncompressed AVI and continue to use our LV analysis app as-is, or

2) find a way to parse a compressed MOV video to a frame-by-frame intensity array, and build that into our LV analysis app.

I am starting to search, but is anybody aware of an existing library or methods so I don't reinvent the wheel?

Thanks,

BG

Edited by Bill Gilbert
Link to post
Share on other sites
12 hours ago, Bill Gilbert said:

For years now in the student labs we've used firewire video cams and the IMAQ 1394 driver to create AVI files which then get read and converted to intensity arrays for motion analysis in a Labview app. The cheap cams are going extinct, and they want to use I-pads to create the videos which are MOV Quicktime format. So far it looks like the I-pad app they want to use can't be made to spit out an uncompressed AVI. So now I need to find out if I can either:

1) automate conversion of an MOV to uncompressed AVI and continue to use our LV analysis app as-is, or

2) find a way to parse a compressed MOV video to a frame-by-frame intensity array, and build that into our LV analysis app.

I am starting to search, but is anybody aware of an existing library or methods so I don't reinvent the wheel?

Thanks,

BG

Quite a few NAS boxes do this nowadays automatically with smart folders. As I prescribe to the "if it aint broke, don't fix it" school of laziness I would probably tell IT to get one or make them offer me the service and leave my software alone :D

Link to post
Share on other sites

No experience with this, but I have good experience with manually converting video formats using the conversion tools from Pazera. I don't know if they have a command line option, but you could probably also automate it through AutoHotKey for a real hodge-podge of stuff.

Link to post
Share on other sites

Will investigate these suggestions, thanks very much! Found a couple of trialware converters yesterday, but neither of them can be called from a command line. Tried one from iSkysoft, and while it did a conversion, it may have also be trying to install some sort of spyware, getting execution notifications now. Maybe they just want it to phone home to indicate who is using it, or...........

Link to post
Share on other sites

On linux, avconv is powerful, command line, and options rich. I have used it routinely to create .mov from .wmv, for instance.

For automatic conversion, I imagine one could set up a script which checks for new files in a given folder and initiates conversion after they have stopped growing since longer than N seconds, or something the like. It never occurred to me to stream contents through some pipe for conversion on the fly, but that might be possible too.

If windows is required, short of seeing if something can be run in MinGW/Cygwin, I see that libav provides windows builds, but I haven't looked into operation.

Link to post
Share on other sites
4 hours ago, ensegre said:

For automatic conversion, I imagine one could set up a script which checks for new files in a given folder and initiates conversion after they have stopped growing since longer than N seconds, or something the like. It never occurred to me to stream contents through some pipe for conversion on the fly, but that might be possible too.

If windows is required, short of seeing if something can be run in MinGW/Cygwin, I see that libav provides windows builds, but I haven't looked into operation.

The link I posted does exactly this on Windows (though with ffmpeg) and streams the video through a pipe into LabVIEW as YUV binary data, which is then converted on the fly into RGB images.

Link to post
Share on other sites

Thanks again all. Following links, I found this thread:

http://forums.ni.com/t5/LabVIEW/Convert-MPEG-to-multiple-JPEGs/td-p/1199703

... where Andrey Dimitriev suggested using Mencoder

https://en.wikipedia.org/wiki/MEncoder 

which apparently uses FFmpeg. I managed to get it to work from the command line in System Exec. It creates an AVI that I can view with various media players, but so far, IMAQ Open AVI.vi chokes on this creation, suggesting that I need a Directx upgrade. I'm in Win7 at Directx v11, so I don't imagine that will do much good.  Now I need to do some more work to find a format that mencoder will create that I can read with labview.

System Exec command line is:

C:\mencoder.exe File-in.mov -ovc raw -nosound  -vf format=yv12 -o File-out.avi

Link to post
Share on other sites

Thanks Jordan, but scanning the Handbrake webpage, I see nothing about any command line interface, this needs to be automated without having to use a separate GUI.

Experimenting yesterday, I found Labview will open and read an AVI processed through mencoder using "-ovc labv" instead of "-ovc raw -vf format=yv12". Now the IMAQ Image to Array function chokes on the "invalid image type". I found Get Codec example yesterday, and will put more work into this today. Part of the problem is just my low position on the learning curve, and deciphering the alphabet soup of acronyms. I suspect there is a filter -vf that can force the pixel format into a greyscale format that Image to Array will like, but maybe not.

It may not be necessary, since I think the historical reason that Image to Array and an Intensity Graph was used in our application have become moot. I took over this project about ten years ago, and left it alone, since it worked. Might be time to change that to an IMAQ Image control which displays the images just fine, and in color. Might end up being the easiest path right now.

Link to post
Share on other sites

The mencoder lavc codec was compressing the output nicely, but reducing quality visibly. Fiddled around some more, spotted the IYUV string in the Get Codec Names vi, now using "-ovc raw -vf format=IYUV", which produces an uncompressed AVI that Labview can read. The IYUV codec is not show in the list that comes up in "mencoder -ovc help", but works. With the Cast Image in our app, I'm where I need to be.

BG

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By Tomi Maila
      We recorded all JKI presentations and have made them available online. AI and deep learning with Javier Ruiz & Ian McFarlane, .NET integration and interface design with Sarah Zalusky, and Caraya unit testing with Jim Kring. Good stuff!
      Caraya: A New Take on LabVIEW Unit Testing - TS9754
      by Jim Kring
      Designing a LabVIEW Interface for .NET Applications - TS9757
      by Sarah Zalusky
      Artificial Intelligence With LabVIEW: Deep Learning-Based Classification and Control - TS9758
      by Javier Ruiz & Ian McFarlane
      Watch videos
       
       
       
    • By drjdpowell
      Some of the presentations at the recent CLD Summit in Newbury, UK, were recorded by Steve Watts and are available on the CSLUG YouTube Channel.
    • By awang_synovus
      Name: RCF LVS Conversion Toolkit
      Submitter: awang_synovus
      Submitted: 20 Mar 2015
      Category: *Uncertified*
      LabVIEW Version: 2009License Type: BSD (Most common)



      Hi Everyone,
       
      We have recently developed a toolkit that allows you to use Quick Drop plugins in Right Click Framework or LabVIEW Speak platforms.
       
      Named RCF LVS Conversion Toolkit, this toolkit provides an easy solution for JKI Right Click Framework (RCF) and LabVIEW Speak (LVS) lovers who want to use a quick drop plugin in RCF or LVS.  Now, you wont be disappointed when you see a useful plugin not written in your favorite platform's plugin format.
       

       
      Procedures are simple:
       Open the toolkit by going to Tools Menu >> Synovus >> RCF LVS Conversion Toolkit...  Select the target Quick Drop plugin VI  Type the command name in Right Click Framework or LabVIEW Speak  Click OK  
      Now you can use the Quick Drop plugin in Right Click Framework or LabVIEW Speak platform
       
      Features:
       Automatically converts a QD plugin to RCF or LVS plugin format  Warns the user if repetitive commands are installed.  Provides an instruction as user clicks help button.  Helps the user navigate to the plugin folders (LVS, QD and RCF)  Modifying the functionality in Quick Drop VI will automatically update the functionality in Right Click Framework or LabVIEW Speak  
      Please let me know if you have any questions. Suggestions and comments are welcome 
       
      Note: RCF and LVS only update their lists of commands at startup. If you use the RCF LVS Conversion Toolkit when RCF and LVS are open, please restart these platforms.

      Click here to download this file

    • By awang_synovus
      Hi Everyone,

       

      We have recently developed a toolkit that allows you to use Quick Drop plugins in Right Click Framework or LabVIEW Speak platforms.

       

      Named RCF LVS Conversion Toolkit, this toolkit provides an easy solution for JKI Right Click Framework (RCF) and LabVIEW Speak (LVS) lovers who want to use a quick drop plugin in RCF or LVS.  Now, you wont be disappointed when you see a useful plugin not written in your favorite platform's plugin format.

       



       

      Procedures are simple:

       Open the toolkit by going to Tools Menu >> Synovus >> RCF LVS Conversion Toolkit...
       Select the target Quick Drop plugin VI
       Type the command name in Right Click Framework or LabVIEW Speak
       Click OK
       

      Now you can use the Quick Drop plugin in Right Click Framework or LabVIEW Speak platform

       

      Features:

       Automatically converts a QD plugin to RCF or LVS plugin format
       Warns the user if repetitive commands are installed.
       Provides an instruction as user clicks help button.
       Helps the user navigate to the plugin folders (LVS, QD and RCF)
       Modifying the functionality in Quick Drop VI will automatically update the functionality in Right Click Framework or LabVIEW Speak
       

      Please let me know if you have any questions. Suggestions and comments are welcome 

       

      Note: RCF and LVS only update their lists of commands at startup. If you use the RCF LVS Conversion Toolkit when RCF and LVS are open, please restart these platforms.
    • By piZviZ
      I am able to read HEX file into Labview using read from Text file..I am getting data into labview in terms of string.
       
      Problem =>  Now i want to load this HEX file into microcontroller using VISA-rs232 .Is it require to further conversion or i can load HEX file(in form of string) directly into microcontroller ?
      rs232.vi
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.