Donmai

How to upload ugoira, the new pixiv animation system

Posted under General

He meant to replace <post number> with the post number, so it should be
ruby pixanim.rb 44579303 webm
That's just the way it's usually presented, since if he had said sth like "ruby poxanim.rb post number image format" that'd be pretty confusing. By the way, if you check the commentary part of his script, you'll notice that usage syntax is written there as well. Ah, and since you probably haven't read the commentary in his script, I suggest running "gem install rubyzip" and "gem install mechanize" in cmd before the script. Those two are unmentioned in guide since it's literally one cmd line each to install them

wrr said:

I am pretty sure I got that one correctly

Nope, earlier you posted this:

wrr said:

c:\>ruby pixanim.rb <44579303> <webm>
< was unexpected at this time.

The c:\ part means that you're in the root folder. Unless you saved pixanim.rb into that folder (unlikely) then you're in the wrong folder.

Toks said:

It's in the folder you're running the script from.

but is not there that is the problem.

also every time I want to make gif. I have to re-instal rmagic again. kinda annoying really

I have lot of this while installing

unable to convert "\x90" from ASCII-8BIT to UTF-8 for ext/RMagick/RMagick2.so, skipping

I had those as well, they don't really get in the way.
Can you post the results of a successful running of the script? Then we can tell you where it's saved (or perhaps see an error code that you didn't)

wrr said:

ok first one is where I get "succesful" webm but not gif

http://pastebin.com/8Z1APy47

then second one is where i re-install rmagick which resulting successful gif (that actually been save to ruby folder) but not webm

http://pastebin.com/nK7er8MX

  • Make sure you have a recent version of imagemagick installed. I have 6.8.9 installed, if you have an older one then uninstall it and then reinstall the newer one. Imagemagick installs ffmpeg, so this should fix the "Unrecognized option 'codec:v'" problem too.
  • Make sure you have mkvmerge installed too, and in your PATH. I'm not seeing anything related to mkvmerge in there so it might have failed to run.

First of all, your script is actually saved as "pixanim.rb.rb", that's why you can't run it via "ruby pixanim.rb".

Next, ffmpeg on your second screen complains about '-codec:v' option. Your version says it was compiled at 2010, while (as far as I understood from http://ffmpeg-users.933282.n4.nabble.com/converting-1080-to-720-mpeg2-td4426788.html) -codec:v was introduced at oct-nov 2011. Either upgrade your ffmpeg (via codec pack, probably?) or fix script to say "-vcodec" where it says "-codec:v". Also, on your first screen ffmpeg says it was built at "2014"... Do you have multiple versions installed?

You shouldn't need to reinstall rmagick each time, it's very strange.

It is probably an old version of imagemagick. I myself also have multiple versions of ffmpeg, with a really recent one in path, but running the script always ends up using the one in the imagemagick folder (actually I tried to change that and failed). If it gives trouble with syntax for an old version of ffmpeg, that also suggests the imagemagick version is also older than it needs to be

1 3 4 5 6 7 8 9 10