Please forgive me if my formatting is incorrect in any way. This is the first time I am posting in this forum like this.
So, I have generated a bunch of png files for some scientific visualization I am doing. Long story short, I need to combine all these files together into a single .mp4 video. I can render the movie just fine into a .avi file (the commented out lines in the following code snippet), but that is not playable on my avisor’s mac and doesn’t allow proper skipping when the video is playing If you would like to look at the full code, check out the following github directory: https://github.com/caleblevy/Render_Modules . The offending section is at the very end of denssetup.py:
def Render_Movie(pngdirectory, fps, iteration, title): print("rendering movie") scene = bpy.context.scene scene.sequence_editor_create() Add_Image_Strip_Dens(pngdirectory) bpy.data.scenes["Scene"].render.ffmpeg.format = 'MPEG4' bpy.data.scenes["Scene"].render.ffmpeg.audio_codec = 'NONE' bpy.data.scenes["Scene"].render.ffmpeg.video_bitrate = 24300 bpy.data.scenes["Scene"].render.ffmpeg.audio_bitrate = 0 bpy.data.scenes["Scene"].render.ffmpeg.minrate = 0 bpy.data.scenes["Scene"].render.ffmpeg.maxrate = 30000 bpy.data.scenes["Scene"].render.ffmpeg.buffersize = 2000000 bpy.data.scenes["Scene"].render.ffmpeg.codec = 'MPEG4' bpy.data.scenes["Scene"].render.image_settings.file_format = 'FFMPEG' bpy.data.scenes["Scene"].render.filepath = "test.mp4" bpy.data.scenes['Scene'].render.fps = fps #bpy.data.scenes["Scene"].render.image_settings.file_format = 'AVI_JPEG' #bpy.data.scenes["Scene"].render.filepath = "test.avi" bpy.ops.render.render( animation=True )
This is called in CreateDens.py like so:
Render_Movie("DENS_DATA/images/", .1, iteration, "TFMD Density")
I run blender like so:
blender -b -P CreateDens.py
and receive the following error:
Traceback (most recent call last): File "/home/james/programming/visualization/git/Render_Modules/RM.py", line 19, in <module> Render_Movie("DENS_DATA/images/", 1, iteration, "TFMD Density") File "/home/james/programming/visualization/git/Render_Modules/denssetup.py", line 671, in Render_Movie bpy.ops.render.render( animation=True ) File "/usr/share/blender/2.71/scripts/modules/bpy/ops.py", line 188, in __call__ ret = op_call(self.idname_py(), None, kw) RuntimeError: Error: VBV buffer too small for bitrate Blender quit
I played with a bunch of settings and couldn’t get everything to work out. I would very much appreciate any feedback you can offer!
Also, please let me know if you need any more information.
UPDATE: After changing the FPS from .1 to 10, the video rendered, but for some reason, it rendered as “test.mp40001-0012.dvd.” I have to copy it to “test.mp4” to play it.