LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reading frames in avi files

Solved!
Go to solution

I would like to add that I have replaced all AVI2 instruments with old AVI analogs (VIs from Avi2.llb and Avi1.llb from C:\Program Files\National Instruments\LabVIEW 2017\vi.lib\vision folder) and now my program runs just fine! (no errors at all). Also I have altered all the CLFNs there from UI to any thread mode to prevent possible performance slowdowns (actually I'm unsure if those functions are reenterant but I'm playing only one video stream in sequence so I think I'm safe with it).

0 Kudos
Message 21 of 29
(1,605 Views)

I am also facing the same problem. Even with the Read Avi examples, when trying to read a video, the complete application is crashing. Can anyone suggest the solution for this.

0 Kudos
Message 22 of 29
(1,546 Views)

Hai, Im just trying to read the avi files, even with examples of Ni, the labview application is crashing.

0 Kudos
Message 23 of 29
(1,546 Views)

@skrishna93 wrote:

I am also facing the same problem. Even with the Read Avi examples, when trying to read a video, the complete application is crashing. Can anyone suggest the solution for this.


Here's what I did:

  1. Opened LabVIEW (I'm running 2018, but I'm 99.44% sure I'd get the same results with LabVIEW 2016).
  2. Open Examples, "Read AVI File.vi".
  3. Run Example.  When it asks me for an AVI file, choose one of the ones provided by NI.  I tried Balloon.avi, Flame.avi (both B&W), and SideCrash1 (poor quality RGB).

All the examples worked perfectly.  If they do not work for you, I would say you "did something wrong", and if I had to guess, I'd guess you mis-installed LabVIEW (which, I regret to say, is pretty easy to mis-install -- I tend to do all of the installations for myself and my colleagues/students).

 

My conclusion is there is nothing wrong with NI's implementation of IMAQ AVI routines (the Example uses the current AVI2 routines, by the way).

 

Bob Schor

Message 24 of 29
(1,532 Views)

Please read the posts before making assumptions people "did something wrong".

Largest example AVIs provided by NI is 15MB in size (Traffic.avi).

Problems arise on AVIs larger than ~2GB.

Message 25 of 29
(1,511 Views)

I had re-installed the packages and it worked just fine. Thank you.


@Bob_Schor wrote:

@skrishna93 wrote:

I am also facing the same problem. Even with the Read Avi examples, when trying to read a video, the complete application is crashing. Can anyone suggest the solution for this.


Here's what I did:

  1. Opened LabVIEW (I'm running 2018, but I'm 99.44% sure I'd get the same results with LabVIEW 2016).
  2. Open Examples, "Read AVI File.vi".
  3. Run Example.  When it asks me for an AVI file, choose one of the ones provided by NI.  I tried Balloon.avi, Flame.avi (both B&W), and SideCrash1 (poor quality RGB).

All the examples worked perfectly.  If they do not work for you, I would say you "did something wrong", and if I had to guess, I'd guess you mis-installed LabVIEW (which, I regret to say, is pretty easy to mis-install -- I tend to do all of the installations for myself and my colleagues/students).

 

My conclusion is there is nothing wrong with NI's implementation of IMAQ AVI routines (the Example uses the current AVI2 routines, by the way).

 

Bob Schor


 

0 Kudos
Message 26 of 29
(1,498 Views)

Hello community.

After the many different problems with the video functions built into the IMAQ, I have now developed a solution that offers much, much more.
The advantages are:
- Runs on different Windows versions.
- No limitation of reading speed.
- Can read and write many formats.
- Also reads compressed videos.
- Does not necessarily need IMAQ / the Vision Toolbox.
I use ffmpeg programs which are extremely powerful.
https://ffmpeg.org/download.html
Example programs are here:
https://forums.ni.com/t5/Example-Program-Drafts/Labview-MP4-Video-File-Read-Write/ta-p/3976751

 

All the best
Hansjörg Kasper

0 Kudos
Message 27 of 29
(1,342 Views)

Thanks for pointing out the ffmpeg programs.  Question about your example code -- what is a TCP Receiver Loop doing in there?  Are you just using some of the code (and why?) from the UDP SPL Receiver (which supplies the Icon and Context Help for all of your examples)?

 

Bob Schor

0 Kudos
Message 28 of 29
(1,318 Views)

Hello Bob,

ffmpeg and LabView exchange data via TCP/IP. It is more stable because Dot Net can be changed after updates.

I have kept the examples as small as possible, so that it is clear more quickly what is happening. I will provide more documentation and examples.

 

Greetings
Hansjörg

0 Kudos
Message 29 of 29
(1,305 Views)