Exporting problem Something went wrong

I am having this error when trying to export this file as a mp4. It only happens with this file and also only happens if I try to export it as movie, does not happen with image sequence or image. I tested it with another file but doesn’t not show me this error. All I did is wanting to just export it as mp4 movie. Here’s a screenshot

I wonder what went wrong.

@Bignoob Can you please try restarting Pencil2D and exporting again? If that does not work, please copy all of the contents of that box at the bottom of your error dialog and paste it all in a message here.

You’ve got an very large project with a very large number of sound effects which could be contributing to the problem. For future reference you generally want to break an animation up into smaller parts than than this and combine them afterwards with a video editor. Also be sure to make backups of your project if you are not already.

1 Like

I know that its large with lots of sound effects. I will paste the content soon Some of the sound effects are 44100 hz and others are 48000 hz. The breaking part is what I thought of.

I think this is what you want. The bottom part of the content.

[AVFilterGraph @ 0000026f75204840] Error initializing filter ‘amerge’ with args ‘inputs=73’ Error initializing complex filters. Result too large Exit status: CrashExit Exit code: 1 System Info Pencil version: 0.6.5 (stable) Build ABI: x86_64-little_endian-llp64 Kernel: winnt, 10.0.18363 Operating System: Windows 10 (10.0) end

@Bignoob To be honest this is the first time i’ve seen this kind of problem. Is it possible for you to share the file with us? We often recommend wetransfer.com since it has a way to send anonymous links and it auto deletes after a week.

You can learn how to send a link transfer here: https://wetransfer.zendesk.com/hc/en-us/articles/115004254743-How-do-I-send-a-link-transfer-

And you can paste the link in this thread. We’ll delete it from the message afterwards if you want to keep it private.

This is the link for the pencil2d project I was finished with which pencil2d displays a error when creating a movie. 15MB file.

link - https://we.tl/t-QQoGXlfDqG

@Bignoob Ah ok. I see part of the issue. Just as a general rule please don’t overlap sounds on the same layer Always create a new layer for each sound that needs to be overlapped on the same frame range.

Since Pencil2D does not have crossfading or fancy stuff like that, but even if you were using a pro video editing program, you musn’t ut one sound on top of the other on the same track.

By the way when i say overlapped i mean this (note 1 and 2) image

I removed all the overlapping sounds and deleted the “laser” track and i managed to export without problem. Probably the laser track had one file at some point that got damaged and without being deleted it keeps referencing that. We’ll see what the devs can find with more specialized tools.

Create two new sound tracks, one for the sounds that are overlapped and another one to replace the “laser” track. That should do it.

1 Like

I understand now. Thanks!

I recently made a 4 minute animation with sounds. No sounds are overlapping. The problem is that it is telling me that it did not export properly. The error message said like something went wrong. Damn! Another project with the same error? I looked into it and it was telling me about the file being too large. You see what it said and you clearly see there’s a small difference in the error message.

@Bignoob hey. Can you send me the file again? I’ll look into it, if i can’t solve it i’ll escalate to a developer.

It’s a stickman animation with 2600 frames.

link - https://we.tl/t-tSHxncVf6W

@Bignoob Lmao you sure have a ton of sounds. Well the good thing is since I got the same error I can talk it over with the devs to see if there’s a way to fix it. I’m thinking that it’s actually because there are a lot of sounds. I doubt I’ve seen any animation yet with so many sounds put into Pencil2D.

Honestly it’s not what the program is made for, but this helps to push it further so that’s good too.

I’d recommend trying to export one track at a time, and then composing them along the actual animation in a video editor. The way I’d go about this is to save a copy of your file apart from what you’re using. Literally copy paste the file into a backup folder. Then delete the animation, and other sound layers except one. And export each sound layer one by one.

This is mostly because it seems the command fetching the sounds is too large…which could also be a windows limitation, tho i’m not sure.

I’ll try to do this myself first and give you some help with that just so you can finish your work, but later try it out yourself to see how it goes for you in case you run into a similar issue next time while the devs look into it.

I’ll send you a link later once i’ve assembled the tracks.

Yea i will look into it later. It sure does alot of sounds.

@Bignoob Alright here we go.

You will find the animation without sound, two sound tracks (they are videos that only have the words so i could measure where the sound started, but in a video editor you can separate them) and a merged video file that i made with a video editor.

I roughly saw the video and it seems the audio works well. Hope that helps.

1 Like

Thanks for doing this!

1 Like

hello i need some help aswell, i have the same problem but i dont have any overlapping sounds, its just one sound on one layer, the only diffrence is that i didnt use pencil 2d to actually draw the frames, i drew them seperatley in an illistration software and then imported my drawings to make a fan animation, but when i go to export it as a movie i get the same error, can you help me man?

@helpme Hi, then it’s possible your problem is not the same. The problem for this user was specifically the amount of sounds they had, yours might be different.

In these cases please copy and paste the contents of the error window and paste it in your reply and use the Preformatted Text option to show it in a different font


After we can read that, If possible also share the file in case the troubleshooting steps we go through are not sufficient.

Command: C:/Users/User/AppData/Local/Temp/Rar$EXa10880.49908/Pencil2D/plugins/ffmpeg.exe -f rawvideo -pixel_format bgra -video_size 1199x726 -framerate 12 -i - -threads 4 -i C:/Users/User/AppData/Local/Temp/Pencil2D-Oeounu/tmpaudio.wav -pix_fmt yuv420p -y C:/Users/User/OneDrive/Desktop/dice.mp4
ffmpeg version 4.1.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20190212
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, rawvideo, from 'pipe:':
  Duration: N/A, start: 0.000000, bitrate: 334262 kb/s
    Stream #0:0: Video: rawvideo (BGRA / 0x41524742), bgra, 1199x726, 334262 kb/s, 12 tbr, 12 tbn, 12 tbc
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, wav, from 'C:/Users/User/AppData/Local/Temp/Pencil2D-Oeounu/tmpaudio.wav':
    copyright       : 320a038856396b94a284f633df08801e
    encoder         : Lavf58.20.100
  Duration: 00:01:00.92, bitrate: 1411 kb/s
    Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
  Stream #1:0 -> #0:1 (pcm_s16le (native) -> aac (native))
[swscaler @ 000001a615891940] Warning: data is not aligned! This can lead to a speed loss
[libx264 @ 000001a6179700c0] width not divisible by 2 (1199x726)
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
Exit status: CrashExit
Exit code: 1
System Info
Pencil2D version: 0.6.6 (stable)
Build ABI: x86_64-little_endian-llp64
Kernel: winnt, 10.0.19044
Operating System: Windows 10 (10.0)

im trying to upload the file aswell but everytime i try to do that it shows this message…

@helpme This is your problem image

This is not a Pencil2D issue but rather a limitation of the mp4 codec specification.

Basically your video resolution width and height must be divisible by two. Simply make it 1200 x 726 and it should work again.