aka Posted November 18, 2007 Report Share Posted November 18, 2007 hi, is there a function in LAbview 6,7 or 8 to playback a video file (.avi , .mpeg)? or do i need to get the IVision toolkit? ideally i would like to have a video function that handles both image and audio. is that possible? or will i need to extract the audio and then synchronise an audio and a video function to play simultaneously? thanks, alex Quote Link to comment
MikaelH Posted November 19, 2007 Report Share Posted November 19, 2007 QUOTE(aka @ Nov 18 2007, 01:56 AM) hi,is there a function in LAbview 6,7 or 8 to playback a video file (.avi , .mpeg)? or do i need to get the IVision toolkit? ideally i would like to have a video function that handles both image and audio. is that possible? or will i need to extract the audio and then synchronise an audio and a video function to play simultaneously? thanks, alex If you're on a Windows platform just use the Windows Media Player-ActiveX container (found under the .Net & ActiveX controls). http://lavag.org/old_files/monthly_11_2007/post-941-1195418765.png' target="_blank"> Cheers, Mikael Quote Link to comment
aka Posted December 3, 2007 Author Report Share Posted December 3, 2007 QUOTE(MikaelH @ Nov 18 2007, 09:46 PM) If you're on a Windows platform just use the Windows Media Player-ActiveX container (found under the .Net & ActiveX controls). http://lavag.org/old_files/monthly_11_2007/post-941-1195418765.png' target="_blank"> Cheers, Mikael thanks for the reply, i tried using the Windows Media Player and the problem i'm having is that the playback is not very smooth, it kind of 'jumps' frames while it is loading the .avi . i dont think this is a labview problem because i have the exact same behaviour when opening the same .avi with windows media player running as an independent application. with other programs like DivX this is not an issue and everything runs just fine. by the way this happens with both WMP 9 and 11 on a pentium III 800MHz PC with 512 Mbytes RAM and running XP professional with sp2. i have tried also a different approach which is to use IMAQ AVI open.vi and IMAQ AVI read frame.vi. i have attached a pic of the code. the problem with this is that the playback is slow. meaning that the time it takes to update each frame is too long. i can not see why because i read the number of frames in the .avi file and then set a delay according to that. however i have seen that the time delay is not accurate. so for example if i dont read the frame rate from the .avi but hard code say 2 frames per second then it works. if i say 4 frames/sec then i see about 2.5 frames per second. if a say 1000 frames/sec the speed is not faster than 25 frames/sec. has anyone experienced the same? thanks alex Quote Link to comment
tnt Posted December 4, 2007 Report Share Posted December 4, 2007 QUOTE(aka @ Dec 2 2007, 08:49 PM) the problem with this is that the playback is slow. meaning that the time it takes to update each frame is too long. i can not see why because i read the number of frames in the .avi file and then set a delay according to that. however i have seen that the time delay is not accurate. so for example if i dont read the frame rate from the .avi but hard code say 2 frames per second then it works. if i say 4 frames/sec then i see about 2.5 frames per second. if a say 1000 frames/sec the speed is not faster than 25 frames/sec.Hi Alex,the delay you are using adds up to the time LV needs to read (and draw) the frame, so it is better to use the metronome (Wait Until Next ms Multiple). As far as I understand your last test, 25 frames/sec is the fastest speed you can process your frames, if you want to go faster, for e.g. an avi with a framerate of 50 fps, you could set the fps to 25 and the skip every other frame to keek the timing intact. Good luck, TNT Quote Link to comment
aka Posted December 4, 2007 Author Report Share Posted December 4, 2007 QUOTE(tnt @ Dec 3 2007, 09:24 AM) Hi Alex,the delay you are using adds up to the time LV needs to read (and draw) the frame, so it is better to use the metronome (Wait Until Next ms Multiple). As far as I understand your last test, 25 frames/sec is the fastest speed you can process your frames, if you want to go faster, for e.g. an avi with a framerate of 50 fps, you could set the fps to 25 and the skip every other frame to keek the timing intact. Good luck, TNT thanks for the reply, i understand that i'm adding an extra delay but its purpose is to automatically detect and display the correct number of frames/sec. reducing this delay should as you say make it faster but then i will not be showing the video at the correct speed (meaning the speed of the real event that was recorded). also i guess that the time labview takes to read , display and delete each frame should be less than a millisecond. alex Quote Link to comment
tnt Posted December 5, 2007 Report Share Posted December 5, 2007 Hi Alex, just forget I ever wrote the last 3 lines of my previous post, just re-read the first 2 lines and REPLACE the "Time Delay" with the "Wait Until Next ms Multiple.vi" in your "Play video ... .vi". In this way EVERY loop will take 1/fps time to complete (as you requested). (Unless LV requires more time than specified and the loop-rate will decrease to >= 2* 1/fps and this is what I was talking about in my last 3 lines.) Happy testing... TNT Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.