Giter Club home page Giter Club logo

Comments (16)

ku1ik avatar ku1ik commented on May 28, 2024 1

Combining 1131 screenshots into GIF file - that's quite a lot.

Anyway, after the above is printed all the 1131 PNGs are passed to imagemagick+gifsicle, this is what takes this time.

Slowness is one thing, but more importantly Docker container went out of disk space.
I'm not quite sure if Docker puts any (artificial) limits on the started containers. Worth investigating.

from asciicast2gif.

mathieu-aubin avatar mathieu-aubin commented on May 28, 2024 1

-S 1

from asciicast2gif.

koalalorenzo avatar koalalorenzo commented on May 28, 2024 1

which progress? Isn't this enough

docker run --rm -v $PWD:/data asciinema/asciicast2gif -s 3 -S 1 https://asciinema.org/a/327940.json vermin-v0.61.0-demo.gif

sorry i dont get it

@mathieu-aubin When it is combining the 300 screenshots into the GIF, seeing that it is doing the 299th will help me from interrupting right when it is about to be done :D

from asciicast2gif.

lalan7 avatar lalan7 commented on May 28, 2024

Finally finish we this error:

convert: unable to write pixel cache `/tmp/magick-29fn6FcP36q2mC': No space left on device @ error/cache.c/WritePixelCachePixels/5492.
convert: Too many IDAT's found `/tmp/tmp.KQuSBHp7HZ/1094.png' @ error/png.c/MagickPNGErrorHandler/1643.
.....
convert: Too many IDAT's found `/tmp/tmp.KQuSBHp7HZ/1127.png' @ error/png.c/MagickPNGErrorHandler/1643.
convert: corrupt image `/tmp/tmp.KQuSBHp7HZ/1127.png' @ error/png.c/ReadPNGImage/3973.
convert: unable to write pixel cache `/tmp/magick-29Tl_q7GLqRiIC': No space left on device @ error/cache.c/WritePixelCachePixels/5492.
convert: Too many IDAT's found `/tmp/tmp.KQuSBHp7HZ/1128.png' @ error/png.c/MagickPNGErrorHandler/1643.
convert: corrupt image `/tmp/tmp.KQuSBHp7HZ/1128.png' @ error/png.c/ReadPNGImage/3973.
convert: unable to write pixel cache `/tmp/magick-294uV8FtIbmAeT': No space left on device @ error/cache.c/WritePixelCachePixels/5492.
convert: Too many IDAT's found `/tmp/tmp.KQuSBHp7HZ/1129.png' @ error/png.c/MagickPNGErrorHandler/1643.
convert: corrupt image `/tmp/tmp.KQuSBHp7HZ/1129.png' @ error/png.c/ReadPNGImage/3973.
convert: unable to write pixel cache `/tmp/magick-29BMBPgDfJRcR9': No space left on device @ error/cache.c/WritePixelCachePixels/5492.
convert: Too many IDAT's found `/tmp/tmp.KQuSBHp7HZ/1130.png' @ error/png.c/MagickPNGErrorHandler/1643.
convert: corrupt image `/tmp/tmp.KQuSBHp7HZ/1130.png' @ error/png.c/ReadPNGImage/3973.
convert: unable to write pixel cache `/tmp/magick-29h15xjBUD74Bq': No space left on device @ error/cache.c/WritePixelCachePixels/5492.
convert: unable to extend cache `/tmp/tmp.KQuSBHp7HZ/0.png': No space left on device @ error/cache.c/OpenPixelCache/3682.
convert: unable to write pixel cache `/tmp/magick-29h15xjBUD74Bq': No space left on device @ error/cache.c/WritePixelCachePixels/5492.
convert: unable to extend cache `/tmp/tmp.KQuSBHp7HZ/0.png': No space left on device @ error/cache.c/OpenPixelCache/3682.
convert: unable to write pixel cache `/tmp/magick-29h15xjBUD74Bq': No space left on device @ error/cache.c/WritePixelCachePixels/5492.
convert: unable to extend cache `/tmp/tmp.KQuSBHp7HZ/0.png': No space left on device @ error/cache.c/OpenPixelCache/3682.
convert: unable to write pixel cache `/tmp/magick-29h15xjBUD74Bq': No space left on device @ error/cache.c/WritePixelCachePixels/5492.
convert: unable to extend cache `/tmp/tmp.KQuSBHp7HZ/0.png': No space left on device @ error/cache.c/OpenPixelCache/3682.
gifsicle: warning: trivial adaptive palette (only 2 colors in source)

the ouput of the gif is :

image

from asciicast2gif.

coderkan avatar coderkan commented on May 28, 2024

Hi,

I had the same problem. I waited more than 3 hours and nothing happened. My computer stops responding while running asciicast2gif convert gif.
Is there a limit to convert GIF?

Thanks.
Erkan

from asciicast2gif.

Vafa-Andalibi avatar Vafa-Andalibi commented on May 28, 2024

same here for a gif with 65 screenshots. It's taking more than 30 minutes on MacOS Mojave. Is this normal?

from asciicast2gif.

mathieu-aubin avatar mathieu-aubin commented on May 28, 2024

@Vafa-Andalibi can you try using my fork and see if it helps?

git clone --recursive https://github.com/mathieu-aubin/asciicast2gif

Using my fork, scale is set to 1 by defaut (decreases generation times x2).

You can also set a custom temporary directory using -T /path/to/custom-temp and If the custom temporary directory doesn't exist, it will create one like /tmp/asciicast2gif-tmp.GhPfPtRXZA/ so no need to worry about that...

Also, using environment variable DEBUG=1, you can view debugging informations.

i run it like this

DEBUG=1 ./asciicast2gif -T /tmp/custom-temp-directory https://asciinema.org/a/162519.cast out.gif

oh, and also, when using DEBUG, the temporary directory doesn't get deleted so if you wanted, you could run image optimizations on the files and then, create a gif using whichever gif program you'd like. For example, file 17.png of the following went down by 400.4 kB after optimization with xTinyPNG-cli

As example, using the same commanf, check out
THIS ASCIICAST

Resulting gif (3.0mb)
RESULTING GIF

You shouldn't run with docker as it runs an outdated version of gifsicle.

Also, try using the -S 1 (default on my fork) option instead of the default as this will greatly reduce the time spent generating file...

You could also set the niceness to -20 to give the app full priority, if you are not running on a super important production server that is (i hope not)

from asciicast2gif.

mathieu-aubin avatar mathieu-aubin commented on May 28, 2024

I've added a new option just now, -c <color_count to set GIFSICLE_OPTS colors to the amount you want. Could be useful for black and white casts...

Also, there is better debugging output

from asciicast2gif.

mhewedy avatar mhewedy commented on May 28, 2024

Same issue here with 300 screenshots using:

docker run --rm -v $PWD:/data asciinema/asciicast2gif -s 3  https://asciinema.org/a/327940.json vermin-v0.61.0-demo.gif

Take forever and doesn't work. (It used to work in past)

BTW, I need to reclaim disk space back from docker using (on macos):

> ~/Library/Containers/com.docker.docker/Data/vms/0/Docker.raw

which sometimes corrupt docker but reclaim the disk back.

from asciicast2gif.

mathieu-aubin avatar mathieu-aubin commented on May 28, 2024

asciicast

the output gif:

output gif

from asciicast2gif.

koalalorenzo avatar koalalorenzo commented on May 28, 2024

at least seeing the progress would help a lot! I am facing the same issue :(

from asciicast2gif.

mathieu-aubin avatar mathieu-aubin commented on May 28, 2024

which progress? Isn't this enough

docker run --rm -v $PWD:/data asciinema/asciicast2gif -s 3 -S 1 https://asciinema.org/a/327940.json vermin-v0.61.0-demo.gif

sorry i dont get it

from asciicast2gif.

mhewedy avatar mhewedy commented on May 28, 2024

asciicast

the output gif:

output gif

Thanks. 😍

from asciicast2gif.

ku1ik avatar ku1ik commented on May 28, 2024

Memory and disk space problems with asciicast2gif have been reported too many times, so I decided to approach this problem in a different way. I played with pure Rust implementation of gif generation and the result is https://github.com/asciinema/agg , which does the job faster, with very low memory usage and no extra disk space needed. Check it out. I don't plan to maintain asciicast2gif anymore. Long live agg!

from asciicast2gif.

ku1ik avatar ku1ik commented on May 28, 2024

I tested agg on @mhewedy's recording:

x

Result:

327940

Some unicode glyphs didn't render properly, other than that it looks alright, and it was generated in 4 seconds!

from asciicast2gif.

ku1ik avatar ku1ik commented on May 28, 2024

I also tried agg on @mathieu-aubin's 162519.cast:

y

Took 3 seconds, generated nice looking gif, although pretty heavy - 8.2 MB:

162519

I then ran gifsicle on it - gifsicle --lossy=80 -k 128 -O3 -Okeep-empty 162519.gif -o 162519-opt.gif - which resulted in 4.4 MB gif, with some visible loss in quality, although still not terrible:

162519-opt

from asciicast2gif.

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.