一条ffmpeg命令下载完整腾讯视频

一条ffmpeg命令下载完整腾讯视频

前一个文章介绍了一个脚本解决下载完整腾讯视频文件的方法:脚本工具之下载M3U8文件类型的完整视频 , 同时介绍了如何通过JS命令自动提取M3U8地址,并通过脚本完成下载和合并视频文件工作。

今天介绍一个更简单的方法下载完整腾讯视频文件的方法。

命令使用方法

今天的主角就是ffmpeg命令工具,首先根据 脚本工具之下载M3U8文件类型的完整视频 这篇文章里的方法提取到M3U8链接地址,然后使用下面命令下载视频文件。


$ ffmpeg -i https://xxxx/gzc_1000102_0b53qeac6aaar4adsenwpnq4baodf6gaak2a.f321004.ts.m3u8\?ver\=4  out.mp4

ffmpeg version n4.4 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 7 (SUSE Linux)
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[hls @ 0x255ab40] Skip ('#EXT-X-VERSION:3')
[hls @ 0x255ab40] Opening 'https://apd-6e50ac2c5721a6c4b6fb13ca37cf4f55.v.smtcdns.com/varietyts.tc.qq.com/A5KJehBivXEPlz2yFC_2J1ozUyRevP5J6Lan3DDcpR4c/uwMROfz2r55goaQXGdGnC2de64gtX89GT746tcTJVnDpJgsD/svp_50112/mf8GOlnmrV1sKzgsvrQKVRPGWB6m12UwawKgPKaKRYB79IM-9TswdroI092ROv2oOYFX3NowvjStrc6iKJ1VTvfwo7h3Gs1CFtxvqkkULy5Yx3gXV2fziZXM_Y_DyWVy-4BkJFU3UMvuPOiMSnk70ARoqilQdyW9-9otCFtTaNNgNKZLfT5gVw/00_gzc_1000102_0b53qeac6aaar4adsenwpnq4baodf6gaak2a.f321004.1.ts?index=0&start=0&end=12000&brs=0&bre=1361119&ver=4&token=eb0f0b1f1806d58e9f0669d7ea022596' for reading

[https @ 0x28f05c0] Opening 'https://apd-6e50ac2c5721a6c4b6fb13ca37cf4f55.v.smtcdns.com/varietyts.tc.qq.com/A5KJehBivXEPlz2yFC_2J1ozUyRevP5J6Lan3DDcpR4c/uwMROfz2r55goaQXGdGnC2de64gtX89GT746tcTJVnDpJgsD/svp_50112/mf8GOlnmrV1sKzgsvrQKVRPGWB6m12UwawKgPKaKRYB79IM-9TswdroI092ROv2oOYFX3NowvjStrc6iKJ1VTvfwo7h3Gs1CFtxvqkkULy5Yx3gXV2fziZXM_Y_DyWVy-4BkJFU3UMvuPOiMSnk70ARoqilQdyW9-9otCFtTaNNgNKZLfT5gVw/02_gzc_1000102_0b53qeac6aaar4adsenwpnq4baodf6gaak2a.f321004.1.ts?index=2&start=24000&end=36000&brs=3932584&bre=6690731&ver=4&token=54204b0fbb5c7a8ae4ea93e6f0813d8b' for reading
[https @ 0x28fc1c0] Opening 'https://apd-6e50ac2c5721a6c4b6fb13ca37cf4f55.v.smtcdns.com/varietyts.tc.qq.com/A5KJehBivXEPlz2yFC_2J1ozUyRevP5J6Lan3DDcpR4c/uwMROfz2r55goaQXGdGnC2de64gtX89GT746tcTJVnDpJgsD/svp_50112/mf8GOlnmrV1sKzgsvrQKVRPGWB6m12UwawKgPKaKRYB79IM-9TswdroI092ROv2oOYFX3NowvjStrc6iKJ1VTvfwo7h3Gs1CFtxvqkkULy5Yx3gXV2fziZXM_Y_DyWVy-4BkJFU3UMvuPOiMSnk70ARoqilQdyW9-9otCFtTaNNgNKZLfT5gVw/03_gzc_1000102_0b53qeac6aaar4adsenwpnq4baodf6gaak2a.f321004.1.ts?index=3&start=36000&end=48000&brs=6690732&bre=9094123&ver=4&token=a7a7661602d8d5272196c68bae34cc04' for reading

...

就这样等待命令执行完成,我们成功下载了out.mp4视频文件! 是不是很简单呢?

你可能感兴趣的:(linux)