User:YukinoAi/Tutorial Scratchpad

From AniDB
Jump to navigation Jump to search

Anime DataBase (AniDB) is a website that provides information about Anime.

It keeps track of show information and fansub releases for them. It has some social aspects as well. More info. Databases are only useful if they are updated frequently, so this tutorial is about keeping fansub releases on AniDB up to date.

Note This guide has a lot of theory to help explain how to interface with AniDB. For a more concise guide, please consider: Tutorial:How to Add Files for Dummies!


AniDB needs to know 3 things to create a full entry for a release:

  1. Which group (or user) released the file.
  2. The unique hash of the file and file name.
  3. The file metadata (resolution, audio tracks, subtitles, etc).

The Avdump2 utility can be used to automatically update AniDB file entries and will be used later.

  • The release group should be associated with each file when creating an entry for it.
    • Non-offical, or files that are not distributed, should not be added.
    • Release group examples: Horrible Subs, Kametsu, and Doki.
  • Before creating an entry for a file, the unique ed2k hash must first be calculated because the ed2k hash will be used in identifying the file.
  • The ed2k hash for the unique identifier can be generated by using Avdump2, or any other program that can generate ed2k hashes.
  • The file's metadata should be updated using the Avdump2 tool.

And so, it is convenient to use the Avdump2 tool to both generate the unique identifier and also update file metadata.

Additional Resources:


  1. Obtain a file to add to AniDB.
    1. The group name is usually present in the file name or description.
  2. Create an AniDB account.
  3. Login and verify that account.

Creating an API Key


At some point, meta-information for files should be submited using Avdump2. That meta-information is initially associated with the user account that made the submission. While users normally enter usernames/passwords for authentication, Avdump2 needs a unique string of characters to update meta-data. In this context, the string of characters that authenticates a user utilizing Avdump2 is known as an API Key or a UDP API Key.

UDP API keys can be specified in the user profile section on


Log in to AniDB
On the left navigation pane, at the bottom is a section labeled Account. Click on Settings.

Under profile, in the main navigation window, there are tabs. Click on the one that says Account (highlighted for emphasis).

There should be a section called UDP API Key with two fields, one with a label and another empty one.

Any alphanumeric (a-z, A-Z, 0-9) character sequence no longer than 32 characters will work for the API key. For the purposes of this tutorial GRC's Perfect Passwords will be used.

Open a new tab in the web browser and go to GRC's Perfect Passwords page.

In the last box of characters labeled a-z, A-Z, 0-9, highlight 20-30 characters as shown below.

Grc pp 20charas

Then copy the selected characters to the clipboard.

  • Right-Click - Copy
  • Ctrl + c

Change tabs back to AniDB's page.

In the empty field under the UDP API Key, right-click and select Paste. Alternatively: Ctrl + v.

Click on the Apply button at the bottom. It should be right above Back.
The UDP API Key field should turn into asterisks (*) to show that it has saved it properly.
The API key should also be saved for use with Avdump2 later on, so lets save it to notepad.

Windows key or Click on the start menu and type in notepad.


Save the file as something descriptive or as anidb_apiKey.txt in your user profile folder (C:\Users\User) or desktop (C:\Users\User\Desktop).

  • File - Save As...
  • Ctrl + s

Changes to the API key are updated immediately server-side but old entries are cached for an unspecified amount of time, usually less than 30 minutes. Attempting to use the new key before the old key has been removed from the cache will produce this error in the Avdump2cl.exe:

The Avdump2 GUI will simply not respond when authentication fails. More on this later.

Dealing With Groups


Every file entry should be associated with a release group. The group name or tag is usually in the file name, usually in brackets [ ]. It is important to identify the release group and to verify the group already exists in AniDB.


Filename Group Name or [Tag]
[Yuki] Log Horizon - 01 (BD 1080p HEVC Dual-Audio AAC) [2D099D6D].mkv Yuki
Log Horizon - 01 (1080p) BD x265 10-bit (DualAudio) AC3 AAC [KoTuWa].mkv KoTuWa
[ReinForce] Log Horizon - 01 (BDRip 1920x1080 x264 FLAC).mkv ReinForce
[JacobSwaggedUp] Log Horizon - 01 (BD 1280x720).mp4 JacobSwaggedUp
Log.Horizon.S01E01.720p-Hi10p.BluRay.AAC2.0-CTR.[B73B6592].mkv CTR
{AnimeServ.NET} Log Horizon 01 (Blu-ray)(1920x1080 x264 AAC).mp4 AnimeServ.Net
[RHxUHA-WING]Log_Horizon_S1[01][BIG5][720P].mp4 RHxUHA-WING
[BDMV][150724] Log Horizon - Vol.1 n/a
(Shin-Raw) Log Horizon 01 720p (HEVC-HEAAC) [7F99A1E7].mp4 Shin-Raw

For Anime, most groups put their names in brackets [ ] but not always. Group names like DVDISO, RawDVD, BDMV, Anime BD, RAW, R2RAW are keywords that indicate a group is not associated with the upload, usually for uploading unmodified content.

When there is a - or & in the group name, that sometimes means it is a joint release between 2 or more groups. Joint releases are also known as "virtual" releases in AniDB terminology.

In an example above, RHxUHA-WING may be a single group's name or it may be 2 different groups, RHxUHA and WING. Read the description in the download page to find out or search AniDB.

Verify the group exists by searching for it on AniDB.


Open Anime DataBase (AniDB).

At the top right next to Search change the search type from all to group.

Enter the group name found in the filename and click on Search. In the example below, Doki is used as an example of a group (highlighted for emphasis).

Click on the group name in the Name column. In the below example it would be Doki Fansubs.

Only if the group does not exist, create it. Before actually adding a group, read this and this.

For the purposes of this tutorial, it will be assumed the group name already exists.

On Using Avdump2


  • A file entry in AniDB has 2 main components, the entry itself and the associated metadata.
  • AniDB stores metadata information for files that are not yet in the database. This means it is possible to add a file entry and then add the metadata, or alternatively, add the metadata to AniDB and create the file entry later.
  • The metadata and the file entry are normally linked using a unique identifier created from the Ed2k-hash and the filesize.

Thus, to create a file entry in AniDB, the ed2k hash must be known and the group name should be known.

The main purpose of the Avdump2 utility, and its GUI wrapper, is to automate updating AniDB file entries. It does 3 things:

  1. Hash files to identify them (ed2k).
  2. Extract Audio/Video/Subtitle and other media information.
  3. Send that information to the server.

Together, the hash information and the media information are called a "dump," short for metadata dump or file dump.

This tutorial will cover creating files associated with a release on AniDB using their ed2k identifier also submitting dumps.


The description is missing or severely incomplete.
If you can, please help by explaining it.

Download the portable GUI version, direct, (it has both the CLI and GUI) and extract it to C:\Users\User\Downloads. See this random 7-Zip Tutorial. Alternative MSI installer.

For the purposes of this tutorial, it will be assumed the CLI tool is at:
And the GUI tool is available at:

  • Avdump2CL.exe is a non-interactive program with a command line interface (CLI).
    • It can export ed2k links that can be used to create file entries on AniDB using the --ExportEd2kLinks flag (short form: --Exp).
    • it can also submit metadata dumps for processing. This is done using the --Authentication flag (short form: --Auth) with a Username/UDP API key pair.
  • Avdump2gui.exe is a graphical user interface (GUI) wrapper around the CLI with a subset of the CLI's functionality.
  • Avdump2gui.exe must be used with an API key at all times.

To calculate and export the identifier information, including the ed2k hash, use either the Avdump2 CLI or GUI.

Avdump2 CLI

Command Prompt Introduction


Start a command prompt:

  • Windows + r - Type cmd.exe and press Enter.
  • Or
  • Windows key - Type cmd.exe and press Enter.

Let's change the current path to C:\Users\User\Downloads\avdump-gui-2.3.2-portable\appdata\avdump-gui-2.3.2.win32 using cd or pushd.

pushd C:\Users\User\Downloads\avdump-gui-2.3.2-portable\appdata\avdump-gui-2.3.2.win32


Open an explorer window to: C:\Users\User\Downloads\avdump-gui-2.3.2-portable\appdata\avdump-gui-2.3.2.win32 and drag and drop the folder icon on the top left of the address bar to the command prompt window.

This will populate the command prompt window with the path to the folder automatically, as shown below. This technique can also be used for individual files.

With the command prompt window selected, press the Home key or hold the Left Arrow on the keyboard to change the cursor to the position furthest to the left.

Enter cd and a single space.

Press Enter.

The cd stands for current directory and using it has changed the current directory of the command prompt window to the extracted path of Avdump2CL.exe.

It is possible to verify Avdump2CL.exe is in the current directory by listing the directory contents or checking to see if the file itself is present. List the direct contents using dir, or, for Linux, ls.

Or check for the executable directly by typing the first few characters av and using Tab to cycle through the available options.

Running Avdump2CL.exe without any options will list many available options.

Running Avdump2CL.exe --help will list all of the available options.

Generating ed2k Links Using Avdump2 CLI

The syntax of Avdump2CL.exe is:

Avdump2CL.exe [--options] [file/folder] [file/folder]

This means that Avdump2CL.exe takes some options and also one or more file or folder paths. The options will specify the type of processing and what file or folder to process.

For the purproses of this tutorial, there is a file named:
[Yuki] Log Horizon - 01 (BD 720p HEVC Dual-Audio AAC) [F8708ABE].mkv
And this file has been placed in:
C:\Users\User\Downloads\Log Horizon

To check what happens when a file or folder is specified but with no processing options, enter `Avdump2cl.exe', and then a space and then drag a file to the command prompt window.

The file name with the full path will be automatically populated in the command prompt window.

Press Enter.

So Avdump2cl.exe complains that no processing options has been specified, so there is nothing to do. So let's give it something to do.

We are trying to use this program to extract ed2k hash information to create a new release on AniDB. That is done using the --ExportEd2kLinks option, or --Exp for short.

The syntax is: Avdump2cl.exe --Exp=[ed2kFileName] [file/folder]

When running the actual command, the file/folder section should be substituted for the actual file or folder name as in the previous command. ed2kFileName should be substituted for a text file name, like ed2k.txt. An example of these substitutions is shown below.

Let's run the command and see what happens.



Avdump2cl.exe seems to have processed the file and created a text file called ed2k.txt in its current directory. The file contains one line of contents:

ed2k://|file|[Yuki] Log Horizon - 01 (BD 720p HEVC Dual-Audio AAC) [F8708ABE].mkv|484345397|C33743B735BF1B282B185E1B2E611270|/

This is what the ed2k links used by AniDB look like. After the protocol specifier (ed2k://), is the file keyword, the filename, the file size, and then finally the ed2k hash.

The file size 484345397 is in raw bytes. 484345397 divided by 1024 is 472,993.55 which is the size shown in explorer:

C33743B735BF1B282B185E1B2E611270 happens to be the ed2k hash of this specific file. Every file will have a different ed2k hash.

Let's inform AniDB that this file exists using the ed2k link.

Adding File Entries to AniDB


Open a web browser and login to .

Go to the entry of the Anime in AniDB you want to add a release for. This can be done by using the search feature.

At the top right, enter the name of the Anime. For the purposes of this tutorial the series name is Log Horizon. Change the content type to anime and then click on Search.

Log Horizon has multiple seasons, so each of them are displayed. Click on the correct season.

Scroll down to the Group Status section. Click on the + Add New Release button.

This should bring up the mass add files page.

Set the group, source, release date, quality, track, and language options.


Let's start with the group. Enter the group name and click on Search.

The group name should change and have a drop down menu. Be sure to select the correct group name, identified above in Part B. For the purposes of this tutorial, the correct group name is Yuki Subs [YukinoAi].

Change the template from manual to the most appropriate setting. [Yuki] Log Horizon - 01 (BD 720p HEVC Dual-Audio AAC) [F8708ABE].mkv is labeled as Dual-Audio so the dual template should be used. For most fansub releases with only a single japanese audio track and subtitles, the fansub template should be used instead.

Select source and quality of the file:

Source Quality
DVD/BD very high
DTV high
VHS low

If you happen to know any more information about the file, like if the CRC32 of the file matches the official source, enter it. When in doubt, leave that field unmodified. Audio and subtitle track information can usually be left alone alone because that information will be updated later when the meta-data dump uploaded to AniDB becomes associated with the file entry.

At the very bottom, paste the ed2k link from and click on Next.

Make sure the episode number is correct. If you happen to know the date the file was first distributed, enter it in format. When the information looks correct, click on Add Files.


To verify the stub-entry exists, go back to the Anime page. In the Group Status Section, click on the expand button for the group.

This will populate the Episodes section with file entries for that group. In the image below, episode 1 of Log Horizon has 2 file entries for the selected group. The top entry has already had the meta-information filled in by Avdump2. The bottom entry is the stub that was just created.

  • Notice that the audio track, resolution and subtitle information was filled in by Avdump2 automatically for the top file where as this information is not yet correct for the bottom file.
  • Under the Hash column, there is an icon AU overlayed and a checkmark. This means a the file was verified by Avdump2.
  • The bottom file has CRC overlayed with a checkmark. That means the entry has been marked to indicate that the CRC for the file, matches the official one provided by the release group.
  • So the top file has not been marked as having a verified CRC and the bottom one has not had its metadata updated by Avdump2. Let's fix the metadata.

Back in command prompt world...

Adding Dumps Using Avdump2 CLI

So, the idea is to use Avdump2cl.exe to send a metadata dump to the server. This can be done using the --Authentication flag, or --Auth for short. The auth flag instructs Avdump2cl.exe to attempt to authenticate with AniDB servers. If authentication fails, Avdump2cl.exe will print an error message and stop. If successful, Avdump2cl.exe will process the file and attempt to send the dump to AniDB servers.

Note: Please note that all data sent to the server will be logged using IP and user id. If you would like to check what data will be submitted to the server after authentication, run the following command:
Avdump2cl.exe -ca [file/folder]

The auth flag has the following syntax:

Avdump2cl.exe --Auth:[username]:[api_key] [file/folder]

username in the above command should be subtituted with your AniDB username. The api_key is the character string that was specified in the AniDB profile in Part A. Notice the colon : in between the username and api_key. If following this tutorial, it should be available at C:\Users\User\anidb_apiKey.txt or C:\Users\User\Desktop\anidb_apiKey.txt. Copy it and right-click paste it into the command prompt:

Enter a space and then drag and drop the file to add to AniDB into the command prompt window as before:

The command below should be sufficent to submit the meta-data.

Press Enter. If it works, the following should appear after processing completes:

The line that says:
ACReq( Done: 0 Todo: 1 Failed: 0 Pending: 0 )
Means that processing has finished and Avdump2cl.exe will attempt to upload the dump.

The line that says:
ACReq( Done: 1 Todo: 0 Failed: 0 Pending: 0)
Means the server has accepted the data from Avdump2cl.exe and will store it for later processing. Success!

If you get an error like the following:

  • Double check the API key is correct.
  • The API key being used should be exactly the same one that was entered in the user profile page.
  • UDP API keys should also be alphanumeric and no longer than 32-characters. Keys longer than 32 characters may get trunkated to 32.
  • Since UDP API keys are cached, changing API keys will take some time to clear, usually less than 30 minutes. Attempting to authenticate before that will result in the above error, even if using the correct key and syntax. So wait 30 minutes and try again basically.

If you get an error like the following:

  • Notice the error is from ACReq.Authentication. This indicates something to do with authentication caused the error.
  • In the above command, that is due to a syntax error in the --Auth switch. The correct syntax is --Auth=username:api_key but in the above command the username is missing.
  • Press the up arrow key to bring up the previous command in the command prompt window. Then fix the syntax and run the command again. It should then work.

Assuming dump submission succeeds, the AniDB page for the file will likely show the following:

In other words, while the correct meta-data has been submitted as part of a dump to AniDB, the information for that file has not changed.

This is normal. There is a delay for certain submissions to AniDB. The next section contains more information about how change requests work but for now just know there is a delay and the information will be automatically updated later.

For the file above, this is what the information looked like less than 24-hours later:


Automating Avdump2 CLI

So far, we have added a single file entry and submitted the associated dump for processing. However, Log Horizon S1 has more than 1 episode. Updating each episode this way, by running Avdump2cl.exe twice, once to create the ed2k link and a second time to submit the dump data, would take an excessively long time. Avdump2cl supports combing different flags together into one command:

Avdump2cl.exe --Auth=[username]:[api_key] --Exp=[filename] [file/folder]

If the above command syntax is used on a file, Avdump2cl.exe will authenticate with AniDB servers, then if successful, will process the file, submitting the meta-data to AniDB and then export the ed2k link to a file. This means we can run half the number of commands and still get the output needed to update AniDB!

There is another thing to notice about that syntax. At the end, it says file/folder meaning that Avdump2cl.exe also supports specifying a folder instead of individual files. If a folder is specified, like say: C:\Users\User\Downloads\Log Horizon then Avdump2cl.exe will process every file inside of that folder, generating ed2k links for each file.

With the above information, the actual command to run would be:
Avdump2cl.exe --Auth=YukinoAi:uFEV55lknCwglqdRp1jte36NQ --Exp=Avdump2cl-ed2k-Links.txt "C:\Users\User\Downloads\Log Horizon"

Notice that C:\Users\User\Downloads\Log Horizon needs quotation marks " " surrounding it because Log Horizon has a space. As long as there are no spaces, quotation marks do not have to be used. Without quotation marks, Avdump2cl.exe will treat and process all of the files in C:\Users\User\Downloads\Log and also all of the files inside the Horizon folder. Since neither of these folders exist, the commad will fail:

If using the drag and drop technique instead of copy-paste, quotation marks will automatically be added as appropriate.

So, running the above command with proper quotation marks will work. The ed2k links generated in the text file can be added to AniDB using the Mass Add page as shown above. However, having to worry about syntax is cumbersome, as is starting a command prompt. Is there not a better way?

An alternative approach is to create a shell script that will invoke Avdump2cl.exe with the correct syntax automatically. If anything bad happens, like authentication or syntax errors, it will be easy to solve because the correct syntax can just be copied from the text file back to a normal command prompt.

Open notepad and copy-paste the following cryptic text into a file called AniDBUpdate.bat or just download it [here].

@echo off
set username=putUsernameHere
set api_key=putApiKeyHere
set pathToAvdump2=C:\Users\User\Downloads\avdump-gui-2.3.2-portable\appdata\avdump-gui-2.3.2.win32

set mode=auth
::mode can be either exp or auth

if /i "%~1" equ "" (goto usage)
if /i "%~1" equ "?" (goto usage)
if /i "%~1" equ "/?" (goto usage)
if not exist "%~1" (echo.
echo   "%~1" does not exist
goto usage)

if not exist "%pathToAvdump2%\Avdump2cl.exe" (echo.
echo   "%pathToAvdump2%\Avdump2cl.exe" does not exist
goto usage)
if /i "%username%" equ "putUsernameHere" goto usage
if /i "%api_key%" equ "putApiKeyHere" goto usage

if /i "%mode%" equ "exp" "%pathToAvdump2%\Avdump2cl.exe" --Exp="%~dp1\ed2k-%~n1.%random%.txt" "%~1" "%~2" "%~3" "%~4" "%~5" "%~6" "%~7" "%~8" "%~9"
::if /i "%mode%" equ "exp" "%pathToAvdump2%\Avdump2cl.exe" --Exp="%userprofile%\Desktop\ed2k-Link-%~n1.%random%.txt" "%~1" "%~2" "%~3" "%~4" "%~5" "%~6" "%~7" "%~8" "%~9"
if /i "%mode%" equ "auth" "%pathToAvdump2%\Avdump2cl.exe" --Auth="%username%:%api_key%" --Exp="%~dp1\ed2k-%~n1.%random%.txt" "%~1" "%~2" "%~3" "%~4" "%~5" "%~6" "%~7" "%~8" "%~9"
::if /i "%mode%" equ "auth" "%pathToAvdump2%\Avdump2cl.exe" --Auth="%username%:%api_key%" --Exp="%userprofile%\Desktop\ed2k-Link-%~n1.%random%.txt" "%~1" "%~2" "%~3" "%~4" "%~5" "%~6" "%~7" "%~8" "%~9"

goto end
echo   OMG^! Hi^!^!^!  Usage Help:
echo   %~nx0 can be used to automate usage of Avdump2cl.exe
echo   Please update "username" and "api_key" before using %~nx0.
echo   CLI Usage: 
echo       %~nx0 "C:\Users\User\Downloads\Log Horizon"
echo       %~nx0 "C:\Users\User\Downloads\Log Horizon\episode01.mkv"
echo   Drag and drop also works.
echo   For "right-click Send to" functionality, copy a shortcut to:
echo   "%appdata%\..\roaming\Microsoft\Windows\SendTo"


The three highlighted items need to be changed before using the script. Update the username and API key appropriately. Make sure there are no trailing whitespaces in either the username or api_key. "Name" will work but "Name " will not. Example:

For the pathToAvdump2 entry, the path should not include a trailing \.


  • C:\avdump-gui-2.3.2-portable will work.
  • C:\avdump-gui-2.3.2-portable\ will not work.

After entering the username and the UDP API key, here are 3 ways to run the above text file:

1) Hardest: Command prompt method: Navigate to the correct directory and type AniDBUpdate.bat.

2) Drag and drop method: Drag and drop a file or folder onto the batch file.

3) Easiest: Send-to method: Use the right-click Send to context menu.

For the send-to method to work, the file, or a shortcut to it, must be placed at:
To open this folder automatically, paste the following into an explorer address bar or Windows key + r

  1. Ctrl + c to copy: "%appdata%\..\roaming\Microsoft\Windows\SendTo"
  2. Windows key + r
  3. Ctrl + v to Paste the above contents
  4. Press Enter
  5. Right-Click - create a new shortcut
  6. Move the shortcut from where it was created to \SentTo.
  7. Rename the shortcut appropriately.

With the command prompt and send-to methods:

  • Up to 9 discrete files and folders may be selected
  • When sending a folder, all files within that folder and all subfolders will be processed.

Avdump2 GUI

Avdump2gui.exe is the graphical user interface (GUI) wrapper for Avdump2cl.exe and supports a subset of the features:

Avdump2 GUI Limitations. The GUI:

  • always requires authenticating.
  • will not generate links without specifying a valid username and valid API key pair, every time.
    • Note: This information is forcibly saved across instances.
  • must be deliberately started every time to be used.
  • will not issue an error message when authentication fails and simply not respond.
    • If the GUI does not respond, it is advisable to test for authentication errors using Avdump2CL.exe.
  • requires updating prior to usage.

With these limitations in mind. Launch Avdump2gui to have it update automatically.

  1. Specify the username and api-key.
  2. Use the Files and Folder buttons too add files to process.
  3. When complete, click start to see what happens.
    1. If/When nothing happens check for authentication errors using Avdump2CL.exe using the instructions provided above.
  4. If it works, nothing will happen for a while, and then eventually ed2k links will appear in the ed2k export window. The dump data should have been submitted to AniDB in the background, although there is no way to check.

The ed2k links in the export window can now be submitted to AniDB. Detailed instructions for this are provided above.

Understanding AniDB Change Requests (creqs)

The description is missing or severely incomplete.
If you can, please help by explaining it.

AniDB is a user-driven database. A normal way to contribute is to issue change requests (creqs for short), which means that a moderator has to approve suggested changes before they are published. Request links can usually be found on every page that has editable content for logged in users.

  • Except for obvious changes, always describe the reason for changes in the request and/or the source of the information.
  • Be prepared to follow up the requests made. Creqs will be denied if there is no response to moderator questions.

More info:

Avdump2, used above, is AniDB's mechanism to submit automatic change requests (acreqs or auto-creq). These automatic change requests do not always require moderator approval because the information (file-metadata) has been verified programmatically. For auto-creqing:

  • All data sent to the server will be logged with IP and user id.
  • There is no direct connection between data sent to AniDB and creqs generated. The data dumps will just be stored for later processing into creqs.
  • There is no way to check the current status for a dump.
  • Avdump2cl.exe will display a count of the files that have been submitted to the server as output as ACReq ( Done: # [...], but that is all.
  • Usually, it should take at least 24 hours from the moment a file metadata dump has been submited untill the file data actually changes. If any irregularities occur, or when there is too much data pending, it will take more time. The system auto-creqs to add missing tracks within 72 hours.
  • It is possible to dump files currently not in the database. The data is still stored and will be used later if/after the file has been registered.

In other words, when Avdump2 submits meta-data dumps to AniDB, the data itself may get processed into a change request. But first, in order to automatically apply the dumped metadata information to a file, that file must be registered first. The process of submitting ed2k links is that registration process. The metadata dumps themselves also contain the ed2k hash information that serves as the basis to link it to registered files.

To learn more about creqs please check out:

"Adding Data" subsection on wiki/Main_Page

For further help with a problem or just for chatting visit IRC:

Wiki page for IRC: wiki/IRC:anidb
Channel Address: irc://