old_contents: import subprocess
  import sys
  
  def make_mediainfo(xmlfilename, xmlvariable, inputfilename):
    with open(xmlfilename, "w+") as fo:
    	xmlvariable = subprocess.check_output(['mediainfo',
    						'-f',
    						'--language=raw', # Use verbose output.
    						'--output=XML',
    						inputfilename])       #input filename
    	fo.write(xmlvariable)
  
  
  def make_qctools(input):
      qctools_args = ['ffprobe', '-f', 'lavfi', '-i',] 
      qctools_args += ["movie=%s:s=v+a[in0][in1],[in0]signalstats=stat=tout+vrep+brng,cropdetect=reset=1,split[a][b];[a]field=top[a1];[b]field=bottom[b1],[a1][b1]psnr[out0];[in1]ebur128=metadata=1[out1]" % input] 
      qctools_args += ['-show_frames', '-show_versions', '-of', 'xml=x=1:q=1', '-noprivate']
      print qctools_args
      subprocess.call(qctools_args)
      #"movie=%s:s=v+a[in0][in1],[in0]signalstats=stat=tout+vrep+brng,cropdetect=reset=1,split[a][b];[a]field=top[a1];[b]field=bottom[b1],[a1][b1]psnr[out0];[in1]ebur128=metadata=1[out1]", 
      #'-show_frames', '-show_versions', '-of', 'xml=x=1:q=1', '-noprivate', % input]) 
      
  
new_contents: import subprocess
  import sys
  
  def make_mediainfo(xmlfilename, xmlvariable, inputfilename):
    with open(xmlfilename, "w+") as fo:
    	xmlvariable = subprocess.check_output(['mediainfo',
    						'-f',
    						'--language=raw', # Use verbose output.
    						'--output=XML',
    						inputfilename])       #input filename
    	fo.write(xmlvariable)
  
  
  def make_qctools(input):
      qctools_args = ['ffprobe', '-f', 'lavfi', '-i',] 
      qctools_args += ["movie=%s:s=v+a[in0][in1],[in0]signalstats=stat=tout+vrep+brng,cropdetect=reset=1,split[a][b];[a]field=top[a1];[b]field=bottom[b1],[a1][b1]psnr[out0];[in1]ebur128=metadata=1[out1]" % input] 
      qctools_args += ['-show_frames', '-show_versions', '-of', 'xml=x=1:q=1', '-noprivate']
      print qctools_args
      subprocess.call(qctools_args)
      #"movie=%s:s=v+a[in0][in1],[in0]signalstats=stat=tout+vrep+brng,cropdetect=reset=1,split[a][b];[a]field=top[a1];[b]field=bottom[b1],[a1][b1]psnr[out0];[in1]ebur128=metadata=1[out1]", 
      #'-show_frames', '-show_versions', '-of', 'xml=x=1:q=1', '-noprivate', % input]) 
     
  def write_qctools_gz(qctoolsxml, sourcefile):
      with open(qctoolsxml, "w+") as fo:
          fo.write(make_qctools(sourcefile))
      subprocess.call(['gzip', qctoolsxml]) 
  
subject: add qctools report writing/gzip compression