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

regression when writing m4v via ffmpeg/avconv (convert: delegate failed `'avconv' -nostdin ...) #2720

Closed
3 tasks done
tacaswell opened this issue Oct 14, 2020 · 3 comments
Closed
3 tasks done

Comments

@tacaswell
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am using the latest version of ImageMagick
  • I have searched open and closed issues to ensure it has not already been reported

Description

We found this regression via the Matplotlib test suite so apologies for the Matplotlib/python components of this bug report.

We use subprocess to call convert (which in turns ffmeg/avconv) and then pipe rgba formatted buffers to the process to save animations.

This worked with 7.0.10-31 and fails with 7.0.10-34.

link to it faliing in our CI: https://dev.azure.com/matplotlib/matplotlib/_build/results?buildId=15079&view=logs&j=9878844f-86f0-56ff-f1e1-852bef74b1f7&t=545d203d-ae00-54f9-05d7-a7d9813d4088&l=203

Steps to Reproduce

✔ 13:02:38 $ convert -size 800x600 -depth 8 -delay 20.0 -loop 0 /tmp/test.png /tmp/temp.m4v                                                                                                                                                                                                            
convert: delegate failed `'avconv' -nostdin -v -1 -i '%M%%d.pam' -plays %I '%u.%m' 2> '%u'' @ error/delegate.c/InvokeDelegate/1898.

A simplified version of what Matplotlib does internally

This is a simpler version of what the test suite is doing:

In [1]: import subprocess

In [2]: import matplotlib.pyplot as plt

In [3]: import matplotlib

In [4]: matplotlib.use('agg')

In [5]: fig, ax = plt.subplots(figsize=(8, 6))

In [6]: cmd = ('convert', '-size', '800x600', '-depth', '8', '-delay', '20.0', '-loop', '0', 'rgba:-', '/tmp/temp2.m4v')

In [7]: PIPE = subprocess.PIPE

In [8]: proc = subprocess.Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE)

In [9]: fig.savefig(proc.stdin, format='rgba')

In [10]: proc.communicate()
Out[10]: 
(b'',
 b"convert: delegate failed `'avconv' -nostdin -v -1 -i '%M%%d.pam' -plays %I '%u.%m' 2> '%u'' @ error/delegate.c/InvokeDelegate/1898.\n")

Can produce this on mac and linux (both py38).

System Configuration

  • ImageMagick version: 7.0.10-34
  • Environment (Operating system, version and so on): OSX (catalina), linux (arch)
  • Additional information: ffmpeg must also be installed
@xordux
Copy link

xordux commented Oct 14, 2020

I can produce same error in Windows system as well:

(test_env) C:\PersonalProjects>"C:\Program Files\ImageMagick-7.0.10-Q16-HDRI\convert" -size 800x600 -depth 8 -delay 20.0 -loop 0 tmp.png temp.m4v
convert: delegate failed `"ffmpeg.exe" -nostdin -v -1 -i "%M%%d.pam" -plays %I "%u.%m" 2> "%u"' @ error/delegate.c/InvokeDelegate/1898.

System Configuration:

  • ImageMagick version: ImageMagick 7.0.10-34 Q16 x64 2020-10-08
  • Environment (Operating system, version and so on): Windows10
  • Additional information: ffmpeg is also installed

@urban-warrior
Copy link
Member

Thanks for the problem report. We can reproduce it and will have a patch to fix it in the GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ by sometime tomorrow.

@tacaswell
Copy link
Author

@urban-warrior Awesome! Thank you for the super fast turn around!

@dlemstra dlemstra closed this as completed Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants