LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Playback video and sound in slow motion?

Solved!
Go to solution

Hello, maybe someone have a solution to my violin training? I have filmed my violin teacher playing the new song I am learning "Vals efter Gås Anders i A-dur", and it would be nice to slow down the playback of video and sound so I have a chance to follow and hear/see ech tune played.

 

Does anybody have some code snippet or directions on how this can be done easily? I have never worked with video in Labview, and I don't have any vision package, but I hope playback is part of the basic package.

 

As you understand this is just a small hobby project of mine, probably I can get and app that does the job. But more fun to program in Labview!

Playing back sound at different speeds is a tricky thing I guess, maybe we can focus on half speed only. In the end I would like to write a simple program that can:

- play back video + sound from a file, is it .mov apple is using? (I can also convert to another format, will be only a few tunes per year!)

- normal speed, half speed

- mark times to loop, or to play again when a certain key is pressed, preferably a feet pedal (or a keyboard on the floor), maybe another key to advance the loop frame xx sec. It is hard to control a smartphone or pc while playing the violin.

 

 

Found this prost from 2014, but I could not run it in my LV2020.

https://forums.ni.com/t5/LabVIEW/Record-and-playback-video-in-slow-motion/m-p/2782682?profile.langua...

0 Kudos
Message 1 of 5
(1,464 Views)
Solution
Accepted by topic author Ola_A

Hi Ola,

 


@Ola_A wrote:

Hello, maybe someone have a solution to my violin training? I have filmed my violin teacher playing the new song I am learning "Vals efter Gås Anders i A-dur", and it would be nice to slow down the playback of video and sound so I have a chance to follow and hear/see ech tune played.


Use VLC mediaplayer: it offers changing the playback speed…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(1,439 Views)

@Ola_A wrote:

 

As you understand this is just a small hobby project of mine, probably I can get [an] app that does the job. But more fun to program in Labview!

 


I would also recommend VLC for this task - if you feel happy to code, try VLC Scripting to control the VLC Player via LabView

https://forums.ni.com/t5/Example-Code/VLC-scripting-in-LabVIEW/ta-p/3515450

 

I suppose this will work with .mp4 file.

 

It is worth mentioning: VLC is capable to convert a .mov to .mp4

 

Message 3 of 5
(1,425 Views)

There is nothing built in that I'm aware of. The example you pointed to seems to use IMAQ, which I'm not familiar with enough to know if it can play things on its own and exactly what kind of license it requires.

 

You might be able to use something like FFMPEG to read all the data and display/play it yourself, but that seems like a lot of work for relatively little gain.

 

You could embed an external player using ActiveX or .NET, but then you would probably just be using whatever that player supplies and at that point you're probably better off just using it directly.

 

Personally, I like Media Player Classic, but VLC certainly works as well. Whichever player you use, look up how to configure audio pitch shifting, so that the audio still sounds correctly when you change the playback speed. I know that MPC has the option and I believe VLC does too.


___________________
Try to take over the world!
Message 4 of 5
(1,397 Views)

VLC worked nicely, also with resamling of the sound to half speed! Thanks all!

0 Kudos
Message 5 of 5
(1,357 Views)