Skip to content

Instantly share code, notes, and snippets.

@ArchTaqi
Last active January 9, 2022 17:55
Show Gist options
  • Save ArchTaqi/35cd7198274044e029ef574e729e7df1 to your computer and use it in GitHub Desktop.
Save ArchTaqi/35cd7198274044e029ef574e729e7df1 to your computer and use it in GitHub Desktop.
Youtube-dl and MP4Box Scripts.

Youtube-dl

Download MP3 With Metadata and Album Art.

youtube-dl --extract-audio --add-metadata --xattrs --embed-thumbnail --audio-quality 0 --audio-format mp3 url

Other

youtube-dl -i --yes-playlist -f best -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' <url>

youtube-dl -i -x --audio-format mp3 --yes-playlist -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' <url>

youtube-dl -i --yes-playlist  --extract-audio --audio-format mp3 --audio-quality 320k -o './%(title)s.%(ext)s' --add-metadata --embed-thumbnail --metadata-from-title "%(artist)s - %(title)s" <url>


ffmpeg -i 'UFC.Fight.Night.Lewis.vs.Oleinik.SD.mp4' -ss 02:03:50.00 -to 02:15:50.00 -c copy Derrick_Lewis_vs_Aleksei_Oleinik.mp4

youtube-dl -f best -ciw  -o "%(title)s-%(id)s.%(ext)s"  -v <url-of-channel>

ffmpeg -i input.avi -filter:v scale=720:-1 -c:a copy output.mkv
ffmpeg -i input.avi -vf scale="iw/1:ih/2" output.avi

Softsubs: ffmpeg -i input.mkv -c copy -c:s mov_text output.mp4
Hardsubs: ffmpeg -i input.mkv -vf subtitles=input.mkv output.mp4

MP4Box -cat 1.mp4 -cat 2.mp4 -cat 3.mp4 -cat 4.mp4 -cat 5.mp4 -cat 6.mp4 -cat 7.mp4 -cat 8.mp4 -cat 9.mp4 -cat 10.mp4 -cat 11.mp4 -cat 12.mp4 -new '5 - Expressions and Control Structures.mp4'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment