Anyway to play BGM and a movie at the same time?

so i had made a small movie that has no audio with the intention to play and sync the BGM after a specific moment in the video, problem seems to be that i can never seem to get them to play at the same time.

tried a few methods, last thing i did is having 2 common events that attempt to activate at the same time but it seems that the movie always plays first and it just ignores the instruction of playing the audio, or it seems to take priority.
1718817720664.png
1718817740561.png

likewise i tried to do it inverse with the music playing first but it makes the video not play, anyway to make the bgm play during the movie?
i tried to do it inverse with the music playing first but it makes the video not play
How exactly did you do that? It should just work if you have a BGM command, and then a movie command right after it.
How exactly did you do that? It should just work if you have a BGM command, and then a movie command right after it.
oh i activated the audio common event first then the movie event, though now i realize thats why it prolly caused it to get stuck since i tried in parallel and automatic processess
you can only have one autorun active at any time, all other autoruns will have to wait until the first autorun is solved and deactivated.

only parallel processes can run at the same time, and even then you can cause timing problems depending on how you tried to get them to work.

and why using common events at all - have you tried to simply start the BGM and then start the video in a single action button event on map?

That said, the best way to sync audio and video is to include the audio inside the video with a video-editing software. everything else has always a chance to desync due to the way commands are processed.
you can only have one autorun active at any time, all other autoruns will have to wait until the first autorun is solved and deactivated.

only parallel processes can run at the same time, and even then you can cause timing problems depending on how you tried to get them to work.

and why using common events at all - have you tried to simply start the BGM and then start the video in a single action button event on map?

That said, the best way to sync audio and video is to include the audio inside the video with a video-editing software. everything else has always a chance to desync due to the way commands are processed.
problem is that i wanted the video to smoothly transition into gameplay so the music continues normally and doesnt just get cut off suddenly and starts again

playing it first doesnt sync it properly with the cutscene unless i add like 8 secs of silence to the music, wich i wouldnt want because then you'd be hearing the 8 seconds of silence each time it loops,

another idea i had was cutting the music so the appropiate part starts when the video ends but now the song doesnt loop properly since its cut and id have find a way so it changes to the proper song without it being noticable wich seems difficult or just a headache cuz then you'd have to do another event that calculates the proper timing so it changes smoothly and so and so.

i just kinda wanna save myself a headache cuz i spent 2 days animating the cutscene with the idea id just play the bgm at some point and it would work, supose i should have tested it earlier at some point cuz i just expected to include like a wait x frames and then play the music and itd work
Syncronising that closely is extremely difficult in an interpreted engine like the RM's.

Personally I wouldn't even try it outside a compiled engine, which cannot be done with any of the RM's.

Your main problem will be that different computers have different processing reserves, and that is almost guaranteed to cause differences in timing unless all computers have really big excess reserves (which you can't guarantee because other background programs draw on the same total, and some players have practically overloaded their computers with background functions)

So while you might be able to sync on your own computer with a lot of testing, that sync will not work for significantly different computers.
playing it first doesnt sync it properly with the cutscene unless i add like 8 secs of silence to the music, wich i wouldnt want because then you'd be hearing the 8 seconds of silence each time it loops,
You can actually add the silence and then use the file's metadata to say that the loop starts 8 seconds after the song starts. I use audacity to set the LOOPSTART and LOOPLENGTH and the engine does the rest and loops correctly
You can actually add the silence and then use the file's metadata to say that the loop starts 8 seconds after the song starts. I use audacity to set the LOOPSTART and LOOPLENGTH and the engine does the rest and loops correctly
oh ididnt know you could do that, ill give it a try
You can actually add the silence and then use the file's metadata to say that the loop starts 8 seconds after the song starts. I use audacity to set the LOOPSTART and LOOPLENGTH and the engine does the rest and loops correctly
this worked, thank you!

ill be able to use this for future cutscenes now.

Original thread: https://forums.rpgmakerweb.com/threads/anyway-to-play-bgm-and-a-movie-at-the-same-time.169629/