Last active
January 24, 2023 23:35
-
-
Save MoatazAbdAlmageed/7e30accd2107b4138332f24cce17c3e0 to your computer and use it in GitHub Desktop.
download youtube playlist and merge it to one video
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installation | |
- first install yt-dlp from https://github.com/yt-dlp/yt-dlp/wiki/Installation then add this method to `.bashrc` | |
- yt-dlp -c --concat-playlist always -o "pl_video:%(title)s.%(ext)s" https://www.youtube.com/playlist\?list\=PL0vfts4VzfNjQOM9VClyL5R0LeuTxlAR3 | |
# Easy Wat | |
``` | |
playlistAIO(){ | |
yt-dlp -c --concat-playlist always -o "pl_video:%(title)s.%(ext)s" "$1" | |
# usage yaio https://www.youtube.com/playlist\?list\=PL0vfts4VzfNjQOM9VClyL5R0LeuTxlAR3 | |
} | |
``` | |
# Another way ( complicated !! ) | |
- create folder for the playlist | |
- cd the created folder run this command `yaio https://www.youtube.com/playlist\?list\=PLHLDqwMxgFrE-GF8tDCgYHfT41adK9q2c 1 webm` don't forget to change playlist url | |
``` | |
playlistAIO2(){ | |
yt-dlp -f 22 -c "$1" -S res,ext:mp4:m4a --recode mp4 --playlist-start "$2" | |
rm aio.$3 | |
rm list.txt | |
for f in *.$3; do echo "file '$f'" >> list.txt; done | |
ffmpeg -f concat -safe 0 -i list.txt -c copy aio.$3 | |
# usage yaio https://www.youtube.com/playlist\?list\=PL0vfts4VzfNjQOM9VClyL5R0LeuTxlAR3 1 mp4 | |
} | |
``` | |
# also you can check this https://techglimpse.com/download-youtube-videos-playlist-and-merge/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment