推广

github存储视频

github仓库可以用来存储m3u8的视频,开始白嫖

使用ffmpeg将mp4文件分割成ts文件,然后自动生成一个m3u8的列表 Test

打开.bat文件,输入以下命令: ffmpeg -i D:\video\BeginAgain.mp4 -c:v libx264 -hls_time 10 -hls_list_size 0 -c:a aac -strict -2 -f hls D:\videos\BeginAgain.m3u8 文件源目录是: D:\video\BeginAgain.mp4 ,视频被分割后的位置是 `D:\videos\BeginAgain.m3u8`` ,

{alert type="warning"} 目标路径的文件夹一定要存在! {/alert} 如下图: Test

{alert type="info"} hls_times 10 每个文件的时间在10s,其余的不用改,建议不改 {/alert}

{dotted startColor="#ff6c6c" endColor="#1989fa"/} 将分割好后的整个文件夹一起上传到github仓库上

{dotted startColor="#ff6c6c" endColor="#1989fa"/}

Test

{dotted startColor="#ff6c6c" endColor="#1989fa"/}

接着来访问它 Test

{message type="warning" content="图片上的地址输错了"/}

应该在BeginAgain.m3u8的前面再加上文件夹得名字BeginAgain 最后的地址是

https://github.com/lfl0919/cloud/BeginAgain/BeginAgain.m3u8

{dotted startColor="#ff6c6c" endColor="#1989fa"/}

这样直接访问github还是太慢了,接着借助Jsdelivr加速github 地址前缀:https://cdn.jsdelivr.net/gh/你的仓库的文件位置

{message type="info" content="不用加上github.com"/}

加速后的地址是这样的

https://cdn.jsdelivr.net/gh/lfl0919/cloud/BeginAgain/BeginAgain.m3u8

{progress percentage="90%" color="#ff6c6c"/}

这样的到的链接,浏览器不能直接解析,需要借助播放器插件

https://q6q.cc/m3u8/?url= 这是别人写好的播放器,拿来可以用就行 {message type="success" content="在这里感谢一下这位博主"/} 现在我们访问它 : https://q6q.cc/m3u8/?url=https://cdn.jsdelivr.net/gh/lfl0919/cloud/BeginAgain/BeginAgain.m3u8

{dotted startColor="#ff6c6c" endColor="#1989fa"/}

其他的内置的网页播放器也是可以直接使用的,例如使用Dplayer之类的,那就直接加上原来的文件地址就行

我这是使用的是苹果cms的哔哩哔哩风格的一个播放器

{dplayer src="https://cdn.jsdelivr.net/gh/lfl0919/cloud/BeginAgain/BeginAgain.m3u8"/}

类似于这样去使用它

{dotted startColor="#ff6c6c" endColor="#1989fa"/} 以下附上效果: Test

{progress percentage="100%" color="#ff6c6c"/}

{message type="success" content="速度还是相当不错的"/}

{dotted startColor="#ff6c6c" endColor="#1989fa"/}

{callout color="#f0ad4e"} 附上ffempg文件下载链接 {/callout}

{cloud title="ffmepg 工具下载" type="default" url="http://cloud.liangblog.xyz/_uploads/%E7%94%B5%E8%84%91%E8%BD%AF%E4%BB%B6/ffmpeg.zip" password=""/}

©版权声明演示站内容均来自互联网,如有侵权,请与我联系
THE END
喜欢就支持以下吧
收藏 25

The God only arranges a happy ending. If it is not happy, it means it is not the final result.

上天只会安排快乐的结局,如果不快乐,说明还不是最终结局。

相关推荐

更多文章 ›
文 MailCow 搭建步骤(基于你的 EC2 Amazon Linux 实例)2026-01-0923 阅读 文 EC2 扩容实战:EBS 从 30G 扩到 40G,但系统空间没变化?(完整排查与解决)2025-12-2629 阅读 文 IntelliJ IDEA 2025.3 启动卡死问题解决记录:只有打开 Java 项目才会卡在进度条2025-12-2539 阅读 文 SpringAI404错误解决方案-baseUrl和默认completionsPath拼接错误导致调用地址404错误-gemini兼容openai2025-07-0456 阅读 文 未命名文章2025-05-0655 阅读 文 Spring三级缓存解决循环依赖的深度解析2025-05-0562 阅读 文 记录一下 browser use web ui playwrite 明明已经安装成功但是 却打不开的问题:2025-05-0451 阅读

子比主题年末优惠正在进行中

全新商城系统已上线!堪比淘宝京东的购物体验,功能强大,UI精美

搭建网站从一个优秀的主题开始!

现在购买享3个域名授权 永久免费更新

这是一条系统弹窗通知示例,支持多种样式及功能设置

下载原图
1 / 1

登录