When I animate a walking motion in OpenSim 3.3 and then click on the Movie icon to export a movie as a .avi file, OpenSim 3.3 exports the movie, but then when I play it back on my Mac, the total time is 0 seconds.
I have to go back to OpenSim 3.01 to be able to export movies that play back with non-zero total time.
I am running OpenSim (multiple versions) on Windows 7 through Parallels on a Macbook Pro.
Any thoughts on why OpenSim 3.3 and versions after 3.01 export movies lasting 0 seconds?
Thanks!
B.J.
Movies Exported from OpenSim 3.3 Take 0 Time
- B.J. Fregly
- Posts: 51
- Joined: Wed Mar 12, 2008 6:55 am
- Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Movies Exported from OpenSim 3.3 Take 0 Time
Hi B.J.,
The story is a bit more complicated, as described here
http://simtk-confluence.stanford.edu:80 ... ing+Movies
The summary is that 32 bit versions will always export movies, while 64 bit versions can export a sequence of snapshots that you'll need to use a third party tool to make a movie (as a workaround).
Please let us know if that's different from the behavior you're observing.
Best regards,
-Ayman
The story is a bit more complicated, as described here
http://simtk-confluence.stanford.edu:80 ... ing+Movies
The summary is that 32 bit versions will always export movies, while 64 bit versions can export a sequence of snapshots that you'll need to use a third party tool to make a movie (as a workaround).
Please let us know if that's different from the behavior you're observing.
Best regards,
-Ayman
Re: Movies Exported from OpenSim 3.3 Take 0 Time
Hi Ayman,
Thank you so much. I was having this problem and I used a third party screen capture application to record the simulation videos. I didn't know about the movie frame capture method.
Thanks
Vishal
Thank you so much. I was having this problem and I used a third party screen capture application to record the simulation videos. I didn't know about the movie frame capture method.
Thanks
Vishal
- B.J. Fregly
- Posts: 51
- Joined: Wed Mar 12, 2008 6:55 am
Re: Movies Exported from OpenSim 3.3 Take 0 Time
Hi Dr. Habib,
Great! Makes total sense now.
Somehow I missed the OpenSim documentation explaining the issue with making movies in 64-bit OpenSim.
I'll install 32-bit OpenSim as well just for making movies in the future. It's good to know about the individual frame export option as well for 64-bit OpenSim.
Thanks for your help!
B.J.
Great! Makes total sense now.
Somehow I missed the OpenSim documentation explaining the issue with making movies in 64-bit OpenSim.
I'll install 32-bit OpenSim as well just for making movies in the future. It's good to know about the individual frame export option as well for 64-bit OpenSim.
Thanks for your help!
B.J.
- Brad Humphreys
- Posts: 79
- Joined: Thu Feb 03, 2011 11:32 am
Re: Movies Exported from OpenSim 3.3 Take 0 Time
Here is some example MATLAB code (I use in a function) to fix the movies produced by OpenSim 64bit. Give it the filename to read, a new filename, and the desired length of the movie.
Code: Select all
filenameIn='test.avi'; %Movie to be read
filenameOut='testNew.avi'; %New filename
desiredDur=1; %Desire Duration in Seconds
mInfo=VideoReader(filenameIn);
fps=mInfo.NumberOfFrames/desiredDur;
vid = VideoReader(filenameIn);
writerObj = VideoWriter(filenameOut);
writerObj.FrameRate = fps;
open(writerObj);
nFrames = vid.NumberOfFrames;
vidHeight = vid.Height;
vidWidth = vid.Width;
mov(1:nFrames) = struct('cdata', zeros(vidHeight, vidWidth, 3, 'uint8'),'colormap', []);
for k = 1 : nFrames
mov(k).cdata = read(vid, k);
writeVideo(writerObj, mov(k).cdata);
end
close(writerObj);
- Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Movies Exported from OpenSim 3.3 Take 0 Time
Brad,
Thanks much for sharing this code, I'm sure it'll come in handy for many of our users on 64 bit machines.
Best regards,
-Ayman
Thanks much for sharing this code, I'm sure it'll come in handy for many of our users on 64 bit machines.
Best regards,
-Ayman