Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Multimedia
  • Search

[SOLVED] media-video/aegisub-3.4.2: audio not synced w/ subs

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
eeckwrk99
Apprentice
Apprentice
User avatar
Posts: 266
Joined: Sun Mar 14, 2021 5:46 pm
Location: Gentoo forums

[SOLVED] media-video/aegisub-3.4.2: audio not synced w/ subs

  • Quote

Post by eeckwrk99 » Thu Jan 23, 2025 1:41 pm

Follow-up to [SOLVED] media-video/aegisub - no audio/video provider

I can now import videos just fine with media-video/aegisub-3.4.2:

Code: Select all

% qlist -Iv media-video/aegisub
media-video/aegisub-3.4.2

% equery u aegisub
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for media-video/aegisub-3.4.2:
 U I
 + + alsa                     : Add support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
 - - debug                    : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see
                                https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 + + fftw                     : Use FFTW library for computing Fourier transforms
 + + lua_single_target_luajit : Build for LuaJIT only
 - - openal                   : Add support for the Open Audio Library
 - - portaudio                : Add support for the crossplatform portaudio audio API
 + + pulseaudio               : Add sound server support via media-libs/libpulse (may be PulseAudio or PipeWire)
 + + spell                    : Add dictionary support
 - - test                     : Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled
                                independently)
 + + uchardet                 : Enable charset discovery via app-i18n/uchardet
When importing the video, the audio track is automatically imported (via Settings > Video > "Automatically open audio when opening video"). The subs and the audio are completely out of sync for some reason, i.e. selecting a subtitle line in the grid and playing it with <S> or space bar doesn't match the audio at all.

Likewise, the audio is out of sync (late) when playing the video with <Ctrl+P>.

Occurs with any .mkv file I tried.

As stated in the previous thread, I don't have this problem with arch1t3cht fork (using Feature Release 12 AppImage), everything is synced as expected. Settings are read from $HOME/.aegisub directory with both programs.

The starting and ending times of subs on the audio waveform are identical with both 3.4.2 and arch1t3cht fork but the waveform itself is wrong on 3.4.2.

Image comparison

I'm using PulseAudio as "Audio Player" in Aegisub settings and PipeWire 1.2.7 system-wide:

Code: Select all

% pactl info | rg "Server Name"
Server Name: PulseAudio (on PipeWire 1.2.7)
Maybe this is an upstream issue? I couldn't find any similar issue on the GitHub repository though.

Just curious if someone ever experienced this and what I could try.

Thanks!
Last edited by eeckwrk99 on Fri Apr 25, 2025 8:28 am, edited 1 time in total.
Top
eeckwrk99
Apprentice
Apprentice
User avatar
Posts: 266
Joined: Sun Mar 14, 2021 5:46 pm
Location: Gentoo forums

  • Quote

Post by eeckwrk99 » Tue Jan 28, 2025 10:52 am

I've just tried on my Arch Linux install (same machine) with both 3.4.1 installed from extra repository and Git version installed from the AUR. I don't have the issue either with both.

Code: Select all

% pacman -Qs aegisub
local/aegisub 3.4.1-1
    A general-purpose subtitle editor with ASS/SSA support

% paru -Qm aegisub-git
aegisub-git 3.4.2.r71.dd48a1aec-1
I copied $HOME/.aegisub directory from my Gentoo install to make sure I was using the same settings.
Top
eeckwrk99
Apprentice
Apprentice
User avatar
Posts: 266
Joined: Sun Mar 14, 2021 5:46 pm
Location: Gentoo forums

  • Quote

Post by eeckwrk99 » Thu Jan 30, 2025 2:12 pm

Tried to update media-libs/ffmpegsource (which, if I understand correctly, allows to load video and audio in Aegisub) from 2.40-r2 to 9999 since Arch uses 5.0, but it doesn't make any difference:

Code: Select all

 # emlop l media-libs/ffmpegsource
2025-01-16 22:43:40  20 media-libs/ffmpegsource-2.40-r2
2025-01-30 14:51:12  27 media-libs/ffmpegsource-9999
Top
rab0171610
l33t
l33t
Posts: 721
Joined: Sat Dec 24, 2022 1:41 am

  • Quote

Post by rab0171610 » Thu Jan 30, 2025 3:15 pm

Probably not super helpful as I don't use the program and cannot replicate the issue or provide a direct solution. That being said, when doing a quick search for "av sync issues aegisub" on Google it seems other people have had this issue . . . some of the posts are on Reddit. It might be worth a read if you haven't already encountered any of it.
Top
eeckwrk99
Apprentice
Apprentice
User avatar
Posts: 266
Joined: Sun Mar 14, 2021 5:46 pm
Location: Gentoo forums

  • Quote

Post by eeckwrk99 » Thu Jan 30, 2025 3:49 pm

rab0171610 wrote:Probably not super helpful as I don't use the program and cannot replicate the issue or provide a direct solution. That being said, when doing a quick search for "av sync issues aegisub" on Google it seems other people have had this issue . . . some of the posts are on Reddit. It might be worth a read if you haven't already encountered any of it.
Yes, I also came across these reddit threads as I was looking for a solution.
Some users suggest re-encoding the problematic video(s), which doesn't make sense considering I don't have the issue with arch1t3cht fork on both my Gentoo and Arch installs, or with upstream version on my Arch Linux install.
Top
rab0171610
l33t
l33t
Posts: 721
Joined: Sat Dec 24, 2022 1:41 am

  • Quote

Post by rab0171610 » Thu Jan 30, 2025 7:44 pm

Does the file play normally on the affected Gentoo machine in a media player like VLC without av sync problems?

Do you know if there is an audio delay (positive or negative) that is embedded in the .mkv files that is being respected during playback on VLC or the unaffected versions of aegisub? It appears from your waveform that the time is skewed or compressed in Gentoo which makes me wonder if accounting for or processing of an included delay or 'silence' could be the issue

I agree re-encoding videos seems extreme especially considering that it is only a problem on the installed Gentoo versions. However, I was intrigued by the commenter that removed the empty black frames from the beginning of the video, re-encoded the video+audio removing the audio delay and that the newly encoded file then played correctly in aegisub.

My only other guess would be a library version issue or an unknown configuration default for ffmpeg or other on your Gentoo machine. Comparing any related configs on both the Arch and Gentoo machines would be tedious. I guess on a positive note, you have alternatives in Gentoo that work until you can track down the cause.

If you manage to find a solution I would be curious to know what the cause of this issue is. It sounds just like the kind of strange anomalies I find myself experiencing sometimes. If all else fails, definitely file a bug report.

And completely irrelevant, but ever since they came out I have personally hated .mkv files and avoid them at all costs.
Top
eeckwrk99
Apprentice
Apprentice
User avatar
Posts: 266
Joined: Sun Mar 14, 2021 5:46 pm
Location: Gentoo forums

  • Quote

Post by eeckwrk99 » Thu Jan 30, 2025 9:00 pm

rab0171610 wrote:Does the file play normally on the affected Gentoo machine in a media player like VLC without av sync problems?
Yes, no issue whatsoever with mpv:

Code: Select all

% mpv --version
mpv --version
mpv 0.39.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.349.0
FFmpeg version: 6.1.2
FFmpeg library versions:
   libavcodec      60.31.102
   libavdevice     60.3.100
   libavfilter     9.12.100
   libavformat     60.16.100
   libavutil       58.29.100
   libswresample   4.12.100
   libswscale      7.5.100
rab0171610 wrote:Do you know if there is an audio delay (positive or negative) that is embedded in the .mkv files that is being respected during playback on VLC or the unaffected versions of aegisub? It appears from your waveform that the time is skewed or compressed in Gentoo which makes me wonder if accounting for or processing of an included delay or 'silence' could be the issue

Code: Select all

% for f in $(fd -e .mkv "filename-pattern"); do mediainfo "${f}" | rg -i delay ; done
Delay relative to video                  : 9 ms
Delay relative to video                  : 9 ms
Delay relative to video                  : 9 ms
Delay relative to video                  : 9 ms
Delay relative to video                  : 9 ms
[...]
I doubt it has anything to do with the issue though, I tried another MKV that doesn't have any "Delay relative to video" in metadata and I'm observing the same behavior (no delay with arch1t3cht fork, about 2.5 to 3 seconds delay with upstream 3.4.2).
rab0171610 wrote:I agree re-encoding videos seems extreme especially considering that it is only a problem on the installed Gentoo versions. However, I was intrigued by the commenter that removed the empty black frames from the beginning of the video, re-encoded the video+audio removing the audio delay and that the newly encoded file then played correctly in aegisub.
I'm getting the delay with some MKVs that have black frames at the beginning and some that don't, so I don't think this matter.
rab0171610 wrote:My only other guess would be a library version issue or an unknown configuration default for ffmpeg or other on your Gentoo machine. Comparing any related configs on both the Arch and Gentoo machines would be tedious. I guess on a positive note, you have alternatives in Gentoo that work until you can track down the cause.
That's what I'm thinking too, considering it works with arch1t3cht fork and on my Arch installs.
rab0171610 wrote:If you manage to find a solution I would be curious to know what the cause of this issue is. It sounds just like the kind of strange anomalies I find myself experiencing sometimes. If all else fails, definitely file a bug report.
Will do! Thank you for the different suggestions :) I'm not sure what to try next though.
rab0171610 wrote:And completely irrelevant, but ever since they came out I have personally hated .mkv files and avoid them at all costs.
Well, MKVs are just containers. If you want to add different audio / subtitles tracks, chapters, fonts and other attachments along with correct names, there is no alternative as far as I know. mkvtoolnix which provides mvkmerge, mkvextract and mkvpropedit is an amazing tool, I like it a lot.

I'll just stick with arch1t3cht fork for now.
Top
eeckwrk99
Apprentice
Apprentice
User avatar
Posts: 266
Joined: Sun Mar 14, 2021 5:46 pm
Location: Gentoo forums

  • Quote

Post by eeckwrk99 » Fri Apr 25, 2025 8:28 am

Solved after today's @world update.

Stabilization of media-libs/ffmpegsource-2.40-r3 pulled media-video/ffmpeg-compat-6.1.2 which wasn't installed on my system:

Code: Select all

% sudo emlop l
2025-04-25 17:08:46      2:27 media-video/ffmpeg-compat-6.1.2
2025-04-25 17:09:06        20 media-libs/ffmpegsource-2.40-r3
No more audio out of sync issue now.

Comparing arch1t3cht fork AppImage content and

Code: Select all

% qlist media-libs/ffmpeg-compat
reveals quite a lot of common files.
Top
eeckwrk99
Apprentice
Apprentice
User avatar
Posts: 266
Joined: Sun Mar 14, 2021 5:46 pm
Location: Gentoo forums

  • Quote

Post by eeckwrk99 » Tue May 20, 2025 1:08 pm

I noticed that the issue actually persists when opening some subtitles that I edited with arch1t3cht fork AppImage in media-video/aegisub::gentoo.

When doing the opposite, i.e. opening some subs that were edited with media-video/aegisub::gentoo in arch1t3cht fork AppImage, all good.
Top
Post Reply

9 posts • Page 1 of 1

Return to “Multimedia”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic