Coder Social home page Coder Social logo

masterjoona / slideshow-embed Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 3.0 153 KB

Ever wanted embed TikTok slideshows in Discord?

Home Page: https://tt.masterjoona.dev

Dockerfile 0.89% Python 19.21% Go 67.79% HTML 12.10%
tiktok discord embed go golang

slideshow-embed's Introduction

tiktok slideshow collage

Sharing tiktoks can be hard on other platforms. tiktxk exists but it has just one problem: it cannot embed slideshows well, it only shows first couple images. So what does this program do? It downloads the images and collages them into a nice single image!

Embedding video tiktoks is also supported.

How to setup

Env var Default Value Description
DOMAIN none The domain where it will serve
PORT 4232 The port where it will serve
PUBLIC false If the index page is public
LIMIT_PUBLIC_AMOUNT -1 How many links are linked on the index. -1 is unlimited. set to 0 and public to true to only display stats
FFMPEG false collages with sound
FANCY_SLIDESHOW false enables video slideshow path, it slides the images with audio. This can and will make requests take a lot longer.
INSTALL_IDS none if you have acquired a tiktok install ids, you can put them here. comma separated
DEVICE_IDS 7351044760062330401 tiktok device id, no need to change. comma separated
DOWNLOADER false enables the downloader path.

Docker compose

Clone this repo and cd into it. edit the compose file for path for the collages. You can also the uncommenn the build tag if you want to scrape ttsave.app instead of relying on the api endpoint.

docker compose build && docker compose up -d

cli

you probably dont want to do this since you need to run 2 things at once.

add fpng_py for fast png encoding Add this to the dockerfile
RUN git clone --recurse-submodules https://github.com/K0lb3/fpng_py
# for arm64 we disable some build args. what does these flags do? i dont know
RUN sed -i 's/"-msse4.1"/#&/' fpng_py/setup.py
RUN sed -i 's/"-mpclmul"/#&/' fpng_py/setup.py
WORKDIR /app/fpng_py
RUN pip install . --break-system-packages

or you can build it yourself

git clone --recurse-submodules https://github.com/K0lb3/fpng_py
cd fpng_py
pip install . 

and copy the compiled files to the container

COPY ./fpng_py/build/lib.path/fpng_py /app/fpng_py

What does it look like?

showcaseV2.mp4

Yes it is kinda slow but I really cannot affect that

url path description
/t?v= normal collage or embed a video tiktok
/s?v= collage with sound, i guess you can embed a video tiktok as well...
/f?v= slides the images, same for this lol. The requests to this will take a long time to complete, so its better to open this in a browser and when it completes send it to discord.
/d?v= show all images and a button download a zip of all images.

notes

this is a beginner project so there might some insane design choices trolley

One such example is calling this python script to make the collages. actually it doenst call it anymore, there are two containers, one for http server and a python one for collaging and resizing.

Massive thanks to Dmitry Alimov and Tim Wilson for inventing the collaging script!

contributing

be my guest

slideshow-embed's People

Contributors

masterjoona avatar nuclidek avatar

Stargazers

Anh Geeky avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.