Anime Scene Search Engine
Trace back the scene where an anime screenshots is taken from.
It tells you which anime, which episode, and the exact moment this scene appears.
Try this image yourself.
Link to trace.moe from other websites, you can pass image URL in query string like this:
https://trace.moe/?url=http://searchimageurl
For Bots/Apps, refer to https://soruly.github.io/trace.moe-api/
This repo is just an index page for the whole trace.moe system. It consists of different parts as below:
Client-side (gray parts):
- trace.moe-www - web server serving the webpage trace.moe
- trace.moe-WebExtension - browser add-ons to help copying and pasting images
- trace.moe-telegram-bot - official Telegram Bot
Server-side (blue and red parts):
- trace.moe-api - API server for image search and database updates
- trace.moe-media - media server for video storage and scene preview generation
- LireSolr - image analysis and search plugin for Solr
- trace.moe-worker - includes hasher, loader and watcher
Others:
- anilist-crawler - getting anilist info and store in mariaDB
- slides - past presentation slides on the project
You're going to need these docker images. They are provided in the docker-compose.yaml
file.
Parts | Docker CI Build | Docker Image |
---|---|---|
MariaDB | ||
Adminer | ||
redis | ||
liresolr | ||
trace.moe-www | ||
trace.moe-api | ||
trace.moe-media | ||
trace.moe-worker-hasher | ||
trace.moe-worker-loader | ||
trace.moe-worker-watcher |
Copy .env.example
to .env
and update config as you need.
WWW_PORT=3310
API_PORT=3311
MEDIA_PORT=3312
ADMINER_PORT=3313
SOLR_PORT=8983
NEXT_PUBLIC_API_ENDPOINT=http://localhost:3311 # external URL
NEXT_PUBLIC_MEDIA_ENDPOINT=http://localhost:3312 # external URL
WATCH_DIR=trace.moe-incoming/ # suggest using fast drives
MEDIA_DIR=trace.moe-media/ # suggest using large drives
HASH_DIR=trace.moe-hash/ # suggest using fast drives
SOLR_DIR=mycores # suggest using super fast drives
MYSQL_DIR=mysql
TRACE_MEDIA_SALT=YOUR_TRACE_MEDIA_SALT
TRACE_API_SALT=YOUR_TRACE_API_SALT
TRACE_API_SECRET=YOUR_TRACE_API_SECRET
MARIADB_ROOT_PASSWORD=YOUR_MARIADB_ROOT_PASSWORD
- If you are installing it on Linux, ensure the directories are created and empty before starting the containers. The
SOLR_DIR
, must have it's owneruid
andgid
set to8983
.
mkdir -p trace.moe-incoming/
mkdir -p trace.moe-media/
mkdir -p trace.moe-hash/
mkdir -p mycores
mkdir -p mysql
sudo chown 8983:8983 mycores
docker-compose up
Media files will be imported when placed into the incoming folder (trace.moe-incoming
).
The files must be contained in 1-level folders, e.g.
trace.moe-incoming/foo.mp4 <= not ok
trace.moe-incoming/1/foo.mp4 <= ok
trace.moe-incoming/1/bar/foo.mp4 <= ok, but will be uploaded as /1/foo.mp4
trace.moe assumes the folder name is anilist ID. If your data is not related to anilist ID, you can use any id/text you want. The system would still work without anilist data.
Files must have the .mp4
extension and must be in the mp4 format inorder to be imported, other files will be ignored.
Do not create the folders in the incoming directory. You should first put video files in folders, then move or copy the folders into the incoming directory.
Once the video files are in incoming directory, the watcher would start uploading the video to trace.moe-media. When it's done, it would delete the video in incoming directory. After Hash worker and Load workers complete the job, you can search the video by image in your www website at WWW_PORT.