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

🐛 [BUG] - Crash when exporting a project with a sound layer as a movie #1894

Open
DomenicoMammola opened this issue Nov 23, 2024 · 6 comments
Labels

Comments

@DomenicoMammola
Copy link

Description

Hello,
when I try to export as a movie my project I get this error message:

Command: /tmp/.mount_pencilyGVzmc/usr/plugins/ffmpeg -i /tmp/Pencil2D/Default_Y2xD_456aebye/data/sound_20241123_081849_683.wav -filter_complex [0:a:0] aformat=sample_fmts=fltp:sample_rates=44100:channel_layouts=mono,volume=1,adelay=0S|0S,apad=whole_len=3675[ad0] -map [ad0] -ar 44100 -acodec pcm_s16le -ac 2 -y -ss 0 -to 0.0833333 /tmp/Pencil2D-eqoHJY/tmpaudio.wav
ffmpeg version 2.8.17-0ubuntu0.1
Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, wav, from '/tmp/Pencil2D/Default_Y2xD_456aebye/data/sound_20241123_081849_683.wav':
Duration: 00:00:01.95, bitrate: 384 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 24000 Hz, 1 channels, s16, 384 kb/s
[Parsed_adelay_2 @ 0x22bfca0] At least one delay >0 must be specified.
[Parsed_adelay_2 @ 0x22bfca0] Failed to configure input pad on Parsed_adelay_2
Error configuring complex filters.
Invalid argument
Exit status: CrashExit
Exit code: 1
System Info
Pencil2D version: 99.0.0.1005 (nightly)
Build ABI: x86_64-little_endian-lp64
Kernel: linux, 6.8.0-48-generic
Operating System: Ubuntu 24.04.1 LTS
end

I have tryed to export the project as mp4 file and also as avi file. Current resolution is 800 * 600 (dividable by 2).
Exporting to animated gif files is working.

If I remove the sound level (which contains an mp3 file), everything is working fine.

Same result if I convert the mp3 file to wav.

Expected result

An MP4 or AVI file should be created

Actual result

FFMpeg crashes so a crash dialog appears.

Steps to reproduce

1. Create a new project
2. Import a wav or mp3 file in a new sound layer
3. Export the project as a MP4 or AVI file (Menu "File"-> "Export" -> "Movie")

Video or Image Reference

No response

System Information

Pencil2D version: 99.0.0.1005 (nightly)
Build ABI: x86_64-little_endian-lp64
Kernel: linux, 6.8.0-48-generic
Operating System: Ubuntu 24.04.1 LTS
@Jose-Moreno
Copy link
Member

@DomenicoMammola Hi and thank you for reporting this. Could it be possible for you to share:

  • The separate audio file that's causing this issue
  • A Pencil2D file with only the audio import, and confirm that it still crashes the app without any kind of drawing.

For now meanwhile we investigate the issue, I'd suggest exporting the animation without audio, and using openshot or kdenlive to edit the audio in 👍

@DomenicoMammola
Copy link
Author

Hi @Jose-Moreno, thanks for the prompt answer.
Here you will find a test project, a wav file and a mp3 file. I get the error with any of the 2 file.
Thanks for the suggestion, I'll follow it.

test_pencil2d.zip

@MrStevns
Copy link
Member

MrStevns commented Nov 24, 2024

HI Domenico

Thanks for reporting this.

I've tested your project with the latest Pencil2D release 0.7.0 on macOS which uses ffmpeg version 6.1.1-tessus and I cannot reproduce this behaviour.

I noticed that the ffmpeg version which is being used on your system is very old.
"ffmpeg version 2.8.17-0ubuntu0.1"

I would suggest you to upgrade the ffmpeg package and try again.

Edit:

I dug a bit deeper and discovered that it indeed does fail on Linux with the latest release. I still suspect that it's the ffmpeg version that's causing the problem though.

Looking at our install dependency scripts, I would expect the latest ffmpeg version would be fetched and used.. but that does not seem to be the case.

@scribblemaniac Do you you know what's going on here?

@scribblemaniac
Copy link
Member

Yes the ffmpeg version is too old. Things will start to break with versions of ffmpeg <3.4 as the movie exporter is currently written.

This version of ffmpeg is expected for our CI because it pulls the latest ffmpeg package for the distribution of the CI environment, which is currently Ubuntu 16.04 (in a docker container). We use such an old distro because the version it is built on will set the minimum glibc version that is supported by the AppImage.

Adding a PPA such as this one to our build process should be sufficient to solve this issue.

@MrStevns
Copy link
Member

MrStevns commented Nov 25, 2024

Ah of course, that makes sense. Why are we limited to using Ubuntu 16.04 though? Qt 5.15 supports
Ubuntu 18.04 and 20.04, can't we upgrade the container to use those instead?

I assume we're currently on that old version for legacy backward compatibility reasons or is it something else?

@scribblemaniac
Copy link
Member

We do already use Qt 5.15 (albeit with an older .2 minor version). It's all about the glibc version. Ubuntu 16.04 uses version 2.23, while 18.04 uses version 2.27. If we built the AppImage in a container running Ubuntu 18.04, it would not run on any Linux device using a version of glibc <2.27. There's a bit more information about it here:

For compatibility reasons, we need to use the oldest version that we expect our users might be using. But it may be time to bump up the minimum version again. I will give it some more thought.

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

No branches or pull requests

4 participants