Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2010-03-13 03:17:52 +0300
committerMatt Ebb <matt@mke3.net>2010-03-13 03:17:52 +0300
commit25a14bad610604040a66ec6f8938069ab77b642d (patch)
tree3d3af454e9b589c75a507a3a89ba5c466d7a0086 /release
parenta4de5e06af1de4d06400a3ef97627b1eb60f8dc5 (diff)
Fix [#21351] PROPERTIES: Resolution changes based solely on changing
encoding format Bypassed existing hardcoded ffmpeg presets that executed when changing format, replaced with bpy presets. Leaving old code there for now, haven't got python/rna access to the ffmpeg id properties.. Anyone know how to do this? Code snippets here: http://www.pasteall.org/11657/c
Diffstat (limited to 'release')
-rw-r--r--release/scripts/presets/ffmpeg/DV.py9
-rw-r--r--release/scripts/presets/ffmpeg/DVD.py18
-rw-r--r--release/scripts/presets/ffmpeg/SVCD.py18
-rw-r--r--release/scripts/presets/ffmpeg/VCD.py18
-rw-r--r--release/scripts/presets/ffmpeg/h264.py16
-rw-r--r--release/scripts/presets/ffmpeg/theora.py16
-rw-r--r--release/scripts/presets/ffmpeg/xvid.py16
-rw-r--r--release/scripts/ui/properties_render.py10
8 files changed, 121 insertions, 0 deletions
diff --git a/release/scripts/presets/ffmpeg/DV.py b/release/scripts/presets/ffmpeg/DV.py
new file mode 100644
index 00000000000..db1bc0fac92
--- /dev/null
+++ b/release/scripts/presets/ffmpeg/DV.py
@@ -0,0 +1,9 @@
+is_ntsc = (bpy.context.scene.render.fps != 25)
+
+bpy.context.scene.render.ffmpeg_format = "DV"
+bpy.context.scene.render.resolution_x = 720
+
+if is_ntsc:
+ bpy.context.scene.render.resolution_y = 480
+else:
+ bpy.context.scene.render.resolution_y = 576
diff --git a/release/scripts/presets/ffmpeg/DVD.py b/release/scripts/presets/ffmpeg/DVD.py
new file mode 100644
index 00000000000..6ac6c3c5ff7
--- /dev/null
+++ b/release/scripts/presets/ffmpeg/DVD.py
@@ -0,0 +1,18 @@
+is_ntsc = (bpy.context.scene.render.fps != 25)
+
+bpy.context.scene.render.ffmpeg_format = "MPEG2"
+bpy.context.scene.render.resolution_x = 720
+
+if is_ntsc:
+ bpy.context.scene.render.resolution_y = 480
+ bpy.context.scene.render.ffmpeg_gopsize = 18
+else:
+ bpy.context.scene.render.resolution_y = 576
+ bpy.context.scene.render.ffmpeg_gopsize = 15
+
+bpy.context.scene.render.ffmpeg_video_bitrate = 6000
+bpy.context.scene.render.ffmpeg_maxrate = 9000
+bpy.context.scene.render.ffmpeg_minrate = 0
+bpy.context.scene.render.ffmpeg_buffersize = 224*8
+bpy.context.scene.render.ffmpeg_packetsize = 2048
+bpy.context.scene.render.ffmpeg_muxrate = 10080000 \ No newline at end of file
diff --git a/release/scripts/presets/ffmpeg/SVCD.py b/release/scripts/presets/ffmpeg/SVCD.py
new file mode 100644
index 00000000000..1d8752f02d9
--- /dev/null
+++ b/release/scripts/presets/ffmpeg/SVCD.py
@@ -0,0 +1,18 @@
+is_ntsc = (bpy.context.scene.render.fps != 25)
+
+bpy.context.scene.render.ffmpeg_format = "MPEG2"
+bpy.context.scene.render.resolution_x = 480
+
+if is_ntsc:
+ bpy.context.scene.render.resolution_y = 480
+ bpy.context.scene.render.ffmpeg_gopsize = 18
+else:
+ bpy.context.scene.render.resolution_y = 576
+ bpy.context.scene.render.ffmpeg_gopsize = 15
+
+bpy.context.scene.render.ffmpeg_video_bitrate = 2040
+bpy.context.scene.render.ffmpeg_maxrate = 2516
+bpy.context.scene.render.ffmpeg_minrate = 0
+bpy.context.scene.render.ffmpeg_buffersize = 224*8
+bpy.context.scene.render.ffmpeg_packetsize = 2324
+bpy.context.scene.render.ffmpeg_muxrate = 0 \ No newline at end of file
diff --git a/release/scripts/presets/ffmpeg/VCD.py b/release/scripts/presets/ffmpeg/VCD.py
new file mode 100644
index 00000000000..303fd85eefb
--- /dev/null
+++ b/release/scripts/presets/ffmpeg/VCD.py
@@ -0,0 +1,18 @@
+is_ntsc = (bpy.context.scene.render.fps != 25)
+
+bpy.context.scene.render.ffmpeg_format = "MPEG1"
+bpy.context.scene.render.resolution_x = 352
+
+if is_ntsc:
+ bpy.context.scene.render.resolution_y = 240
+ bpy.context.scene.render.ffmpeg_gopsize = 18
+else:
+ bpy.context.scene.render.resolution_y = 288
+ bpy.context.scene.render.ffmpeg_gopsize = 15
+
+bpy.context.scene.render.ffmpeg_video_bitrate = 1150
+bpy.context.scene.render.ffmpeg_maxrate = 1150
+bpy.context.scene.render.ffmpeg_minrate = 1150
+bpy.context.scene.render.ffmpeg_buffersize = 40*8
+bpy.context.scene.render.ffmpeg_packetsize = 2324
+bpy.context.scene.render.ffmpeg_muxrate = 2352 * 75 * 8 \ No newline at end of file
diff --git a/release/scripts/presets/ffmpeg/h264.py b/release/scripts/presets/ffmpeg/h264.py
new file mode 100644
index 00000000000..e46dcd46176
--- /dev/null
+++ b/release/scripts/presets/ffmpeg/h264.py
@@ -0,0 +1,16 @@
+is_ntsc = (bpy.context.scene.render.fps != 25)
+
+bpy.context.scene.render.ffmpeg_format = "H264"
+bpy.context.scene.render.ffmpeg_codec = "H264"
+
+if is_ntsc:
+ bpy.context.scene.render.ffmpeg_gopsize = 18
+else:
+ bpy.context.scene.render.ffmpeg_gopsize = 15
+
+bpy.context.scene.render.ffmpeg_video_bitrate = 6000
+bpy.context.scene.render.ffmpeg_maxrate = 9000
+bpy.context.scene.render.ffmpeg_minrate = 0
+bpy.context.scene.render.ffmpeg_buffersize = 224*8
+bpy.context.scene.render.ffmpeg_packetsize = 2048
+bpy.context.scene.render.ffmpeg_muxrate = 10080000 \ No newline at end of file
diff --git a/release/scripts/presets/ffmpeg/theora.py b/release/scripts/presets/ffmpeg/theora.py
new file mode 100644
index 00000000000..bb84d977da3
--- /dev/null
+++ b/release/scripts/presets/ffmpeg/theora.py
@@ -0,0 +1,16 @@
+is_ntsc = (bpy.context.scene.render.fps != 25)
+
+bpy.context.scene.render.ffmpeg_format = "OGG"
+bpy.context.scene.render.ffmpeg_codec = "THEORA"
+
+if is_ntsc:
+ bpy.context.scene.render.ffmpeg_gopsize = 18
+else:
+ bpy.context.scene.render.ffmpeg_gopsize = 15
+
+bpy.context.scene.render.ffmpeg_video_bitrate = 6000
+bpy.context.scene.render.ffmpeg_maxrate = 9000
+bpy.context.scene.render.ffmpeg_minrate = 0
+bpy.context.scene.render.ffmpeg_buffersize = 224*8
+bpy.context.scene.render.ffmpeg_packetsize = 2048
+bpy.context.scene.render.ffmpeg_muxrate = 10080000 \ No newline at end of file
diff --git a/release/scripts/presets/ffmpeg/xvid.py b/release/scripts/presets/ffmpeg/xvid.py
new file mode 100644
index 00000000000..c0f5a3adb10
--- /dev/null
+++ b/release/scripts/presets/ffmpeg/xvid.py
@@ -0,0 +1,16 @@
+is_ntsc = (bpy.context.scene.render.fps != 25)
+
+bpy.context.scene.render.ffmpeg_format = "AVI"
+bpy.context.scene.render.ffmpeg_codec = "XVID"
+
+if is_ntsc:
+ bpy.context.scene.render.ffmpeg_gopsize = 18
+else:
+ bpy.context.scene.render.ffmpeg_gopsize = 15
+
+bpy.context.scene.render.ffmpeg_video_bitrate = 6000
+bpy.context.scene.render.ffmpeg_maxrate = 9000
+bpy.context.scene.render.ffmpeg_minrate = 0
+bpy.context.scene.render.ffmpeg_buffersize = 224*8
+bpy.context.scene.render.ffmpeg_packetsize = 2048
+bpy.context.scene.render.ffmpeg_muxrate = 10080000 \ No newline at end of file
diff --git a/release/scripts/ui/properties_render.py b/release/scripts/ui/properties_render.py
index a0992251f76..23dc434ae38 100644
--- a/release/scripts/ui/properties_render.py
+++ b/release/scripts/ui/properties_render.py
@@ -29,6 +29,13 @@ class RENDER_MT_presets(bpy.types.Menu):
draw = bpy.types.Menu.draw_preset
+class RENDER_MT_ffmpeg_presets(bpy.types.Menu):
+ bl_label = "FFMPEG Presets"
+ preset_subdir = "ffmpeg"
+ preset_operator = "script.python_file_run"
+ draw = bpy.types.Menu.draw_preset
+
+
class RenderButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -379,6 +386,8 @@ class RENDER_PT_encoding(RenderButtonsPanel):
rd = context.scene.render
wide_ui = context.region.width > narrowui
+ layout.menu("RENDER_MT_ffmpeg_presets", text="Presets")
+
split = layout.split()
col = split.column()
@@ -627,6 +636,7 @@ class RENDER_PT_bake(RenderButtonsPanel):
classes = [
RENDER_MT_presets,
+ RENDER_MT_ffmpeg_presets,
RENDER_PT_render,
RENDER_PT_layers,
RENDER_PT_dimensions,