Media:...:Concat(3pm)

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

✨ 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 level Media::Convert::Asset can detect, but beyond that. so it's probably not safe to use Media::Convert::Asset::Concat except 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