-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
error: string:
When trying to import from moviepy
#9
Comments
Update, I tried this again on a different console and got some text output:
|
Ok, you have the same problem as the other Ubuntu users: FFMPEG is unmaintained on Ubuntu. Install the last FFMPEG version (this means go to the FFMPEG site, download the binary put it in your usr/bin folder). This should work. |
Thanks for the fast reply, will try it now and close if it works! |
I installed the ffmpeg binary from the site as you said: Here is my current ffmpeg version:
Unfortunately, I am getting new errors when writing to video:
Perhaps I am installing the wrong binary from the ffmpeg website? May I have an exact version & url? Thank you! |
I don't know. If you were able to open a video, your FFMPEG version should be perfectly valid. Maybe it is a codec thing. Does it work if you try other codecs ? like
|
Hm, both fail and with the same error as above, something to do with ffmpeg_audiowriter.py.
|
Ok, sorry, I misread your previous message... Seems like a real bug to me. The audio support is not a part of the code that I am proud of. However I have made a lot of videos with audio and never had this problem, that's interesting. Could you give me more details on what you are trying to do ? Like, is your video very short or something ? Did you mix different videos ? could you try this (it will use another codec for the audio):
Just to be sure: I don't think this could be the problem, but your ffmpeg version seems a little old, you have much more recent versions at the bottom of this page: http://ffmpeg.gusari.org/static/32bit/ And last hope, try reducing the audio buffering, that may be the issue:
|
No worries! I switched to the latest 64bit ffmpeg and now the video.avi files are being generated properly! However, I have 2 more (smaller) issues. When I save the video in .mp4 format (I know .avi is recommended), the audio is lost. How should I go about try to get a resulting .mp4 video? Also, if I run the
Also, I notice a Thanks for your fast responses so far man! |
For TextClip, I guess it is because you don't have ImageMagick installed on your computer. You need it to generate texts. It is very easy to install on ubuntu through the software manager, and there are less issues than with ffmpeg. You can check if you have ImageMagick installed with
For your other point (no audio), once again it is strange. Could you copy the whole output of the .to_videofile ? |
Here is the full output of
|
This is strange, it looks like everything is run smoothly: apparently the sound file is correctly generated and incorporated into the movie. But I have heard that some media cannot read the sound of the videofile when it is .ogg ... |
Hmm, i went with your second suggestion. I re-downloaded moviepy from Github and manually installed via setup.py. Then, attmped to use |
Even stranger. can you paste the output ? And when you just do to_videofile('test.mp4'), you have normal video (without sound) right ? |
For your first suggestion, when I set And yes, 'test.mp4' gives me a fine video but no sound. |
WAIT NO. ^ I was wrong. If I dont include |
Output for
|
If I include |
Ok, I am lost, sorry. I may think of a solution later, but this really looks like an ffmpeg problem of some sort. Maybe we can see if someone else has the same problems. |
No worries! Ill install different versions of ffmpeg or try this on a different machine! |
Hey ! If you are still interested I made lots of change and there are good chances that the problem you described is solved (I would guess it was an incompatibility in the multiprocessing module, something like that). I would be very grateful if you gave it a try :) |
Awesome! THANK YOU for making all these changes. Will try tonight and report what happens. |
I can't promise anything :) Le 21/02/2014 00:48, Lucas Ou-Yang a écrit :
|
I seriously think this is an ffmpeg issue where i'm probably installing the wrong thing. |
Hey there. I'm closing this issue as old. The program is a lot better now I you want to give it another try :) |
Refer to this line of code:
moviepy/moviepy/video/io/ffmpeg_reader.py
Line 99 in b93b321
I successfully installed
moviepy
and every dependency, for example:import moviepy
andfrom moviepy.editor import *
works, along withimport pygame
, etc. I also didsudo apt-get install libav-tools
for the ffmpeg library.However, the line
clip = VideoFileClip("some_video.mp4").subclip(0, 60)
causes my terminal to blank into a new, unusual terminal console with one line of error:error: string:
I am using Ubunu 12.04.3 Server.
The text was updated successfully, but these errors were encountered: