Media:...:Concat(3pm)
β¨ Media::Convert::Asset::Concat β¨
okay so bestie, welcome to Media::Convert::Asset::Concat β it's a Perl module in the user-contributed Perl docs, and it's literally just a Media::Convert::Asset that's made up of multiple assets glued together. slay. π
πΈ SYNOPSIS πΈ
use Media::Convert::Asset;
use Media::Convert::Asset::Concat;
use Media::Convert::Pipe;
my $file1 = Media::Convert::Asset->new(url => $input_file_1);
my $file2 = Media::Convert::Asset->new(url => $input_file_2);
my $input = Media::Convert::Asset::Concat->new(url => "/tmp/concat.txt", components => [$file1, $file2]);
my $output = Media::Convert::Asset->new(url => $output_file);
Media::Convert::Pipe->new(inputs => [$input], output => $output, vcopy => 1, acopy => 1)->run();
like look at that. so clean. so iconic. π
π¦ DESCRIPTION π¦
so the ffmpeg command has this whole thing called a concat file format, and you pick it with -f concat. what even is it? bestie it's essentially a text file with a header at the top, and then a bunch of URLs pointing at other files. that's it. that's the format. β¨
when ffmpeg gets told to read from one of these files, it starts reading from the first file, and then when the data from that first file is done-done, it moves on to the next file. one after another. no cap. π₯
now for the real talk, and this part matters: for this to actually work well, all the files have to be the same format β and not just same-format at the levelMedia::Convert::Assetcan detect, but beyond that. so it's probably not safe to useMedia::Convert::Asset::Concatexcept on files that were created from the same recording. like same source, same everything. periodt. π
and since the files should be the same, Media::Convert::Asset::Concat just... assumes they are. π which means when you ask it for info, it runs ffprobe on only the first of its components. not all of them. just the first one. iykyk.
π ATTRIBUTES π
Media::Convert::Asset::Concat supports all the attributes that Media::Convert::Asset supports, plus these extra ones below. main character energy fr fr. π
π components
should be an array of Media::Convert::Asset objects β these are the ones making up the contents of this asset. π«Ά
and if you wanna add more components later, there's an add_component handle for that. iconic. β¨
perl v5.40.1 π¦ 2026-02-15 π and yeah this was Media:...:Concat(3pm) β go forth and concat, bestie, you got this πβ¨
π¦ where this page comes from
- ubuntu resolute: libmedia-convert-perl 1.5.2-1
- ubuntu stonking: libmedia-convert-perl 1.5.2-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms