[gnome-getting-started-docs] allow to pass size and bitrate
- From: Jakub Steiner <jimmac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-getting-started-docs] allow to pass size and bitrate
- Date: Mon, 13 May 2013 15:26:52 +0000 (UTC)
commit 2e9e980f08395463f69cae8414b70f0a760dcc3d
Author: Jakub Steiner <jimmac gmail com>
Date: Tue May 7 17:56:07 2013 +0200
allow to pass size and bitrate
+ layer glitch fix for switching tasks
animation/gnome-task-switching.blend | Bin 2999972 -> 3030108 bytes
animation/gnome-yelp-intro.py | 2 +-
animation/gnomerender.py | 5 ++---
3 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/animation/gnome-task-switching.blend b/animation/gnome-task-switching.blend
index 9046be3..5e34c98 100644
Binary files a/animation/gnome-task-switching.blend and b/animation/gnome-task-switching.blend differ
diff --git a/animation/gnome-yelp-intro.py b/animation/gnome-yelp-intro.py
index e9e07ee..85bc942 100644
--- a/animation/gnome-yelp-intro.py
+++ b/animation/gnome-yelp-intro.py
@@ -18,7 +18,7 @@ def main():
bpy.data.objects[textobj.get('id')].data.body = textobj.text
bpy.data.objects['typewriter'].data.body = t[lang].find('t[ id="search"]').text
gnomerender.render(lang)
- gnomerender.transcode(lang)
+ gnomerender.transcode(lang,1280,"500k")
if __name__ == '__main__':
main()
diff --git a/animation/gnomerender.py b/animation/gnomerender.py
index 853ff7b..dc7fd1a 100644
--- a/animation/gnomerender.py
+++ b/animation/gnomerender.py
@@ -21,18 +21,17 @@ def render(lang):
else:
print('already rendered',bpy.context.scene.render.frame_path())
-def transcode(lang):
+def transcode(lang,x=854,bitrate="300k"):
global renderpath,renderpathabs,sndfile
regexobj = re.search(r"^(.*\/)*(.*)(\.blend)$", bpy.data.filepath)
framepath = renderpathabs
webmfile = "%s.webm" % (regexobj.group(2))
transcodepath = "../gnome-help/%s/figures/" % (lang)
- x = 854 #output width
y = round(x/(1280/720))
#print(transcodepath,webmfile,sndfile,framepath)
- transcodecmd = "ffmpeg -r 24 -f image2 -i %s/%%04d.png -i %s -vf scale=%s:%s -b 300k %s/%s" %
(framepath,sndfile,x,y,transcodepath,webmfile)
+ transcodecmd = "ffmpeg -r 24 -f image2 -i %s/%%04d.png -i %s -vf scale=%s:%s -b %s %s/%s" %
(framepath,sndfile,x,y,bitrate,transcodepath,webmfile)
#transcodecmd = "gst-launch-1.0 webmmux name=mux ! filesink location=\"%s/%s\" file://%s ! decodebin !
audioconvert ! vorbisenc bitrate=96000 ! mux. multifilesrc location=\"%s/%%04d.png\" index=1
caps=\"image/png,framerate=\(fraction\)24/1\" ! pngdec ! videoconvert ! videoscale ! video/x-raw,
width=%s,height=%s ! videorate ! vp8enc threads=12 target-bitrate=300000 ! mux." %
(transcodepath,webmfile,sndfile,framepath,x,y)
if (not os.path.isfile(transcodepath+webmfile)):
os.system(transcodecmd)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]