|
|||||||
![]() |
|
|
Thread Tools |
|
|||
|
I recorded an .avi file from my game (engine dumps video and sounds into uncompressed AVI file). After I brought it into Blender (Sequencer), audio track turned out to be shorter than video track. If I recode it and save it, video will be out of sync with audio. At the same time, if I use VirtualDub for the same purpose, output file is fine and in sync.
The thing is that I need to edit video and not just recode it. Why does it happen in Blender? How to fix it? Thank you. |
|||
|
#1
|
|||
|
|
|
|||
|
It seems like a fps issue in the avi you bring into blender. Well not that there is anything wrong with it but it is not blender friendly.
First question: Does the FPS setting under the format tab of the Render buttons panel match the source fps? Second Question is your source NTSC format? I use Fraps to record from games and other programs like wowmodelviewer. Sounds like perhaps you are doing something similar. The first thing I learned in working with fraps is that avi's vary greatly. Even though fraps outputs to a raw avi format it still needs the fraps codec to decode properly. (Note encoded is not the same as compressed.) Thus blender 2.46 adm 2.47 rc1 crash when i try to load them directly. So in order to work with it in blender I first convert the video to another avi using Mencoder (an encoder included in Mplayer). Here's the thing NTSC runs at 29.97. 29.97 is the default under the custom fps option in fraps. However despite the NTSC heading in the render buttons format tab, blender does not have a 29.97 fps option. I'm not sure why blender does not support 29.97 I just know that it doesn't. This leaves us importing into blender and setting the fps to 29 or 30. Neither one will work, both will result in an offset / out of sync audio. In the case of 29 its a very significant offset. The 30 option although 0.03 does not seem like much it adds up quickly to create a significant offset. So basically the interleave is screwed when you import. If the video is longer than the audio its probably 29.97 imported and running at 30. Changing the fps won't affect the audio since audio doesn't have frames so to speak. Just like if i wanted to mak a 30 fps run at half speed I would set the render fps to 60. Importing 29.97 at 30 will effectively slow down the video, resulting in an extended video length but audio playing in sync with the faster 29.97fps from the source. Why does it work fine on virtualdub and not blender? Well if it is a NTsc format either out of the capture program or as the result of a conversion, then it would likely work with VirtualDub, AvideMux, cinelerra and other editors, originally developed for and on a linux/posix kernel, all support and in most cases default to NTSC and 29.97fps. This is because NTSC 29.97fps is a standard in europe where linux is more widely used and many open source apps get their start. How to fix it? Well you will have to work with the raw, unless you want to rewrite your own blender distro. There maybe scripts or plugins that work around this issue, allowing for a 29.97 frame rate but I have not seen any. Option 1: I cant remember where but someone on this forum has posted instructions/tutorial for importing the video converting to a sequence then tweaking it and exporting back to video which can then be resync'd with the audio. I can't really elaborate cause I don't use this process. But if you search In the Composition, Visual Effects & Rendering forums you can find out more about this option. Option 2: Simply use a converter to convert the avi to 30 fps, this is what I do for a number of reasons. Mainly so that I have a format that I can use either in blender or Cinelerra, the later of which cannot work with the fraps raws at all. Also this does not require you to use compression at all its simply putting it into another encoding format. In other words you can do a lossless conversion and still be able to use it in blender. As far as editing and not just recoding, I'm not sure I follow. One does not preclude the other. You could recode then edit or you can edit then recode. The operations are not exclusive. Option 3: Start over with the capture program and record at 30 fps. Which may not be the option if the footage was live. I maybe totally off here but it seems like what you have run into. I'm fairly new to using blender in this capacity myself. |
|||
|
#2
|
|
|||
|
#3
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|