I noticed there's an issue with looping small video files. Magic seems not to display the last couple of frames, thus a perfect loop is no longer perfect. to elaborate i made a little screen capture:
What do you see here: I made a litttle object in blender rotating in a perfect loop (fps= 25, frames= 29), linear motion, the rotation has the same value on frame 0 and 30, exported is only frame 1 to 30). On the right you have the editor view blender, showing the original polygonal object "unrendered". On the top you have the rendered video being played by the windows media player. On the bottom you have vlc doing the same, and on the left you have magic playing the thing in realtime.
Notice how magic and vlc are both looping it incorrectly by swallowing the last couple of frames (also little hickup at the end/beginning with wmp, but at least it shows the hole thing). Any idea why this is happening?
issue with looping small videos
Re: issue with looping small videos
I've actually seen this issue before. When you export from Blender, what codec are you using? It turns out that some codecs don't correctly encode the last few frames of a file. Someone reported this to me when they were using the built-in QuickTime encoder with NodeBox 3.
Can you try using a different codec and see if the issue still happens?
Can you try using a different codec and see if the issue still happens?
Re: issue with looping small videos
wow that was quick .
up there i used the default h264 preset in blender which outputs an avi video which is encoded with h264 i guess.
http://screencast.com/t/W9qBLwUKnqPx
these are the default h264 settings in blender.
exporting it as an mp4 file (no idea what codec it's using, assuming mpeg4 something), seems to almost solve the issue in vlc, but not in magic.
blender is unfortunately a bit dubious in this, as you can sometimes choose container and codec seperately and sometimes not.
quicktime container with both h264 and "mpeg4(divx)" codecs also wont work.
mkv container and h264 codec is also behaving the same way. i assume it has something to do with h264 or similar codecs. i'll be sticking with the mkv from here on.
nice loops-codecs blender is cabable of using:
-flash video
-mpeg2
-mpeg1
-png
The best ones i think are the png and the flashvideo codec, as with mpeg1 and 2 there might still be missing 1 frame (difficult to tell).
stuttering loops-codecs:
-huffYUV
-h.264
-mpeg4(divx)
-theora
blender can do some other codecs, however these have not even worked because of unknown problems or resolution issues.
This solves this issue, i guess. Sorry i think the post got a little long, did test and write simultaneously.
up there i used the default h264 preset in blender which outputs an avi video which is encoded with h264 i guess.
http://screencast.com/t/W9qBLwUKnqPx
these are the default h264 settings in blender.
exporting it as an mp4 file (no idea what codec it's using, assuming mpeg4 something), seems to almost solve the issue in vlc, but not in magic.
blender is unfortunately a bit dubious in this, as you can sometimes choose container and codec seperately and sometimes not.
quicktime container with both h264 and "mpeg4(divx)" codecs also wont work.
mkv container and h264 codec is also behaving the same way. i assume it has something to do with h264 or similar codecs. i'll be sticking with the mkv from here on.
nice loops-codecs blender is cabable of using:
-flash video
-mpeg2
-mpeg1
-png
The best ones i think are the png and the flashvideo codec, as with mpeg1 and 2 there might still be missing 1 frame (difficult to tell).
stuttering loops-codecs:
-huffYUV
-h.264
-mpeg4(divx)
-theora
blender can do some other codecs, however these have not even worked because of unknown problems or resolution issues.
This solves this issue, i guess. Sorry i think the post got a little long, did test and write simultaneously.
Re: issue with looping small videos
Thanks for this. I'll also try to see if there is any room for improvement in the video playback engine.
Re: issue with looping small videos
i have to add something here. of the two "loop-friendly" codecs, the png-video codec seems to produce rather lostless results. i just made a very colourful 4 second 720p clip which got 250mb big. so the flash-video codec seems to be the one to use as it actually compresses the video (ugly though if too much).
this might also have implications when counting on the video-png's ability to render out an alpha channel. the result might get very big. at least when working with blender.
this might also have implications when counting on the video-png's ability to render out an alpha channel. the result might get very big. at least when working with blender.
Re: issue with looping small videos
Thanks. Also, in looking at this topic again, I just want to remind everyone that the speed of the hard drive is a big factor in terms of the amount of stuttering and the quality of seamless looping.
For all video playback I generally recommend a fast hard drive, like an SSD, especially when playing more than one video at a time.
For all video playback I generally recommend a fast hard drive, like an SSD, especially when playing more than one video at a time.
Re: issue with looping small videos
Thanks Eric I remember seeing this discussed and only recently came into the issue again.
So I've also noticed the chopping off the end of short video clips. The clips are always simple graphics - white objects moving on black backgrounds, to be used as masks. Strangely, some of them have chopped ends when playing in magic (but not for example in windows media player), but other clips are fine.
I've tried varying parameters and it does seem a codec issue (i.e. not frame rate, resolution). The clips are ones made in flash, and I export the videos as .avi and codec cinepak by Radius. Strangely, if I take the clip into another program and export the video with another codec, it works the same in magic.
I'll eventually do more tests to try and narrow the problem. If interested (Eric) I could send you the video file and you could see if it does the same for you.
So I've also noticed the chopping off the end of short video clips. The clips are always simple graphics - white objects moving on black backgrounds, to be used as masks. Strangely, some of them have chopped ends when playing in magic (but not for example in windows media player), but other clips are fine.
I've tried varying parameters and it does seem a codec issue (i.e. not frame rate, resolution). The clips are ones made in flash, and I export the videos as .avi and codec cinepak by Radius. Strangely, if I take the clip into another program and export the video with another codec, it works the same in magic.
I'll eventually do more tests to try and narrow the problem. If interested (Eric) I could send you the video file and you could see if it does the same for you.
Re: issue with looping small videos
Sure, please do feel free to send me one or more video files. I'll test them. Maybe just upload them somewhere (Google Drive or something) and give me the download link?
Re: issue with looping small videos
Upon further examination, I discovered that there is indeed a bug with chopping off the last few frames of some video codecs. I think I've fixed it, so I'll put it in the next release (1.64).