Message Boards Message Boards

Can I create a movie file including synchronized sound?


more than two years ago, Andrew Moylan posted a blog on how to create (silent) movie files using Mathematica

I am wondering if there is a way to include synchronized sound?

POSTED BY: Frank Scherbaum
3 Replies

A lot has happened in 8 years. But now it is easy to use VideoCombine, and plug in various Audio and Video objects in it to get a combined video with synchronised audio.

POSTED BY: Sander Huisman
I am using Mathematica to generate  a movie which shows  a cursor  moving across a  spectrogram. I want to combine this with the sound trace from which the spectrogram was calculated such that the cursor is always at the position of the playhead of the sound  (see also my question:  Therefore the non-synchronisity of EmitSound[] and Animate[] is a problem. Using an external program (e.g. quicktime pro) works but requires lots of interaction which becomes problematic for the number of movies I want to generate. I had hoped that some (even undocumented) feature in exporting a video would allow to combine a video track with a audio track. 
POSTED BY: Frank Scherbaum
Are you looking to export a movie including sound? Or are you looking to play an animation and sync a sound to it in Mathematica?

I am not aware of a video format that Mathematica can export sound with and don't see it in the documentation. 

I'm sure you could sync an animation and sound expression together programmatically. That said, Mathematica isn't a replacement for a movie editor where this would be easier.  Here's a simple but not very good example.
       EmitSound[Play[Sin[1000 t^2], {t, 0, 1}]];
       CellPrint@ Animate[Plot[Sin[x + a], {x, 0, 10}], {a, 0, 5}, AnimationRunning -> True]
The example above essentially relies on the fact that EmitSound and CellPrint will run effectively simultaneously for the most part, which isn't necessarily the case. 
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract