[PD] Synchronisation fo video and sound

Jack jack at rybn.org
Thu Oct 6 12:57:30 CEST 2011


Le 06/10/2011 11:25, Albena Baeva a écrit :
>
> Hello List,
>
> I'm trying to synchronise film and it's sound in pd. I have several 
> short clips exported as one longer video and separate audio file. I 
> need to be able to start each one of them when I choose, but I loose 
> synchronisation of sound an video. I first try to use this patch 
> (http://www.youtube.com/watch?v=boX0v54SqtU ) - I send to the right 
> inlet of [phasor] the starting point of the video (/) by the total fim 
> length. That worked with one of my video test, but with the real video 
> that I have to use totally lost synchronisation. I 
> send separately the begging point of the video to [counter] and [pix 
> film]. Then I tried to use [phasor] as the play machine for both. But 
> it still doesn't work- the problem this time is the speed of the sound 
> sample is faster and the way the films change is pretty random, but 
> there is synchronisation.
> I attach part of my second try. I hope that will be enough to see 
> where I' wrong
> Thanks
>
> Albena
> http://albena.posterous.com <http://albena.posterous.com/>
> runabout.eu <http://runabout.eu>
> the-rest-art.blogspot.com <http://the-rest-art.blogspot.com>
>
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->  http://lists.puredata.info/listinfo/pd-list
To synchronise movies and sounds, you need to do the same thing 
presented in the youtube video (with [snapshot~]). Then you need also to 
know how many frames per second there is in your movie. For example, if 
your movie has 25 fps and your sound is at 44100 Hz, then you need to 
divide the value from [snapshot~] by 44100 (to get time in second) and 
multiply this time by 25 to get the frame that must be reached (you send 
this value to the right inlet of [pix_film]). Then :

         [snapshot~]
         |
         [/ 44100]
         |
         [* 25]
         |
[pix_film]

Hope it helps.
++

Jack


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20111006/0d0f32aa/attachment.htm>


More information about the Pd-list mailing list