Hi,
more than two years ago, Andrew Moylan posted a blog on how to create (silent) movie files using Mathematica
Mathematica Q&A: Creating Movie Files—Wolfram Blog.
I am wondering if there is a way to include synchronized sound?
Frank
Hi,
more than two years ago, Andrew Moylan posted a blog on how to create (silent) movie files using Mathematica
Mathematica Q&A: Creating Movie Files—Wolfram Blog.
I am wondering if there is a way to include synchronized sound?
Frank
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.
Button["Test",
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.
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: Can I display the position of what I hear using EmitSound[] ? ). 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.
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.