Sound sync problem

I’ve encountered a weird problem with a sound track. I’m using the latest version on Windows 10.

I’ve been trying to record the finished PCLX as an MP4 (having discovered the export function is not yet working…

EDIT - apologies to anyone who has just been struggling to make sense of my problem. Export to MP4 is now working, and - FYI - the problem seemed to have been that I had checked the box “To the end of sound clips”, because my soundtrack finished before the images did. I’d tried it a few times, and got the same error message almost immediately.

I then spent some time searching for advice, seeing reports (presumably out of date now) that said there were known issues with exporting. So I assumed it was just one more WIP.

Now I’m leaving that box unchecked, export to movie is working fine. (Or is that a bug worth reporting anyway?)

I’ve been trying to record the finished PCLX as an MP4 (having discovered the export function is not yet working)

How is it failing to work? Currently export should work. Can you be a bit more specific?

If your file is not being exported at all please check that the file name in the movie export window has an actual filetype at the end. e.g. C:/Windows/User/Desktop/My_Animation.mp4

Also check that the plugin folder in the Pencil2D application folder has the FFMPEG.exe file which is required. If it’s not there make sure to thoroughly extract all the elements from the Pencil2D ZIP download from the website.

and am having sound sync problems.

Ok, this is a problem that has been in constant evolution, and unfortunately it depends greatly on the user computer, the video player they use to playback and Pencil2D’s plugin compatibility among other things.

Some people have had no sync problems while others have reported up to 20 frames of delay. In general I have seen in 0.6.4 a delay of up to 1 to 2 frames in a professional video editor. Patches have been applied to improve this however but we also recommend using WAV as MP3 seems to have problems with decoding in general unless you’re using a proprietary library.

I then remembered that the screen can be recorded more simply using the Windows game bar (Windows+G).

It is important to note that these desktop recorders are in general meant for games, so be careful that there is not a setting where you’re recording at 60fps or something since you will need to trim the extra frames. Editing also works similar, you need to match the video editing project with the Pencil2D fps before trying to review the delay. It may seem obvious but many people use the default settings expecting that.

I tried it first using Filmora’s screen record function.

I’ve never used Filmora’s video editor, and i’m even less experienced with such recording device but you may need to make sure you’re not using frame drop FPS (e.g 23.796 or 29.97) only use the same frame rate as Pencil2d with integers, otherwise you will see differences.

But when I scrub the sound - to check a sync point around 230 frames in - the sound is late!

This and many other problems depend on the initial filetype used as well. WAV is the most faithful for both editorial playback and export. Unfortunately there can be differences between filetypes due to encoding, and mostly when using MP3 files, however this has been changed and improved. Please download the latest development version which has fixes from last week all related to sound.

the problem seemed to have been that I had checked the box “To the end of sound clips”, because my soundtrack finished before the images did

Checking that box will certainly clip the timeline to the “end of sound clips”, it’s often used when the sound clips are longer than the animation, but in general I personally recommend simply not using that checkbox and putting a duplicate of the last frame after the sound clip end point.

I’ll test the issue however to see how can i reproduce it since in general checking that box shouldn’t give you any inherent trouble, it should only export up to the last sound clip end point and that’s it.

Incidentally can you post the exact error you’re getting? If it’s an error window you should be able to copy & paste the error message here. Thanks in advance.

Thanks Jose, and sorry not to reply sooner. As I think you can now see, I edited my earlier post to remove pretty much all those issues. But just to give more detail in case things are not still clear.

Export to MP4, first time I tried it, returned an error window (almost immediately) that I can no longer remember - and can’t now recreate - but said something like “your movie may not have exported correctly … try again”. It did this repeatedly, hence my search for advice and my earlier bug report.

As I said later, it now works fine, and I guessed the problem might have been something to do with the checkbox for “end of soundclips”. But having just tested this with some random settings for a test file, I can’t make it fail again. Obviously, if it does happen again, I’ll let you know, but no problem at the moment.

The soundtrack problems are also no longer an issue now I can export directly from Pencil 2D to MP4. The sound remains in sync.
The only thing I use Filmora for is to add things like titles and fades, and sometimes to crop or zoom (in ways that I know can be done in Pencil2D, but I’m used to doing in Filmora).

You may be right about the frame rate for that recording which interspersed extra frames in my animation. The math suggests it (either Filmora or Game bar) recorded video at 30fps - but then played back at 25, along with the sound. I.e, the sound was recorded correctly but the video was a different rate - so when they were played back at the same rate, the video was stretched slower.

As for scrubbing within Pencil2D, that now seems to work correctly too - at least with my current project. I.e., I can no longer recreate the issue I had before. In fact, I’ve just been able to edit the animation to fine tune the sync.

But thanks for the link to the latest version. For now, as everything is working fine, I’ll hold off on downloading that. Maybe I’ll grab the next update! Meanwhile I’ll upload my finished project (PCLX) as requested on your Contribute page. I also plan on uploading the MP4 (with additions in Filmora) to youtube soon. I will certainly mention Pencil2D. Now I’m getting more used to how it works, I like its simplicity and transparency. If I can suggest one useful improvement (I’m sure I’ll think of others), it would be the ability to select part of an image with a lasso, rather than just a rectangle.

Here’s the WeTransfer link to my animation:

1 Like

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.