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

[python] GIF generation fails on audio channel missing #50

Closed
Montspy opened this issue May 3, 2022 · 3 comments
Closed

[python] GIF generation fails on audio channel missing #50

Montspy opened this issue May 3, 2022 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Montspy
Copy link
Owner

Montspy commented May 3, 2022

The workaround for missing audio channels does not behave as expected on some installs.

raise RuntimeError(f'Could not run ffmpeg command "{cmd}":\n\t{stderr.decode()}')
RuntimeError: Could not run ffmpeg command "ffmpeg -hide_banner -loglevel warning -y  -f image2 -pattern_type none -loop 0 -i "/var/www/html/tmp4pfhg9gx/tmp0b1px2g1.png"  -ignore_loop 1 -i "./images/wagmi_wolves_club_bodies/layer19/sparkle.gif" -f lavfi -i anullsrc -f lavfi -i anullsrc -filter_complex "amerge=inputs=2,pan=stereo|c0<c0+c2|c1<c1+c3[a]" -filter_complex "[0][1]overlay[ov]" -map [ov] -map [a] -c:v libvpx-vp9 -lag-in-frames 0 -lossless 1 -row-mt 1 -pix_fmt yuva420p -shortest "/var/www/html/tmp4pfhg9gx/tmp0801l87t.webm"":
        Stream map 'a' matches no streams.
To ignore this, add a trailing '?' to the map.

Confirmed ffmpeg version matches known working setups

./docker.sh ffmpeg
ffmpeg version 4.3.3-0+deb11u1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx 
<snip>
 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
@Montspy
Copy link
Owner Author

Montspy commented May 3, 2022

Reproduces on problematic install with this command:

./docker.sh ffmpeg -loglevel info -y -ss 00:00:00 -to 00:00:02 -f lavfi -i anullsrc -f lavfi -i anullsrc  -filter_complex "amerge=inputs=2[a]" -map "[a]" -ac 2 test.mp3

Command output extract:

Input #0, lavfi, from 'anullsrc':

  Duration: N/A, start: 0.000000, bitrate: 705 kb/s
    Stream #0:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s
Input #1, lavfi, from 'anullsrc':

  Duration: N/A, start: 0.000000, bitrate: 705 kb/s
    Stream #1:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s
Filter amerge has an unconnected output

@Montspy Montspy self-assigned this May 3, 2022
@Montspy
Copy link
Owner Author

Montspy commented May 3, 2022

Potential fix to be tested in commit 14d9783

@Montspy Montspy added the bug Something isn't working label May 4, 2022
@Montspy
Copy link
Owner Author

Montspy commented Jun 1, 2022

Could not get user to test the fix, but it has been working well on my machine.
Cherry-picked the fix into PR #47 (commit 26eb5b2)
Will close this issue once it reaches main branch

@Montspy Montspy added this to the 1.0.0 milestone Jun 5, 2022
@sk33z3r sk33z3r closed this as completed Jun 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants