I'm tying to export a table of images to a quicktime movie with a set duration (in this example, 12.67 seconds)
atable = Table[
Show[
ListLinePlot[{dataSet[[a ;; a + w]], filtered[[a ;; a + w]]},
PlotRange -> {-3, 3}],
Graphics[{Red, PointSize[Medium],
Point[dataSet[[Round[a + w/2]]]]}]
],
{a, 1, Length[dataSet] - w - (Length[dataSet] - Length[filtered]),
1}];
I first tried setting the "Duration" to 12.67 seconds, and got a 1:05 video instead:
Export["~/Desktop/tableAnimation.mov", atable, "QuickTime", "Duration" -> duration]
(Here duration
is 12.6)
Then I realised Export aways set a default framerate of 15 FPS (with 979 frames, 15FPS -> 65 seconds)
So i tried t set the framerate to 979/12.675:
Export["~/Desktop/tableAnimation.mov", atable, "QuickTime", "FrameRate" -> (Length[atable]/duration)]
But I always get an 11 second video (85.71 FPS instead of about 77FPS)
Note that when I set the framerate to 30 (just for a test) I actually did get a 30 FPS video
Why aren't I getting the framerate I am asking for ?
Thank you
Complete code below :
filtered = aYFilteredPlotData;
raw = accYPlotData;
startTime = accT[[1]];
endTime = Last[accT];
duration = endTime - startTime;
w = 300;
frames = Table[
Show[
ListLinePlot[{raw[[a ;; a + w]], filtered[[a ;; a + w]]},
PlotRange -> {-3, 3}],
Graphics[{Red, PointSize[Medium], Point[raw[[Round[a + w/2]]]]}]
],
{a, 1, Length[raw] - w - (Length[raw] - Length[filtered]), 1}];
Export["~/Desktop/tableAnimation.mov", frames, "QuickTime",
"FrameRate" -> (Length[frames]/duration)]
Where:
raw
and filtered
are the datasets being plotted (a collection of {x,y} values)
They are accelerometer data and their timestamps I use the first and last timestamps to calculate duration and framerate
"FrameRate" -> (Length[atable]/duration)]
. So unfortunately I cannot reproduce the issue. What OS and Mathematica version do you use? $\endgroup$PadRight::normal: Nonatomic expression expected at position 1 in PadRight[0.0129468,979,0.0129468]. >>
(Note that the frame duration here is 0.0129468) $\endgroup$