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

How to install MoviePy on a remote SSH server without an A/V card? #230

Closed
vote539 opened this issue Nov 15, 2015 · 2 comments
Closed

How to install MoviePy on a remote SSH server without an A/V card? #230

vote539 opened this issue Nov 15, 2015 · 2 comments

Comments

@vote539
Copy link

vote539 commented Nov 15, 2015

I installed MoviePy with sudo pip install moviepy. However, I get the following error when importing it:

$ python
Python 2.7.5 (default, Feb 11 2014, 07:46:25) 
[GCC 4.8.2 20140120 (Red Hat 4.8.2-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import moviepy.editor
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2261:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2261:(snd_pcm_open_noupdate) Unknown PCM default

It appears that the errors have to do with my server not having an audio card. I am connected via SSH, and I have X11 forwarding enabled, but not audio.

Is there a way to run MoviePy without connecting it to an A/V card?

@Zulko
Copy link
Owner

Zulko commented Nov 15, 2015

It may be due to the fact that importing moviepy.editor does a lot of things (like finding pygame and initializing pygame's sound module). In that case you can still use MoviePy by not using moviepy.editor, and instead importing directly the objects you need. Try this:

from moviepy.video.io import VideoFileClip
clip = VideoFileClip("some_video.mp4").subclip(0, 3)
clip.write_videofile("my_new_video.mp4")

@vote539
Copy link
Author

vote539 commented Nov 15, 2015

Indeed, importing from moviepy.video.io makes the module import correctly. It works great; thanks for making this! 👍

@vote539 vote539 closed this as completed Nov 15, 2015
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