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;
}