Giter VIP home page Giter VIP logo

Comments (5)

jbusecke avatar jbusecke commented on May 26, 2024

Thats a great idea. We should definitely do that.

from xmovie.

jbusecke avatar jbusecke commented on May 26, 2024

Actually could you try running the movie creation with verbose=True. I think that already does a similar thing.

from xmovie.

tomchor avatar tomchor commented on May 26, 2024

That's a good point. I missed that option.
However, I get an error when that option is activated:

TypeError                                 Traceback (most recent call last)
~/ML6mov.py in <module>
     41     gif_palette=False,
     42     gif_resolution_factor=0.5,
---> 43     gif_framerate=10,
     44 )
     45 

~/miniconda3/envs/p37/lib/python3.7/site-packages/xmovie/core.py in save(self, filename, remove_frames, remove_movie, progress, verbose, overwrite_existing, framerate, ffmpeg_options, gif_palette, gif_resolution_factor, gif_framerate)
    462             verbose=verbose,
    463             framerate=framerate,
--> 464             ffmpeg_options=ffmpeg_options,
    465         )
    466 

~/miniconda3/envs/p37/lib/python3.7/site-packages/xmovie/core.py in write_movie(sourcefolder, moviename, frame_pattern, remove_frames, verbose, ffmpeg_options, framerate)
    209         sourcefolder, moviename, framerate, frame_pattern, ffmpeg_options
    210     )
--> 211     p = _check_ffmpeg_execute(command, verbose=verbose)
    212 
    213     print("Movie created at %s" % (moviename))

~/miniconda3/envs/p37/lib/python3.7/site-packages/xmovie/core.py in _check_ffmpeg_execute(command, verbose)
    134     else:
    135         try:
--> 136             p = _execute_command(command, verbose=verbose)
    137             return p
    138         except RuntimeError:

~/miniconda3/envs/p37/lib/python3.7/site-packages/xmovie/core.py in _execute_command(command, verbose, error)
    116             if out_check != "":
    117                 # only display 10 lines, this cant be that hard?
--> 118                 sys.stdout.write(out)
    119                 sys.stdout.flush()
    120     else:

TypeError: write() argument must be str, not bytes

from xmovie.

brianmapes avatar brianmapes commented on May 26, 2024

I had the same issue -- lots of frames created, but ffmpeg was not installed, so had to run it again (slow).
Could ffmpeg be made a conda dependency so it is installed automatically?
Anyway, it works: so mainly, thanks!

from xmovie.

jbusecke avatar jbusecke commented on May 26, 2024

Hi @brianmapes, sorry for the long response time. I think a conda-forge feedstock would be a great addition. I opened a separate issue for this (#37), since it is technically not related to the original topic?

I was just looking through the codebase and it might also be helpful to check for an existing ffmpeg version before saving out all those frames?

I think this should be a rather easy fix (moving these lines into the class setup?)

from xmovie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.