Workaround the upload limit?

I recently discovered asciinema and it seems a great tool - I want to record some video tutorials for a cli tool I am working on.

I recorded a few videos successfully but yesterday started hitting errors when trying upload new recordings:

asciinema: upload failed: <urlopen error [Errno 32] Broken pipe>
asciinema: retry later by running: asciinema upload /tmp/tmp0etnpv7q-ascii.cast

A quick bit of Googling tells me that I have exceeded the file size upload limit. The recordings in question are relativley short, only a couple of minutes so I can’t really break them down any further.

Is there anything I can do to get round this issue? It’s a total blocker for what I want to use the recorder for…

you could maybe bypass this by making smaller and less general casts (more focused on a single thing) and use multiple more specific rather than a giant one.

Also, using the interval option would make for long pause to dissapear hence saving you additionnal bytes here and there. A manual edit of each cast could also be done to remove unnescescessary bits of sequencing/delay/mistakes whatever might be.

Also, i would check if your terminal returns the result of the last command… like success something or whatever. Will look quickly if i can bring myself to remember on this mobile phone…

Notify callbacks are what i am referring to.

The way i use to remove them is by unsetting the variable PROMPT_COMMAND (in .bashrc in my case) whenever asciinema starts a recording session - You can set a trigger on ASCIINEMA_REC to unset this if needed. something like this works for me…

if [[ ! -z ${ASCIINEMA_REC} ]]; then
    unset PROMPT_COMMAND;
    export PS1=something_shorter_than_actual_path...;
fi

Hope the suggestions help, let us know what you end up trying and what works for you, it could inspire others!

If worste comes to worst, consider running your own server of the asciinema website and increase the limits or upload a different way to your server…

Thanks for this - I’ll give your suggestion a go when I get a chance.

I have been hitting this limit with quite small videos - only like three or four minutes - so did I wonder if there’s something wrong with something in my setup? Before I posted this I tried to trim them down as much as was thematically possible but it’s quite challenging.

Self hosting also occurred to me but I’m not going to go down that path unless totally necessary!

Instead of self hosting the actual thing, just hosting the cast files anywhere is enough to link and play them i believe… as long as asciinema is installed on the host.

Maybe you will need to set gzip to off on your webserver for thoses files tho, i am not sure.

1 Like

I wonder if bringing your own storage to an asciinema.org account would be worth considering.

For example, you would login to asciinema.org, then authorize it to access a folder on your Dropbox or Google Drive, which would then allow the server to place all the recordings you upload on your cloud drive. This way the upload limit could be removed (or raised significantly), and also as a bonus you would own all your recordings.

2 Likes

How about a method to allow people to easily use GitHub hosted files for storing their cast files?

They would still rely on asciinema.org for the JavaScript etc that lets you embed the cast as that’s convenient, but it would be pulling the content file from their repo. There is a file limit of 25Mb i believe but I’m guessing that would still cover pretty huge cast files.

I understand that files can be accessed by appending a ?raw=true suffix onto the URL, like so:

github.com/USER/REPONAME/FILENAME.cast?raw=true