'Opens the file, creates the pipe.'

def initialize(self, starttime=0):

    self.close_proc()
    if (starttime != 0):
        offset = min(1, starttime)
        i_arg = ['-ss', ('%.05f' % (starttime - offset)), '-i', self.filename, '-vn', '-ss', ('%.05f' % offset)]
    else:
        i_arg = ['-i', self.filename, '-vn']
    cmd = (([get_setting('FFMPEG_BINARY')] + i_arg) + ['-loglevel', 'error', '-f', self.f, '-acodec', self.acodec, '-ar', ('%d' % self.fps), '-ac', ('%d' % self.nchannels), '-'])
    popen_params = {'bufsize': self.buffersize, 'stdout': sp.PIPE, 'stderr': sp.PIPE, 'stdin': DEVNULL}
    if (os.name == 'nt'):
        popen_params['creationflags'] = 134217728
    self.proc = sp.Popen(cmd, **popen_params)
    self.pos = np.round((self.fps * starttime))
