2 #Copyright 2009 Paul Hänsch
4 #This file is part of Viper.
6 #Viper is free software: you can redistribute it and/or modify
7 #it under the terms of the GNU General Public License as published by
8 #the Free Software Foundation, either version 3 of the License, or
9 #(at your option) any later version.
11 #Viper is distributed in the hope that it will be useful,
12 #but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 #GNU General Public License for more details.
16 #You should have received a copy of the GNU General Public License
17 #along with Viper. If not, see <http://www.gnu.org/licenses/>
21 class V_Ffv1(V_Plugin):
22 def build_dialog(self):
23 self.subgets['desc'] = Label(self, text =
24 'FFV1 is the lossless codec of the ffmpeg project.\n' +
25 'It compresses video data down to approximately 10% of ' +
27 self.subgets['desc'].pack(side = TOP, expand = True, fill = BOTH)
33 return ['-ovc', 'lavc', '-lavcopts', 'vcodec=ffv1']
35 def is_available(self):
37 slave = os.popen2(['mencoder', '-ovc', 'help'])
40 line = slave[1].readline()
41 if line.lstrip().find('lavc') == 0:
45 class V_FfvHuff(V_Plugin):
46 def build_dialog(self):
47 self.subgets['desc'] = Label(self, text =
48 'Non standard modification of HuffYUV.\n' +
49 'About 20% smaller than HuffYUV.')
50 self.subgets['desc'].pack(side = TOP, expand = True, fill = BOTH)
56 return ['-ovc', 'lavc', '-lavcopts', 'vcodec=ffvhuff']
58 def is_available(self):
60 slave = os.popen2(['mencoder', '-ovc', 'help'])
63 line = slave[1].readline()
64 if line.lstrip().find('lavc') == 0:
68 class V_HuffYUV(V_Plugin):
69 def build_dialog(self):
70 self.subgets['desc'] = Label(self, text =
71 'Classical lossless HuffYUV codec.')
72 self.subgets['desc'].pack(side = TOP, expand = True, fill = BOTH)
78 return ['-ovc', 'lavc', '-lavcopts', 'vcodec=huffyuv']
80 def is_available(self):
82 slave = os.popen2(['mencoder', '-ovc', 'help'])
85 line = slave[1].readline()
86 if line.lstrip().find('lavc') == 0:
90 class V_LLSnow(V_Plugin):
91 def build_dialog(self):
92 self.subgets['desc'] = Label(self, text =
93 'Experimental wavelet based FFMPEG codec.\n' +
94 'This is the lossless version.')
95 self.subgets['desc'].pack(side = TOP, expand = True, fill = BOTH)
98 return 'Lossless Snow'
100 def subcommand(self):
101 return ['-ovc', 'lavc', '-lavcopts', 'vcodec=snow:vqscale=0']
103 def is_available(self):
105 slave = os.popen2(['mencoder', '-ovc', 'help'])
108 line = slave[1].readline()
109 if line.lstrip().find('lavc') == 0:
113 class V_Ljpeg(V_Plugin):
114 def build_dialog(self):
115 self.subgets['desc'] = Label(self, text = 'Lossless JPEG sequence.\n' +
116 'Compresses video data down to approximately 20% of '+
118 self.subgets['desc'].pack(side = TOP, expand = True, fill = BOTH)
121 return 'Lossless JPEG'
123 def subcommand(self):
124 return ['-ovc', 'lavc', '-lavcopts', 'vcodec=ljpeg']
126 def is_available(self):
128 slave = os.popen2(['mencoder', '-ovc', 'help'])
131 line = slave[1].readline()
132 if line.lstrip().find('lavc') == 0: