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

Sound Layer Audio Delay #1179

Open
starsvanished opened this Issue Feb 15, 2019 · 7 comments

Comments

Projects
None yet
5 participants
@starsvanished
Copy link

starsvanished commented Feb 15, 2019

I can easily import audio into my sound layer in Pencil, but when I press play the audio does not play until after 12-14 frames. I have tried both MP3 and WAV files. When I export the animation, the audio plays normally at the very beginning and makes my animation no longer sync up, as I have animated after 12 or so frames to sync with the audio.

EXAMPLES:
What it sounds like in the program
https://youtu.be/Vbi-x8-K44Q

What it sounds like exported
https://www.youtube.com/watch?v=jFYCEKImgIY

Pencil2D Version: 0.6.0
I downloaded 0.6.2 and had the same issue

Operating System: Windows 10

RAM Size: 4 GB

@Jose-Moreno

This comment has been minimized.

Copy link
Member

Jose-Moreno commented Feb 15, 2019

@starsvanished Hi, thank you for reporting. Fortunately this has been actually already been fixed in the latest development versions, as it was reported here #1157 about a month ago along another sound issue that was occurring on export.

So please try out the Windows 64bit build for February 5th 2019: https://drive.google.com/open?id=1juDKIkv1F8fuNruGBwauA_y-7UNWibis and let us know if this fixes your problem or not to truly know if the bug has been thoroughly solved or not 🙂

@starsvanished

This comment has been minimized.

Copy link
Author

starsvanished commented Feb 15, 2019

@Jose-Moreno I downloaded the version you linked and I still have this problem. I have had this issue for a long time, but worked around it until I finally exported something today that showed me the difference, so I'm assuming maybe I'm doing something wrong on my end. Is there a different file type I should be using or something?

@CandyFace

This comment has been minimized.

Copy link
Member

CandyFace commented Feb 15, 2019

@starsvanished It would be interesting to see the wave structure of the audio file, have you tried opening it in a program called "Audacity" to see if it is indeed supposed to begin right away?

@starsvanished

This comment has been minimized.

Copy link
Author

starsvanished commented Feb 15, 2019

@CandyFace Yes, I edited the audio in Audacity and made it start right away. Should I provide my Pencil file?

@scribblemaniac

This comment has been minimized.

Copy link
Member

scribblemaniac commented Feb 15, 2019

@starsvanished Yes please that would be very helpful. The easiest way to share your file would be to upload it to a cloud service (Google Drive, Dropbox, mega.nz, etc.) and link it here.

@starsvanished

This comment has been minimized.

Copy link
Author

starsvanished commented Feb 16, 2019

@scribblemaniac

This comment has been minimized.

Copy link
Member

scribblemaniac commented Feb 21, 2019

@starsvanished Thank you for sharing your file, it is helpful for narrowing down the issue. This appears to be different from the other audio issues we've encountered so far, so it could be a while before this gets fixed. One option you have is to syncronize your audio in Pencil2D, and then after exporting use a video editor to correct the delay of the audio.

For developers:
I've looked at the file and there doesn't seem to be anything in particular wrong with it. This is not an issue with the exporter, since the sound is staring in export roughly where it should be. In your video you can tell that the sound is starting somewhere around 12-16 frames later than it should in Pencil2D, but I'm not experiencing that myself. There's only about a 1-2 frame difference in audio synchronization between Pencil2D and the exported video for me. So it could be platform specific (particularly related to the media backend), or could be a difference in system specs. I'm leaning towards the latter option right now. The only thing I can think of right now is that maybe the buffer doesn't start to get filled until the playback begins (or it has to refill because of a position seek), which would be much more noticeable on a slower hard drive. If this is the issue, then I have started to hack together a possible solution, but I will wait until after v0.6.3 and after we do some more testing to determine if that is the actual issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.