Video Synchronisation

Started by RG (aka AUDIOMONSTER), January 18, 2008, 01:32:56

Previous topic - Next topic

bvanoudtshoorn

Sorry - I'm not sure that there really is anything that can do this. I seem to recall that CoolEdit (which is now Adobe Audition, AFAIK) had the capability to have a video stream included. I think the easiest thing (and probably all that you can do!) is to get a video player which has a very precise timer, note down all the important times, and use the "get row play time" function to match 'em up.

Sam_Zen

Hmm. Cool Edit could be a workaround. Never used the video options. So I experimented with it.
So far it has the video animation, but no sound.
The soundtrack shows some vertical short lines indicating some sync points I suppose.
0.618033988

pelya

That could be done by running VLC media player and attaching MPT to VLC Telnet interface, I'll try to do that though I don't promise anything.
Edit: I've made another Custom MPT build - both .EXE and sources inside. Install VLC Media Player, and hit "Sync with video" menu option in MPT - the playback is re-synced to the current pattern each time you start playback - you should pause or stop it before. Also featuring half-second delay when playback starts :D though the video should be synced with MPT more or less fine.

RG (aka AUDIOMONSTER)

Great ! I'll try that, thanks a lot ;-)

RG (aka AUDIOMONSTER)

Pelya, this is absolutely great ! It works perfectly, I just tryed it with an AVI file.

It crashed with a mpg but no matter, I'll convert my files into AVI, if needed.

This fonction MUST be added to all new MPT versions !


B R A V O and T H A N K S again !


Best regards from Paris...

Sam_Zen

Looks quite intriguing.. I will check it out.

EDIT: Since this is an investigation, I made a stand-alone dir for this 'sync with video' version of OMPT.
When installing this, it would be quite elegant if the package also contains a 'default.mkb' file.
0.618033988

pelya

Heh, I love to be praised ;D . Update - removed halfsecond delay,  video resynced with F6 and F7 keys without stopping it.
Your MPG file crashed VLC player, not MPT - post bugreports to them, though I thought it should be robust.

RG (aka AUDIOMONSTER)

Absolutely ! Your prog just works great. I'll try the V2 tonight ;-)

Thanks again

RG (aka AUDIOMONSTER)

Once again: excellent...

If I'd dare suggest something: if by chance there was a possibility to be synchronized wherever we are in the song, with the video (I mean, for instance, if you start row 25 of pattern 12, then the video starts from the right frame)...It would enable to check music/video synchro, without having to restart the whole module play.

Or maybe, if possible, even the possibility to have a synchro point at each first row of each pattern, that would enable to only have to replay a pattern from the beginning, to check synchro, and not the whole song...


Anyway, what has been done here is already very helpful for me, and a great step, I think, for OpenMPT...

Sam_Zen

Quote...the possibility to have a synchro point at each first row of each pattern
Maybe the routines that Rewbs added to OMPT to use the "change at transition" function could be of help here.
This function not only works within a pattern, but also in the pattern-row. Where a jump for- or backwards can be made.
0.618033988

pelya

Quote from: "Raphaël Gesqua"Once again: excellent...
If I'd dare suggest something: if by chance there was a possibility to be synchronized wherever we are in the song, with the video (I mean, for instance, if you start row 25 of pattern 12, then the video starts from the right frame)...It would enable to check music/video synchro, without having to restart the whole module play.

It is already done in v2 - stop playback, put cursor on correct row and start playing using F7 key - it should seek video to correct pos. To get stale video frame you may quickly hit F7 and F8.

Though I've found one bug in VLC - if you seek to the pos two second away from current pos it may randomly jump two seconds ahead. You should just wait until it plays for two seconds and re-sync again - it will jump to correct pos.
The possible solution to fix it is to seek each time to current pos + 2 secs, and seek to correct pos right after, but that will slow the things down, 'cause VLC needs halfsecond to react on the next command. Let's be lazy and post bugreport to VLC team instead :) .

Quote from: "Raphaël Gesqua"
Or maybe, if possible, even the possibility to have a synchro point at each first row of each pattern, that would enable to only have to replay a pattern from the beginning, to check synchro, and not the whole song...

I've tried in a such way and it wasn't good - the smooth video playback suddenly jumps back and forward because of that seeking bug in VLC. Even without it, the video gets little sloppy.

For now, you may hit F6 key even without stopping playback - video will be re-synced to the pattern beginning - but wait for two seconds before hitting F6 key again :) .

I've thought about re-syncing video each time you move cursor in MPT, but that will slow the things down considerably - MPT should seek video in VLC, play for halfsecond so it will update the screen, and pause it again.

bvanoudtshoorn

Can I suggest putting a "Sync video to row" button or menu option in? That'd be a bit more elegant than the F6/F7 combo you suggest... :)

RG (aka AUDIOMONSTER)

Hi again, Pelya


I'm not so sure if it comes from your program or from the VLC player, but I noticed something a little boring: when you launch a song synchronized with a video file, it starts well each time you press "Play song" BUT if you let the video file reach its end, then it can't be restarted anymore from MPT. And I have to resynchronize MPT with the video file again and again...

At least, it's what's happening on my newly bought computer, with Vista (I was on XP before)

Can you confirm that ? Or is it my system ?

Thanks again ;-)

Saga Musix

Closed as there are alternatives like mediavst these days.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.