Media:...AvSync(3pm)

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

πŸ’– 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