10-06-2021 07:12 AM - edited 10-06-2021 07:13 AM
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.
Solved! Go to Solution.
10-06-2021 09:05 AM
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…
10-06-2021 10:27 AM
@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
10-07-2021 02:10 AM
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.
10-08-2021 05:14 AM
VLC worked nicely, also with resamling of the sound to half speed! Thanks all!