Skip to content

Conversation

J5lx
Copy link
Member

@J5lx J5lx commented Oct 24, 2022

I took a look at the truncated audio issue for certain file formats and figured out how to fix it – or work around it, rather. Once again, it’s an issue that is specific to the DirectShow multimedia backend on Windows. This backend seems to have trouble properly playing WAV files containing certain metadata that FFmpeg includes. I actually looked at the files in a hex editor and the format of the metadata looks completely fine, so FFmpeg doesn’t do anything wrong here AFAICT. I also tried both the GStreamer backend and the Windows Media Foundation backend and both of those worked fine. It’s really just the DirectShow backend that doesn’t work properly. As a workaround I simply added some FFmpeg options to strip all metadata. Because users could conceivably import problematic WAV files directly, I also made it so that WAV files too are processed through FFmpeg to strip any and all metadata.

Copy link
Member

@MrStevns MrStevns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@MrStevns MrStevns merged commit 4d6bd88 into pencil2d:master Oct 26, 2022
@J5lx J5lx deleted the fixes/directshow-metadata-playback branch December 18, 2022 22:03
@MrStevns MrStevns added this to the v0.6.7 milestone Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Extra audio formats playback sounds chopped off. WAV & MP3 work perfectly.
2 participants