Compare commits

...

3 Commits

Author SHA1 Message Date
Nick Hepler
20f8e5665b Initial commit of yt-dlp snippets. 2024-11-11 18:05:15 -05:00
Nick Hepler
75420f3231 Update README. 2024-11-11 18:04:59 -05:00
Nick Hepler
e6bf5cc191 Add description to Bash snippets. 2024-11-11 18:04:28 -05:00
3 changed files with 31 additions and 1 deletions

View File

@ -3,3 +3,4 @@
A repository to allow users to quickly create, share, and manage small code snippets or notes directly within the Gitea platform. A repository to allow users to quickly create, share, and manage small code snippets or notes directly within the Gitea platform.
- [Docker](docker.md) - [Docker](docker.md)
- [yt-dlp](yt-dlp.md)

View File

@ -1,12 +1,14 @@
# Docker Snippets # Docker Snippets
## Stop All Containers ## Stop All Containers
Stops all running containers.
```shell ```shell
docker stop $(docker ps -q) docker stop $(docker ps -q)
``` ```
## Start Stopped Continaers ## Start Stopped Continaers
Starts all containers that were stopped.
```shell ```shell
docker start $(docker ps -q -f "status=exited") docker start $(docker ps -q -f "status=exited")

27
yt-dlp.md Normal file
View File

@ -0,0 +1,27 @@
# yt-dlp Snippets
## Best Video in MP4
Download the best quality video in .mp4 format.
```shell
yt-dlp -f "best[ext=mp4]" <url>
```
## Best Video in MP4 w/ English Subtitles
Download the best quality video in .mp4 format, along with English subtitles (if available), from the given URL.
```shell
yt-dlp -f "best[ext=mp4]" --write-sub --sub-lang en <url>
```
## Extract Audio in MP3
The command will extract the audio from the video at the given URL and save it in the MP3 format.
```shell
yt-dlp -x --audio-format mp3 <url>
```
## Extract Audio in MP3, Block Ads
The command will extract the audio from the video at the given URL, remove all sponsor segments using SponsorBlock, and save the audio in MP3 format.
```shell
yt-dlp --sponsorblock-remove all -x --audio-format mp3 <url>
```