Media:...:PNGGen(3pm)

πŸ“¦
version 1.5.2 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

✨ NAME ✨

Media::Convert::Asset::PNGGen β€” bestie, this thing makes a whole entire video out of a PNG file (or a whole list of them πŸ’…)


🌸 SYNOPSIS 🌸

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;

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. This module uses the lavfi functionality inside ffmpeg β€” and yes, lavfi is short for the "libavfilter input virtual device", and no, we are not going to explain how that matches the abbreviation, you figure it out yourself 🫠 β€” to turn an image file into a video.

It will automatically match the input framerate to the output framerate. Which means... the framerate on the output file MUST be set, either through a profile or by setting it explicitly. No framerate, no vibes, no video. Periodt. πŸ’–


πŸŽ€ ATTRIBUTES πŸŽ€

πŸ’œ audio_channels

The option to hand over to the channel_layout attribute of the anullsrc audio source. Defaults to mono. 🎧

πŸ’œ loop

If it's truthy, it loops over the PNG files you gave it. Super useful if there's only one PNG file β€” but then you should also give a video length for the output file, otherwise... yeah. If it's falsy, it stops after all the input files are processed.

Defaults to true. πŸ”βœ¨


πŸ’€ BUGS πŸ’€

ngl, this module does not work correctly with Media::Convert::Map. It's giving broken. 😭 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. That's the move. 🫢


perl v5.40.1 Β· 2026-02-15 Β· User Contributed Perl Documentation

okay that's the whole page bestie, you're so welcome, go make your video, slay πŸ‘‘πŸ’–πŸŒΈ

πŸ“¦ where this page comes from