Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving the horizontal track bar or using the arrow buttons chrashes the application #17

Open
Johndirr opened this issue Jan 28, 2024 · 9 comments

Comments

@Johndirr
Copy link

When using the horizontal track bar or the arrow buttons to navigate through the audio display the application crashes.
grafik

@protyposis
Copy link
Owner

This happens only with certain container formats (e.g., MKV, TS) and is related to FFmpeg seeking. The fix didn't make it into the last release due to QA issues, but will be rolled out when ready.

@protyposis
Copy link
Owner

Fix is out: https://github.com/protyposis/AudioAlign/releases/tag/v1.6.1

Please let me know if that resolves this issue.

@Johndirr
Copy link
Author

Johndirr commented Feb 4, 2024

The problem still exists in version 1.7. It happened with an MKV container. The audio inside the container is in AAC format.

@protyposis
Copy link
Owner

I unfortunately cannot reproduce, so this must be an issue with your specific file (there are many ways how an MKV container can be structured). Can you provide a sample file?

@Johndirr
Copy link
Author

Johndirr commented Feb 4, 2024

Sure. Here you go: Sample

@protyposis
Copy link
Owner

Thank you. Unfortunately, FFmpeg cannot precisely seek this file due to the way the audio frames are timestamped (the distance of the timestamps doesn't match the size of the frames), but AudioAlign requires frame-exact seeking.

As a quick fix, I'll force AudioAlign to generate wave proxy files for all containers that exhibit this behavior. Later, direct file access can probably be reintroduced by scanning through the file and building a seek index with corrected timestamps.

@protyposis
Copy link
Owner

the distance of the timestamps doesn't match the size of the frames

The reason for this is the low timescale resolution that FFmpeg uses for MKV (your sample file was encoded by FFmpeg 6.1): https://github.com/FFmpeg/FFmpeg/blob/e38092ef9395d7049f871ef4d5411eb410e283e0/libavformat/matroskaenc.c#L3430-L3431

Transcoding the container to MP4 fixes the timestamps: ffmpeg -i sample.mkv -c copy sample.mp4

@Johndirr
Copy link
Author

Johndirr commented Feb 5, 2024

Thank you. Unfortunately, FFmpeg cannot precisely seek this file due to the way the audio frames are timestamped (the distance of the timestamps doesn't match the size of the frames), but AudioAlign requires frame-exact seeking.

Will this be a problem when fingerprinting the file? Are the timestamps not corresponding to the actual audio frame then?

@protyposis
Copy link
Owner

Fingerprinting is unaffected - it doesn't use these timestamps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants