In the Documentation of Video
(under Scope, 4th example) a Manipulation
is combined with audio and exported as a file.mp4 video:
m=Manipulate[Plot[Sin[x],{x,0,2Pi},PlotStyle->Hue[h],ImageSize->Medium],{h,0,1},ControlType->None,Paneled->False];
a=ExampleData[{"Audio","Bird"}];
Duration[a]
Export["file.mp4",{"Animation"->m,"Audio"->a},"Rules"];
Video[%]
This example works as advertised. Clicking on the Video icon opens the file.mp4 and plays the video. (The file resides in the home directory.)
However, if one looks closely, one sees that the manipulate is played twice: first forwards, next backwards. While the audio is only played in the forwards section. The audio part is about 1.9 seconds; the video lasts about 4 seconds.
All my attempts to create a video with an audio track which lasts longer than say 2 seconds were defied: the Export
crashes. For example, replace ExampleData[{"Audio","Bird"}]
by ExampleData[{"Audio","Apollo11SmallStep"}]
in the above example.
My aim is to synchronize an animation with audio and export the two as a video file. My question differs (in part) from this one, because I want to add audio.
Any suggestions? Thanks!
(I am using Version 12.1.1, under macOSX Mojave 10.14.6)