class_docstr: Implement FFmpeg wrapper for video compression defence based on H.264/MPEG-4 AVC.
  
  Video compression uses H.264 video encoding. The video quality is controlled with the constant rate factor
  parameter. More information on the constant rate factor: https://trac.ffmpeg.org/wiki/Encode/H.264.
docstr: Apply video compression to sample `x`.
  
  :param x: Sample to compress of shape NCFHW or NFHWC. `x` values are expected to be either in range [0, 1] or
            [0, 255].
  :param y: Labels of the sample `x`. This function does not affect them in any way.
  :return: Compressed sample.
code: def forward(
      self, x: "torch.Tensor", y: Optional["torch.Tensor"] = None
  ) -> Tuple["torch.Tensor", Optional["torch.Tensor"]]:
      """
      Apply video compression to sample `x`.
  
      :param x: Sample to compress of shape NCFHW or NFHWC. `x` values are expected to be either in range [0, 1] or
                [0, 255].
      :param y: Labels of the sample `x`. This function does not affect them in any way.
      :return: Compressed sample.
      """
      scale = 1
      if x.min() >= 0 and x.max() <= 1.0:
          scale = 255
      x = x * scale
      x_compressed = self._compression_pytorch_numpy.apply(x)
      x_compressed = x_compressed / scale
      return x_compressed, y
  
file_path: adversarial-robustness-toolbox/art/defences/preprocessor/video_compression_pytorch.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Optional, Tuple, TYPE_CHECKING
  from art.defences.preprocessor.preprocessor import PreprocessorPyTorch
  from art.defences.preprocessor.video_compression import VideoCompression
label_desc: Use image node_id 2 for calling the VideoCompressionPyTorch obj's underlying member method code with example usage: obj.forward(x, y) and returns: x_compressed,  y