From: yomguy Date: Tue, 20 Jul 2010 14:58:24 +0000 (+0000) Subject: add watermarking (need ffmpeg vhook modules) X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=f9c84c671edf0380615cb77d5f16d57815ac2f4c;p=tools.git add watermarking (need ffmpeg vhook modules) git-svn-id: http://svn.parisson.org/svn/tools/trunk@104 457c0346-1240-4656-8a5a-9edca8063506 --- diff --git a/isp_tools/isp_trans.py b/isp_tools/isp_trans.py index 417b682..899a7a1 100644 --- a/isp_tools/isp_trans.py +++ b/isp_tools/isp_trans.py @@ -1,4 +1,4 @@ -#!/usr/bin/python + #!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2009-2010 Guillaume Pellerin @@ -138,9 +138,13 @@ class ISPTrans(object): self.logger.write_info('ffmpeg', mess) def transcode_command(self, source_file, start_time, duration, dest_file): - command = 'ffmpeg -ss %s -t %s -i %s -f %s -s %s -vb %s -ab %s -ar %s -async %s -y %s' \ - % (start_time, duration, source_file, self.format, self.size, self.vb, self.ab, self.ar, self.async, dest_file) - return command + # logo inlay + #command = 'ffmpeg -ss %s -t %s -i %s -vhook "/usr/lib/i686/cmov/vhook/imlib2.so -x 517 -y 516 -i /home/isp/img/parisson.png" -f %s -s %s -vb %s -acodec libmp3lame -ab %s -ar %s -async %s -y %s' % (start_time, duration, source_file, self.format, self.size, self.vb, self.ab, self.ar, self.async, dest_file) + + # logo watermark + command = 'ffmpeg -ss %s -t %s -i %s -vhook "/usr/lib/i686/cmov/vhook/watermark.so -f /home/isp/img/parisson_480_g.gif" -f %s -s %s -vb %s -acodec libmp3lame -ab %s -ar %s -async %s -y %s' % (start_time, duration, source_file, self.format, self.size, self.vb, self.ab, self.ar, self.async, dest_file) + + return command def process(self): for source in self.trans_dict.iteritems(): diff --git a/isp_tools/parisson.png b/isp_tools/parisson.png new file mode 100644 index 0000000..027ed58 Binary files /dev/null and b/isp_tools/parisson.png differ diff --git a/isp_tools/parisson_480_g.gif b/isp_tools/parisson_480_g.gif new file mode 100644 index 0000000..7df20d1 Binary files /dev/null and b/isp_tools/parisson_480_g.gif differ