DOKK / manpages / debian 12 / libmedia-convert-perl / Media::Convert::Asset::PNGGen.3pm.en
Media::Convert::Asset::PNGGen(3pm) User Contributed Perl Documentation Media::Convert::Asset::PNGGen(3pm)

Media::Convert::Asset::PNGGen - Generate a video from a (list of) PNG files

  use Media::Convert::Asset;
  use Media::Convert::Asset::PNGGen;
  use Media::Convert::Pipe;
  my $input = Media::Convert::Asset::PNGGen->new(url => $input_png_filename);
  my $output = Media::Convert::Asset->new(url => $output_filename);
  Media::Convert::Pipe->new(inputs => [$input], output => $output)->run;

This module uses the lavfi (the "libavfilter input virtual device", you figure out how that matches the abbreviation) functionality in ffmpeg to convert an image file into a video.

It will automatically match the input framerate to the output framerate; this means that the framerate on the output file must be set, either through a profile or by setting it explicitly.

The option to give to the "channel_layout" attribute of the "anullsrc" audio source. Defaults to "mono".

This module does not work correctly with Media::Convert::Map. If you need to create a map, first generate a video with this file and then initialize a regular Media::Convert::Asset object with it.

2023-03-07 perl v5.36.0