watch.accords-library.com/README.md

52 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

2022-04-02 10:21:30 +00:00
# watch.accords-library.com
Provides to Accord's Library the tools to archive videos on multiple platforms, most notably YouTube using [yt-dlp](https://github.com/yt-dlp/yt-dlp)
It also downloads ffmpeg and ffprobe for audio-video post-processing.
The videos and other files (metadata, live chat, comments, sub files, thumbnails) are stored in `public` which needs to be accessible from the internet.
## Setup
```bash
git clone https://github.com/Wayback-Tube/Wayback-Tube-DL.git
cd watch.accords-library.com
sh install.sh
```
## YouTube
2022-04-02 10:25:30 +00:00
Add the videos IDs or URLs to archive in `youtube/batchfile.txt`
Use the extension `get Cookies.txt` on your Browser to retrieve credentials that yt-dlp can use to bypass age restrictions.
Possibly use a burner account.
Then place that `cookies.txt` in the `youtube` folder
2022-04-02 10:21:30 +00:00
Then run
```bash
./download.sh
```
Or alternatively just give the video ID as a parameter
```bash
./download.sh VIDEOID
```
That's it!
2022-04-03 08:27:31 +00:00
### Result
The resulting archive is composed as follows:
- The video, in the highest quality possible for the audio and video (limited to codex compatible with the MP4 container format).
- Highest quality thumbnail, saved as WebP
- A `.live-chat.json` file containing an archive all the YouTube live chat
- A `.info.json` file containing most if not all metadata publicly available about the video (duration, uploader, channel_id, tags, available qualities...)
- A `.vtt` file for each subtitle language available.
## Import archives to Strapi
Create a .env.local file with the following information:
```txt
URL_GRAPHQL=https://path.to.strapi.com/graphql
ACCESS_TOKEN=token_generated_by_strapi
```
Then run the script using:
```bash
python3 importToStrapi.py
```