Media:...AvSync(3pm)
π Media::Convert::AvSync π
okay bestie, so this is Media::Convert::AvSync β a helper module (from the Perl user-contributed docs, no biggie) whose whole entire job is fixing A/V sync issues. yes, the audio-and-video-are-out-of-sync nightmare. we're solving it. periodt. π
β¨ NAME β¨
Media::Convert::AvSync β it's giving helper module to fix A/V synchronization issues. that's the vibe. that's the whole vibe. π¦
πΈ SYNOPSIS πΈ
like, literally just do this:
use Media::Convert::Asset;
use Media::Convert::AvSync;
my $input = Media::Convert::Asset->new(url => $input_filename);
my $output = Media::Convert::Asset->new(url => $output_filename);
Media::Convert::AvSync->new(input => $input, output => $output, audio_delay => 0.1)->run();
see how chill that is?? one ->run() and we're done. slay. π
π DESCRIPTION π
okay so Media::Convert::AvSync is a higher-level helper module whose mission in life is to correct audio/video synchronization issues. main character energy fr fr. π
the way it does this: it tells ffmpeg to read the input asset twice β once for audio, once for video β and then apply a time offset to the audio stream. π§β¨ and bestie, that offset may be negative, in case the audio precedes the video. yes, negative. it's allowed. it's fine. we support that. π«Ά
β οΈ but hold on, important lore: after A/V sync correction, the asset file will be reduced in length by twice the length of the correction value. not a typo. twice. π
and why?? because otherwise, in the case of audio preceding video, the resulting media file would end up with a snippet of audio with no video at the start, and one of video with no audio at the end β and vice versa for a correction value for video preceding audio. so yeah, we trim. it's for your own good. π
π ATTRIBUTES π
these are the attributes that Media::Convert::AvSync supports, and yes they all matter:
π§ input
the input asset. must be a Media::Convert::Asset object. no substitutions, no random hashrefs, we're not doing that today. π«
π§ output
the output asset. also must be a Media::Convert::Asset object. matching set, iconic. π
π§ audio_delay
the delay that should be applied to the audio in the input asset. express it in seconds, and it may be a fractional and/or negative value. flexible queen. π
- positive values delay the audio
- negative values delay the video
that's it, that's the rule. positive = audio goes later, negative = video goes later. iykyk. β¨
and that's the whole page, bestie!! this was Media:...AvSync(3pm) from the User Contributed Perl Documentation, running on perl v5.40.1, dated 2026-02-15. go forth and sync those streams. mwah. ππΈπ¦π
π¦ 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