addNullVideo method

FFMpegStream addNullVideo({
  1. required int width,
  2. required int height,
})

Adds a virtual video input asset with the given width and height, which can be used to fill up time when no other video is available.

Implementation

FFMpegStream addNullVideo({
  required int width,
  required int height,
}) {
  final input = FFMpegInput.virtualDevice('nullsrc=s=${width}x$height');
  final stream = _inputs.putIfAbsent(
      input,
      () => FFMpegStream(
            videoId: '[${_inputs.length}]',
            audioId: null,
          ));
  return stream;
}