Ejemplo n.º 1
0
 def per_frame_probe(self, q_list, q, chunk):
     qfile = chunk.make_q_file(q_list)
     cmd = self.per_frame_probe_cmd(chunk, q, self.encoder, 1, qfile)
     pipe = self.make_pipes(chunk.ffmpeg_gen_cmd, cmd)
     process_pipe(pipe, chunk)
     fl = self.vmaf_runner.call_vmaf(chunk, self.gen_probes_names(chunk, q))
     jsn = VMAF.read_json(fl)
     vmafs = [x['metrics']['vmaf'] for x in jsn['frames']]
     return vmafs
Ejemplo n.º 2
0
def per_frame_probe(q_list, q, chunk, project):
    qfile = chunk.make_q_file(q_list)
    cmd = per_frame_probe_cmd(chunk, q, project.ffmpeg_pipe, project.encoder,
                              1, qfile)
    pipe = make_pipes(chunk.ffmpeg_gen_cmd, cmd)
    process_pipe(pipe, chunk)
    vm = VMAF(n_threads=project.n_threads,
              model=project.vmaf_path,
              res=project.vmaf_res,
              vmaf_filter=project.vmaf_filter)
    fl = vm.call_vmaf(chunk, gen_probes_names(chunk, q))
    jsn = VMAF.read_json(fl)
    vmafs = [x['metrics']['vmaf'] for x in jsn['frames']]
    return vmafs