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

"Bad File Descriptor" when creating VideoFileClip #61

Closed
cjrd opened this issue Sep 16, 2014 · 8 comments
Closed

"Bad File Descriptor" when creating VideoFileClip #61

cjrd opened this issue Sep 16, 2014 · 8 comments

Comments

@cjrd
Copy link

cjrd commented Sep 16, 2014

Hello,

I'm using moviepy 0.2.1.8.10 on OS X 10.7.5 with python 2.7.8
Executing:

from moviepy.editor import VideoFileClip
VideoFileClip("some_video.mp4")

always throws a
IOError: [Errno 9] Bad file descriptor
at
moviepy-0.2.1.8.10-py2.7.egg/moviepy/audio/io/readers.py

I've attached a screenshot of the traceback, in case it's useful.
Any idea why this error is occurring?

screen shot 2014-09-15 at 5 42 42 pm

@Zulko
Copy link
Owner

Zulko commented Sep 16, 2014

Thanks for the report. I have no idea what can cause this, but by googling around it seems that it is MacOS-related. Could you try to just comment away that line and reinstall ? If the program runs properly after this, I'll add a condition to skip that line on Macs.

@Zulko
Copy link
Owner

Zulko commented Sep 16, 2014

Could you also try VideoFileClip("some_file.mp4", audio=False) just to be sure that the problem is not just with the audio ?

@cjrd
Copy link
Author

cjrd commented Sep 17, 2014

Commenting out that line and reinstalling seems to have worked, and the clip.audio was present.
Setting audio=False does not throw an error, but as expected, the audio was missing.

@Zulko
Copy link
Owner

Zulko commented Sep 17, 2014

Thanks, I'll try to correct that in the next commits. Cross-platform pipe operations are really a pain.

@Zulko
Copy link
Owner

Zulko commented Sep 18, 2014

I think it is now fixed in the github version. If you have the occasion, give it a try and tell me if it works for you.

@cjrd
Copy link
Author

cjrd commented Sep 23, 2014

The current repo version worked without any modification.
Thanks!

@Zulko
Copy link
Owner

Zulko commented Sep 23, 2014

Cool. Thanks for the feedback.

@Zulko Zulko closed this as completed Sep 23, 2014
@cjrd
Copy link
Author

cjrd commented Sep 29, 2014

There's another flush call that threw an error on my system:
https://github.com/Zulko/moviepy/blob/master/moviepy/audio/io/readers.py#L98

Commenting out this line fixed the problem.

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