code: def show_progress(total_duration):
      
      with tqdm(total=round(total_duration, 2)) as bar:
          def handler(key, value):
              if key == 'out_time_ms':
                  time = round(float(value) / 1000000., 2)
                  bar.update(time - bar.n)
              elif key == 'progress' and value == 'end':
                  bar.update(bar.total - bar.n)
          with _watch_progress(handler) as socket_filename:
              yield socket_filename
docs: Create a unix-domain socket to watch progress and render tqdm
      progress bar.