How to download a TikTok video with yt-dlp on Linux
The yt-dlp Python script can be used to download any online video easily. I have tried it on TikTok as well as Vimeo and it works just fine. No problems at all. So you can download TikTok videos with the command line on Linux very easily.
Here is an example, querying all video formats available for a TikTok video with the yt-dlp script.
[ jason@$deusexmachina.local ] [ Jobs 0. PWD: ~/Videos. -bash 3.2.57. ] [ 6-:$ ] -> yt-dlp -F https://www.tiktok.com/@sooshimango/video/7021410719409163521 [TikTok] 7021410719409163521: Downloading video details [info] Available formats for 7021410719409163521: ID EXT RESOLUTION │ FILESIZE TBR PROTO │ VCODEC VBR ACODEC ABR MORE INFO ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── download_addr-0 mp4 576x1024 │ 8.39MiB https │ h264 aac Download video, watermarked (API) download_addr-1 mp4 576x1024 │ 8.39MiB https │ h264 aac Download video, watermarked download_addr-2 mp4 576x1024 │ 8.39MiB https │ h264 aac Download video, watermarked h264_540p_2340529-0 mp4 576x1024 │ 8.47MiB 2340k https │ h264 2340k aac 0k Direct video (API) h264_540p_2340529-1 mp4 576x1024 │ 8.47MiB 2340k https │ h264 2340k aac 0k Direct video h264_540p_2340529-2 mp4 576x1024 │ 8.47MiB 2340k https │ h264 2340k aac 0k Direct video bytevc1_540p_595922-0 mp4 576x1024 │ 2.16MiB 595k https │ h265 595k aac 0k Playback video (API) bytevc1_540p_595922-1 mp4 576x1024 │ 2.16MiB 595k https │ h265 595k aac 0k Playback video bytevc1_540p_595922-2 mp4 576x1024 │ 2.16MiB 595k https │ h265 595k aac 0k Playback video bytevc1_540p_912578-0 mp4 576x1024 │ 3.30MiB 912k https │ h265 912k aac 0k Playback video (API) bytevc1_540p_912578-1 mp4 576x1024 │ 3.30MiB 912k https │ h265 912k aac 0k Playback video bytevc1_540p_912578-2 mp4 576x1024 │ 3.30MiB 912k https │ h265 912k aac 0k Playback video bytevc1_540p_1463291-0 mp4 576x1024 │ 5.29MiB 1463k https │ h265 1463k aac 0k Direct video (API) bytevc1_540p_1463291-1 mp4 576x1024 │ 5.29MiB 1463k https │ h265 1463k aac 0k Direct video bytevc1_540p_1463291-2 mp4 576x1024 │ 5.29MiB 1463k https │ h265 1463k aac 0k Direct video bytevc1_720p_2004888-0 mp4 unknown │ 7.25MiB 2004k https │ h265 2004k aac 0k Playback video (API) bytevc1_720p_2004888-1 mp4 unknown │ 7.25MiB 2004k https │ h265 2004k aac 0k Playback video bytevc1_720p_2004888-2 mp4 unknown │ 7.25MiB 2004k https │ h265 2004k aac 0k Playback video |
Then download the selected video format.
[ jason@$deusexmachina.local ] [ Jobs 0. PWD: ~/Videos. -bash 3.2.57. ] [ 7-:$ ] -> yt-dlp -f "bytevc1_720p_2004888-0" https://www.tiktok.com/@sooshimango/video/7021410719409163521 [TikTok] 7021410719409163521: Downloading video details [info] 7021410719409163521: Downloading 1 format(s): bytevc1_720p_2004888-0 [download] Destination: Freedom!!!… sort of #fyp #foryou #xyzbca #melbourne #freedom #sooshimango [7021410719409163521].mp4 [download] 100% of 7.25MiB in 00:02 |
And even BitChute.
[ jason@$deusexmachina.local ] [ Jobs 0. PWD: ~/Videos. -bash 3.2.57. ] [ 9-:$ ] -> yt-dlp -f "0" https://www.bitchute.com/video/sIMf2xSAMog/ [BitChute] sIMf2xSAMog: Downloading webpage [BitChute] sIMf2xSAMog: Checking video URL [info] sIMf2xSAMog: Downloading 1 format(s): 0 [download] Destination: Will Smith Copycat! Rapper TI Has MELTDOWN At Female Comedian! Storms The Stage After Joke! [sIMf2xSAMog].mp4 [download] 100% of 28.54MiB in 00:18 |
This is amazing. It truly is the Swiss Army Knife of online video downloading.
You can even download Daily Motion videos with no fuss.
[ jason@$deusexmachina.local ] [ Jobs 0. PWD: ~/Videos. -bash 3.2.57. ] [ 5-:$ ] -> yt-dlp -f https://www.dailymotion.com/video/x89j0s0 |
The best way to download online video formats is with a simple script. This is very useful indeed. Better than using an online video download site, not all of them work. This is much easier. And fun as you may query the video formats and see which to download.
I just got a Linux Ubuntu system and want to use it to upload / download videos such as in Bitchute and to edit videos that I record.
Can you give me some hints as to how I download from Bitchute?
I have used dos, unix, pc, mac but not Linux. At 72 years old I am still willing to learn.
Thanks,
Ken