All Projects → soruly → trace.moe-media

soruly / trace.moe-media

Licence: MIT License
Media server for serving video preview for trace.moe

Programming Languages

javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to trace.moe-media

FontRNN
Implementation of FontRNN [Computer Graphics Forum, 2019].
Stars: ✭ 27 (-3.57%)
Mutual labels:  computer-graphics
opengl-demos
A list of small OpenGL applications to demonstrate concepts of Computer Graphics
Stars: ✭ 33 (+17.86%)
Mutual labels:  computer-graphics
OpenGL MPMSnowSimulation2D
2D Implementation of Material Point Method for Snow Simulation
Stars: ✭ 26 (-7.14%)
Mutual labels:  computer-graphics
MineCube
A Cool Voxel Editor Based on OpenGL 3.3+ !
Stars: ✭ 23 (-17.86%)
Mutual labels:  computer-graphics
ProceduralTerrain
Polygon is a procedural mesh generator in Unity.
Stars: ✭ 18 (-35.71%)
Mutual labels:  computer-graphics
neuraltexture
Learning a Neural 3D Texture Space from 2D Exemplars [CVPR 2020]
Stars: ✭ 88 (+214.29%)
Mutual labels:  computer-graphics
PARE
Code for ICCV2021 paper PARE: Part Attention Regressor for 3D Human Body Estimation
Stars: ✭ 222 (+692.86%)
Mutual labels:  computer-graphics
mLib
Research Library used in the Visual Computing Lab
Stars: ✭ 80 (+185.71%)
Mutual labels:  computer-graphics
tiny-path
An instructive one-file Ruby path tracer
Stars: ✭ 53 (+89.29%)
Mutual labels:  computer-graphics
stumpy core
Core components for working with images
Stars: ✭ 28 (+0%)
Mutual labels:  computer-graphics
Nabla
OpenGL/OpenGL ES/Vulkan/CUDA/OptiX Modular Rendering Framework for PC/Linux/Android
Stars: ✭ 235 (+739.29%)
Mutual labels:  computer-graphics
snarf
Official code release for ICCV 2021 paper SNARF: Differentiable Forward Skinning for Animating Non-rigid Neural Implicit Shapes.
Stars: ✭ 184 (+557.14%)
Mutual labels:  computer-graphics
DOT
Decomposed Optimization Time Integration (DOT) is a domain-decomposed optimization method for fast, reliable simulation of deformation dynamics. DOT efficiently converges with frame-rate time-steps across a wide range of extreme conditions.
Stars: ✭ 37 (+32.14%)
Mutual labels:  computer-graphics
ICON
ICON: Implicit Clothed humans Obtained from Normals (CVPR 2022)
Stars: ✭ 641 (+2189.29%)
Mutual labels:  computer-graphics
go-icp cython
Go-ICP for globally optimal 3D pointset registration
Stars: ✭ 79 (+182.14%)
Mutual labels:  computer-graphics
computer-graphics-from-scratch-Notes
my notes of reading the book <computer-graphics-from-scratch>
Stars: ✭ 31 (+10.71%)
Mutual labels:  computer-graphics
Super-Sunshine
A ray-tracer with a simple scene description language for easily generating beautiful images.
Stars: ✭ 115 (+310.71%)
Mutual labels:  computer-graphics
clumpy
create or transform numpy images from the command line
Stars: ✭ 38 (+35.71%)
Mutual labels:  computer-graphics
StudyNotes
学习笔记
Stars: ✭ 17 (-39.29%)
Mutual labels:  computer-graphics
vktut
Shabi's Vulkan Tutorials
Stars: ✭ 88 (+214.29%)
Mutual labels:  computer-graphics

trace.moe-media

License GitHub Workflow Status Docker Docker Image Size Discord

Media server for serving video preview for trace.moe

This server uses a "video scene cutter" which automatically detect timestamp boundaries of a shot, and then trim the shot out without leaking / exposing other frames that belongs to previous / next scenes. Currently this is used by the website trace.moe and its Telegram Bot @whatanimebot.

Background of this project

When search result from trace.moe returns an anime, episode and a timecode, it can generate a video preview for the scene at that time code.

Query image:

Search result: Shelter, episode 1, timecode: 00:00:51.83

Video Preview at time 00:00:51.83

Fixed offset without trace.moe-media Auto detect with trace.moe-media
00:50.93 (-0.9) to 00:53.93 (+2.1) 00:49.22 to 00:51.30 (dynamic)

By using first / last frames from the fixed offset preview, user may be able to use that to search again and reveal previous/next scene of the original video. By repeating this process, users may eventually read the whole video until the rate limit/search quota used up.

With the video preview generated by auto detect method, searching any frame form the preview would only results the same video preview. This prevents leaking the previous/next scene.

How does it work

To be completed

Getting Started

docker run -it --rm -v /path/to/video/=/mnt/ -p 3000:3000 ghcr.io/soruly/trace.moe-media:latest

List files

http://127.0.0.1:3000/list/

Video URL

http://127.0.0.1:3000/file/foo/bar.mp4

For this URL endpoint, use HTTP Method PUT, DELETE to upload and delete files.

To secure this endpoint, define the TRACE_API_SECRET environment variable, and put x-trace-secret in HTTP header when sending requests.

Video Preview URL

http://127.0.0.1:3000/video/foo/bar.mp4?t=87

You can use the &size= param to specify preview size (l: 640, m: 320, s: 160)

http://127.0.0.1:3000/video/foo/bar.mp4?t=87&size=l

You can use the &mute param to generate a muted video (like GIF)

http://127.0.0.1:3000/video/foo/bar.mp4?t=87&size=l&mute

Image Preview URL

http://127.0.0.1:3000/image/foo/bar.mp4?t=87

You can use the &size= param to specify preview size (l: 640, m: 320, s: 160)

http://127.0.0.1:3000/image/foo/bar.mp4?t=87&size=l

Environment variables

VIDEO_PATH=         # e.g. /mnt/data/anilist/
SERVER_PORT=        # e.g. 3001
SERVER_ADDR=        # e.g. 127.0.0.1 or 0.0.0.0
TRACE_MEDIA_SALT=   # define any random string, or leave blank to disable secure token
TRACE_API_SECRET=   # same as TRACE_API_SECRET in trace.moe api's .env, or leave blank to disable auth

Local Development

Git clone this repository, npm install, copy .env.example to .env, Edit .env as you need, then start server

node server.js

You also can use pm2 to run this in background in cluster mode.

Use below commands to start / restart / stop server.

npm run start
npm run stop
npm run reload
npm run restart
npm run delete

To change the number of nodejs instances, edit ecosystem.config.json

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].