class_docstr: Helper class for writing whole videos.
class_docstr_tok: ["Helper","class","for","writing","whole","videos","."]
docstr: Starts a thread for reading output from FFMPEG.
  
  The thread reads consecutive chunks from the stream and saves them in
  the given list.
  
  Args:
    stream: output stream of the FFMPEG process.
    chunks: list to save output chunks to.
  
  Returns:
    Thread
code: def _start_reader_thread(self, stream, chunks):
      """Starts a thread for reading output from FFMPEG.
  
      The thread reads consecutive chunks from the stream and saves them in
      the given list.
  
      Args:
        stream: output stream of the FFMPEG process.
        chunks: list to save output chunks to.
  
      Returns:
        Thread
      """
      import io  # pylint: disable=g-import-not-at-top
      import threading  # pylint: disable=g-import-not-at-top
  
      def target():
          while True:
              chunk = stream.read(io.DEFAULT_BUFFER_SIZE)
              if not chunk:
                  break
              chunks.append(chunk)
  
      thread = threading.Thread(target=target)
      thread.start()
      return thread
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  from tensor2tensor.layers import common_layers
  from tensor2tensor.utils import contrib
  import tensorflow.compat.v1
  from tensorflow.python.ops import summary_op_util
label_desc: Use image node_id 3 for calling the WholeVideoWriter obj's underlying member method code with example usage: obj._start_reader_thread(stream, chunks) and returns: thread