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

FFMPEG Error on current Debian Wheezy x64 #21

Closed
oxivanisher opened this issue Mar 16, 2014 · 2 comments
Closed

FFMPEG Error on current Debian Wheezy x64 #21

oxivanisher opened this issue Mar 16, 2014 · 2 comments

Comments

@oxivanisher
Copy link
Contributor

Hi All

I have e recurring error with/from ffmpeg on 2 devices running (current) debian wheezy. I only have 64bit systems so i was not able to try 32 bit. The installed version of moviepy is from pip, but i tried it also with a current git clone and got the same result. When i run the command myself which moviepy runs ffmpeg -i /tmp/DSC_0384.JPG -f image2pipe -pix_fmt rgba -vcodec rawvideo - it ends with "Segmentation fault" so i think it is something with ffmpeg. But i don't know how to track it down further.

My testfile (from the example page extracted) which produces the same error as my more complex project:

#!/usr/bin/python
from moviepy.editor import *
txt_clip = TextClip("My Holidays 2013",fontsize=70,color='white')

The error from moviepy:

$ python test.py 
Traceback (most recent call last):
  File "test.py", line 5, in <module>
    txt_clip = TextClip("My Holidays 2013",fontsize=70,color='white')
  File "/usr/local/lib/python2.7/dist-packages/moviepy/video/VideoClip.py", line 971, in __init__
    ImageClip.__init__(self, tempfile, transparent=transparent)
  File "/usr/local/lib/python2.7/dist-packages/moviepy/video/VideoClip.py", line 753, in __init__
    img = ffmpeg_read_image(img,with_mask=transparent)
  File "/usr/local/lib/python2.7/dist-packages/moviepy/video/io/ffmpeg_reader.py", line 192, in ffmpeg_read_image
    reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt)
  File "/usr/local/lib/python2.7/dist-packages/moviepy/video/io/ffmpeg_reader.py", line 34, in __init__
    self.lastread = self.read_frame()
  File "/usr/local/lib/python2.7/dist-packages/moviepy/video/io/ffmpeg_reader.py", line 117, in read_frame
    assert len(s) == nbytes
AssertionError
Exception AttributeError: "FFMPEG_VideoReader instance has no attribute 'lastread'" in <bound method FFMPEG_VideoReader.__del__ of <moviepy.video.io.ffmpeg_reader.FFMPEG_VideoReader instance at 0x25fa5f0>> ignored

Ffmpeg version:

$ ffmpeg -version
ffmpeg version 0.8.10-6:0.8.10-1, Copyright (c) 2000-2013 the Libav developers
  built on Feb  5 2014 03:52:19 with gcc 4.7.2
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
ffmpeg 0.8.10-6:0.8.10-1
libavutil    51. 22. 2 / 51. 22. 2
libavcodec   53. 35. 0 / 53. 35. 0
libavformat  53. 21. 1 / 53. 21. 1
libavdevice  53.  2. 0 / 53.  2. 0
libavfilter   2. 15. 0 /  2. 15. 0
libswscale    2.  1. 0 /  2.  1. 0
libpostproc  52.  0. 0 / 52.  0. 0

Any help is much appreciated! I know the problem is not on your side. Debian would like to use avconv in the future but i realize that this is no easy task to change.

@Zulko
Copy link
Owner

Zulko commented Mar 16, 2014

Just update your FFMPEG version by downloading a FFMPEG binary directly from the FFMPEG website, as explained in the readme and in the docs.

FFMPEG is a very fine project, still very alive, it's just that the debian/ubuntu people have decided that their distributions would ship with an outdated FFMPEG version. Switching to avconv would be easy, but I am not convinced avconv would be better.

When you run the command in a terminal, you get a segmentation fault because this command is a little special, there is the "-" at the end that tells FFMPEG that it must send its output to the pipe of another program. So it won't work in a terminal.

Thanks for the feedback, please report any other difficulties you might encounter !

@oxivanisher
Copy link
Contributor Author

I installed the deb-multimedia packages and it works! :D Thank you very much for the fast support and have a nice weekend.

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

No branches or pull requests

2 participants