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

Error with write_videofile #727

Closed
wgaylord opened this issue Feb 21, 2018 · 8 comments
Closed

Error with write_videofile #727

wgaylord opened this issue Feb 21, 2018 · 8 comments
Labels
images Related to ImageClip, or handling of images in general. stale For issues lacking activity, whose creators have become unresponsive,...

Comments

@wgaylord
Copy link

wgaylord commented Feb 21, 2018

Yes I realize there are two other issues about this but none of the issues seem to have answers.

> >>> q=ImageSequenceClip(".",fps=3)
> >>> q.write_videofile("test.mp4")
> [MoviePy] >>>> Building video test.mp4
> [MoviePy] Writing video test.mp4
> 100%|###############################################################################7| 692/694 [00:08<00:00, 83.60it/s]Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "<decorator-gen-51>", line 2, in write_videofile
>   File "C:\Python27\lib\site-packages\moviepy\decorators.py", line 54, in requires_duration
>     return f(clip, *a, **k)
>   File "<decorator-gen-50>", line 2, in write_videofile
>   File "C:\Python27\lib\site-packages\moviepy\decorators.py", line 137, in use_clip_fps_by_default
>     return f(clip, *new_a, **new_kw)
>   File "<decorator-gen-49>", line 2, in write_videofile
>   File "C:\Python27\lib\site-packages\moviepy\decorators.py", line 22, in convert_masks_to_RGB
>     return f(clip, *a, **k)
>   File "C:\Python27\lib\site-packages\moviepy\video\VideoClip.py", line 349, in write_videofile
>     progress_bar=progress_bar)
>   File "C:\Python27\lib\site-packages\moviepy\video\io\ffmpeg_writer.py", line 209, in ffmpeg_write_video
>     fps=fps, dtype="uint8"):
>   File "C:\Python27\lib\site-packages\tqdm\_tqdm.py", line 833, in __iter__
>     for obj in iterable:
>   File "C:\Python27\lib\site-packages\moviepy\Clip.py", line 475, in generator
>     frame = self.get_frame(t)
>   File "<decorator-gen-14>", line 2, in get_frame
>   File "C:\Python27\lib\site-packages\moviepy\decorators.py", line 89, in wrapper
>     return f(*new_a, **new_kw)
>   File "C:\Python27\lib\site-packages\moviepy\Clip.py", line 95, in get_frame
>     return self.make_frame(t)
>   File "C:\Python27\lib\site-packages\moviepy\video\io\ImageSequenceClip.py", line 101, in make_frame
>     self.lastimage = imread(self.sequence[index])[:,:,:3]
>   File "C:\Python27\lib\site-packages\imageio\core\functions.py", line 185, in imread
>     reader = read(uri, format, 'i', **kwargs)
>   File "C:\Python27\lib\site-packages\imageio\core\functions.py", line 108, in get_reader
>     'in mode %r' % mode)
> ValueError: Could not find a format to read the specified file in mode 'i'

This was executed in a directory containing 694 .jpg files. Could this be because my system is using a 64-bit install of python and imageio install a 32-bit version of ffmpeg? (When I ran the function to install ffmpeg it had 32 in its name.)

More information.
Windows 10 64-bit
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40)

@mgaitan
Copy link
Collaborator

mgaitan commented Apr 16, 2018

@wgaylord could you share the error traceback with proper formating (i.e, as code, so it preserve right indentation). It's very hard to read in this way, and make very difficult to help you

@tburrows13
Copy link
Collaborator

@mgaitan I’ve edited the original post to properly format the code. Thank you for trying to help!

@mgaitan
Copy link
Collaborator

mgaitan commented Apr 16, 2018

are you sure there is only images on that directory? could you debug it?

@wgaylord
Copy link
Author

wgaylord commented Apr 16, 2018 via email

@mgaitan
Copy link
Collaborator

mgaitan commented Apr 17, 2018

For instance, which are the values uri and format on the problematic line

 reader = read(uri, format, 'i', **kwargs)

on ipython, you can enter in a postmortem debugger after running %pdb.

anyway, this seems to be a duplicated of #219 , and what I guessed is that it could be a hidden file like a ".DS_store"`in the same directory, and somebody point that here #219 (comment)

@keikoro
Copy link
Collaborator

keikoro commented Dec 16, 2018

@wgaylord Did you manage to solve the issue? Was it indeed a duplicate of the other issue mentioned (above)?

@keikoro
Copy link
Collaborator

keikoro commented Dec 16, 2018

(Looking to label/close this if it's a dupe.)

@keikoro keikoro added the stale For issues lacking activity, whose creators have become unresponsive,... label Dec 16, 2018
@wgaylord
Copy link
Author

wgaylord commented Dec 17, 2018

Well as I can’t give you more information. I say close this. As I have used it on other images. Still can’t get it to work on those images even when I move them to another folder.

@keikoro keikoro added the images Related to ImageClip, or handling of images in general. label Dec 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
images Related to ImageClip, or handling of images in general. stale For issues lacking activity, whose creators have become unresponsive,...
Projects
None yet
Development

No branches or pull requests

4 participants