Using VLC feature for my experiment

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
maggiegirl123
New Cone
New Cone
Posts: 3
Joined: 26 Jun 2011 06:31

Using VLC feature for my experiment

Postby maggiegirl123 » 26 Jun 2011 06:40

Hi all, bonjour!

I am a graduate student at York University (Canada) working in the autism research lab.
I am doing a project to test subjects awareness of audio asynchrony to video. I want users to be able to adjust an out-of-sync movie by pressing keys (like the function of 'g' and 'h' in VLC) until they decide the audio is in sync.

I know VLC can allow for dynamic manipulation of the audio sync using g and h keys to delay or skip ahead 50ms, but I need to formalize and randomize the experimental trials using a program such as E-prime, Presentation or PsychPy2 (similar to Matlab).

MY QUESTION IS>>>

Is there a way to use the functionality or code of VLC audio delay/advance in another program's media player? Or alternatively, is there a way I can use another program to open movies in VLC and send commands 'g' and 'h' to VLC?

I hope my question is clear, but if not, I'll try and clarify.

Thanks.

Maggie

Rémi Denis-Courmont
Developer
Developer
Posts: 15324
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Using VLC feature for my experiment

Postby Rémi Denis-Courmont » 26 Jun 2011 10:40

1/ No. 2/ It depends.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

maggiegirl123
New Cone
New Cone
Posts: 3
Joined: 26 Jun 2011 06:31

Re: Using VLC feature for my experiment

Postby maggiegirl123 » 26 Jun 2011 15:46

'It depends.'
I guess you mean it depends on the program? I would be calling VLC from E-prime, Presentation or PsychPy2 (similar to Matlab). I am looking into whether these can simply pass keypress information to VLC, but if not, I thought there might be specific parameters dealing with sound shifting in VLC that I could use to control VLC through code in one of the above mentioned programs.

Greg
Cone that earned his stripes
Cone that earned his stripes
Posts: 316
Joined: 24 Feb 2009 00:37

Re: Using VLC feature for my experiment

Postby Greg » 26 Jun 2011 17:55

There is a VLC command called audio-desync=xx This can be + or -
This command can preset the VLC output stream with a specific audio desynchronisation. Therefore, you can in effect alter the audio desync as it appears on another player streamed from VLC, but not on the fly with this command.
See
http://wiki.videolan.org/VLC_command-line_help
Note:
The caching value in the output stream needs to be set greater than the audio-desync value.

Rémi Denis-Courmont
Developer
Developer
Posts: 15324
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Using VLC feature for my experiment

Postby Rémi Denis-Courmont » 27 Jun 2011 08:44

It depends on the program, on the operating system, and on the method used. You should be able to change the audio sync with the HTTP interface, with a custom LUA script, or possibly even by sending fake key presses to the player (that latter option is ugly and OS-specific).
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

maggiegirl123
New Cone
New Cone
Posts: 3
Joined: 26 Jun 2011 06:31

Re: Using VLC feature for my experiment

Postby maggiegirl123 » 04 Jul 2011 10:09

One more feature question. Pressing 'g' and 'h' allows for steps of 50ms delay or advance in audi.

Is there a way to change the 50ms to 25ms or 20ms, for finer adjustments?

Thanks again

Maggie


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 63 guests