Pixiv Chat

From Archiveteam
Jump to navigation Jump to search
Pixiv Chat
URL http://chat.pixiv.net/
Status Offline
Archiving status Saved!
Archiving type Unknown
Project source pixiv-grab
Project tracker pixiv
IRC channel #archiveteam-bs (on hackint)
(formerly #savepixiv (on EFnet))
Data[how to use] [1]

An oekaki chat service called Pixiv Chat was launched on December 15, 2009 for users to draw oekaki art while in a chat room. It shut down in June 2017.

Closure notice

pixiv Chat will be shut down on June 15th 2017 (Thu), at 12:00 (JST). Thank you for your support so far. In the future, we're planning to release a new pixiv Sketch function that will allow you to draw together with many other creators in real time.

* Please notice that the data you posted will only be available until pixiv Chat shutdown. If you want to save and archive the images in your chatroom pages, please be sure to do so before June 15.

Technical details

The site uses Flash to play back combined packets of data. This data is stored as AMF files, which is a common format with Flash. It stores the raw brushstrokes and other commands to playback the chatroom.

Chatrooms use the format http://chat.pixiv.net/roomtop.php?id=### and start at ID 1 and count upwards from there.

The URL format to download the AMFs is http://SVR.pixiv.net/SPLITID_0/SPLITID_1/SPLITID_2/LOG/AMFNAME. SVR is a server identifier, SPLITID_# is the room ID, LOG is a "log ID" (?), and AMFNAME is a filename.

SVR and LOG can be obtained from the chatroom HTML. In a JavaScript block, it contains a Flashvars line which contains the roomid, closed (whether the room is archived or not), log (used to get the AMF packets), svr (which server the AMF packets are stored on), and img (the thumbnail URL).

The SPLITID_# path components, you need to pad the room ID with zeros until total length is 9 (so room ID 1024 would be 000001024), and then split it into blocks of three (e.g. 000/001/024).

The AMFNAME (AMF filenames) are of the form A-B.amf where A and B are numbers starting from 1. The number of AMF files varies. To get a list of the AMF packets for download, retrieve http://chat.pixiv.net/api/capturepos.php?roomid=ROOMID, which returns a JSON reply of e.g. ["42","123","456","789"]. These are the endpoints of the filename number ranges; the corresponding filenames are 1-42.amf, 43-123.amf, 124-456.amf, and 457-789.amf.

Concrete example for room 1:

  • The Flashvars on http://chat.pixiv.net/roomtop.php?id=1 say that the server is chat-img01 and the log is da566919.
  • The padded and split room ID is 000/000/001.
  • From http://chat.pixiv.net/api/capturepos.php?roomid=1, we get ["50","197","399"]. So there are three AMF files, and they're called 1-50.amf, 51-197.amf, and 198-399.amf.
  • Combining this, the AMF URLs are:
    • http://chat-img01.pixiv.net/000/000/001/da566919/1-50.amf
    • http://chat-img01.pixiv.net/000/000/001/da566919/51-197.amf
    • http://chat-img01.pixiv.net/000/000/001/da566919/198-399.amf

See also