- Windows下安装ffmpeg:
1.FFmpeg下载:http://ffmpeg.zeranoe.com/builds/
2.下载并解压FFmpeg文件夹,它会生成一个类似名为“ffmpeg-20170605-4705edb-win64-static.zip”的新文件夹,解压到d盘。
3.配置FFmpeg环境变量:
点击“开始菜单”,再点击“控制面板”,再点击“系统”,然后点击“高级系统设置”,跳出“系统属性”窗口后,最后点击“环境变量”按钮,在“Path”变量原有变量值内容上加上“;d:\ffmpeg\bin”:(如下图所示)
4.打开命令提示符窗口(cmd)。输入命令“ffmpeg –version”。如果命令提示窗口返回FFmpeg的版本信息(如下图所示),那么就说明安装成功了,你可以在命令提示行中任意文件夹下运行FFmpeg。
- 使用:MP4转为m3u8我也是初学,只了解了一点点下面是MP4转为m3u8的代码,贴出来,讲讲其中参数的含义ffmpeg -i 1.mp4 -f segment -segment_time 60 -segment_format mpegts -segment_list list_file.m3u8 -c copy -bsf:v h264_mp4toannexb -map 0 output_file-%d.ts
- 参数说明:
- -i : 引入视频源 (1.mp4: 视频名称)
- -segment_time: 切片的时长 (60秒)
- -segment_format: 来指定输出格式为mpegts
- -segment_list: 用来配置输出的列表文件名 (输出list_file.m3u8文件)
- -c copy: 拷贝原文件
- -map file:stream 设置输入流映射
- -codec:v : 视频格式
- -codec:a : 音频格式
本文转载于:https://blog.yayuanzi.com/21482.html
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
喜欢就支持以下吧
As a Newbie, I am permanently searching online for articles that can aid me. Thank you Carolee Woodie Rochkind
After looking over a handful of the articles on your site, I really appreciate your way of writing a blog. I added it to my bookmark website list and will be checking back in the near future. Please visit my web site as well and let me know your opinion. Darda Thorpe Ferro
Simply wanna state that this is handy , Thanks for taking your time to write this. Jonis Maje Mattheus
I loved as much as you will receive carried out right here. The sketch is tasteful, your authored material stylish. nonetheless, you command get bought an impatience over that you wish be delivering the following. unwell unquestionably come more formerly again as exactly the same nearly very often inside case you shield this hike. Hermina Tracey Royden
Very nice post. I definitely love this site. Continue the good work! Etti Willie Bozovich
Great, thanks for sharing this blog. Really thank you! Want more. Lanette Arni Mair
Quality articles, I am waiting for your next article. keep working Stoddard Munmro Broome
whoah this weblog is magnificent i like reading your articles. Keep up the great work! You already know, a lot of persons are looking round for this info, you could aid them greatly. Doro Emmit Utta