Interface HardwareProcessTraits

All Superinterfaces:
InputSourceProviderTraits, InternalParametersSupplier, SimpleSourceTraits
All Known Implementing Classes:
FFmpeg

public interface HardwareProcessTraits extends InternalParametersSupplier, SimpleSourceTraits
  • Method Details

    • getDeviceIdToUse

      default int getDeviceIdToUse()
      Returns:
      -1 by default
    • addHardwareNVScalerFilter

      default void addHardwareNVScalerFilter(Point newSize, String pixelFormat, String interpAlgo)
      Not checks will be done NVIDIA Performance Primitives via libnpp. Via -vf ffmpeg's option.
      Parameters:
      newSize - like 1280x720 or -1x720
      pixelFormat - can be null (== same) or nv12, yuv444p16...
      interpAlgo - can be null or nn (Nearest neighbour), linear (2-parameter cubic (B=1, C=0)), cubic2p_catmullrom (2-parameter cubic (B=0, C=1/2)), cubic2p_b05c03 (2-parameter cubic (B=1/2, C=3/10)), super (Supersampling), lanczos ...
    • addHardwareNVMultipleScalerFilterComplex

      default void addHardwareNVMultipleScalerFilterComplex(Map<String,String> configuration)
      Use nvresize Not checks will be done
      Parameters:
      configuration - resolution -> filter out name ; resolution can be litteral like hd1080 or cif and filter out name can be "out0", usable after with "-map [out0] -vcodec xxx out.ext"
    • addHardwareVideoDecoding

      default void addHardwareVideoDecoding(String source, FFprobeJAXB analysingResult, FFHardwareCodec hardwareCodec, FFAbout about) throws MediaException
      "Patch" ffmpeg command line for hardware decoding. Only first video stream will be decoded. Hardware decoding often works in tandem with hardware coding.
      Throws:
      MediaException - if hardware decoding is not possible.
    • addHardwareVideoEncoding

      default void addHardwareVideoEncoding(String destCodecName, int outputVideoStreamIndex, FFHardwareCodec hardwareCodec, FFAbout about) throws MediaException
      Set codec name, and if it possible, use hardware encoding.
      Parameters:
      outputVideoStreamIndex - (-1 by default), X -> -c:v:X
      Throws:
      MediaException