示例#1
0
 def which_method(self, config):
     if config['compress']['type'] == "ffmpeg":
         return ffmpeg.FFmpeg(config['debug'], config['silent'])
     else:
         return handbrake.HandBrake(config['debug'],
                                    config['compress']['compressionPath'],
                                    config['silent'])
示例#2
0
 def __init__(self,
              path,
              temp=os.getcwd() + '/data/tmpcsv/',
              path2script='C:/R/spectr.R'):
     self.path = path
     self.temp = os.getcwd() + temp
     self.path2script = path2script
     self.ff = ffmpeg.FFmpeg(self.path)
示例#3
0
    def test_cut_no_duration(self):
        filename = self.video_name
        output = 'test.opus'
        start = '00:10:20'

        ff = ffmpeg.FFmpeg()
        ret = ff.extract(filename, start, None, output)
        self.assertEqual(ret.returncode, 0)
        os.remove(output)