目 录CONTENT

文章目录

ffmpeg 视频格式转换

ABin
2022-08-02 / 0 评论 / 0 点赞 / 87 阅读 / 0 字

GitHub 比较全的FFmpeg版本(Win、Linux)

以下是MacBook 的安装方式

brew 安装参考 brew.sh

#安装命令
brew install ffmpeg 

查看视频文件信息

ffprobe -v quiet -print_format json -show_format -show_streams input.mp4

检查mkv 文件的完整性

ffmpeg -v error -i file.mkv -f null -
[h264 @ 0x7f7c31304bc0] missing picture in access unit with size 10
[h264 @ 0x7f7c31304bc0] no frame!
[h264 @ 0x7f7c31007f80] no frame!
Error while decoding stream #0:0: Invalid data found when processing input

ffmpeg -i file.mkv

也会有错误提示的字样

[h264 @ 0x7f7bac708840] missing picture in access unit with size 10
[h264 @ 0x7f7bac708840] no frame!

找出损坏的时间点(失败)

ffmpeg -v debug -i file.mkv -f null -

使用ffmpeg保存摄像头视频 120 秒

ffmpeg -rtsp_transport tcp -i rtsp://192.168.0.115:554/mtvh.264 -t 120 -c copy ~/Downloads/a2.mp4

mkv --> mp4

ffmpeg -i input.mkv -codec copy output.mp4

m4s --> mp4

ffmpeg -i video.m4s -i audio.m4s -codec copy Output.mp4

WebM --> mp4

ffmpeg -i input.webm -c:v libx264 -c:a aac output.mp4

ts --> mp4

ffmpeg -i input.ts -c:v libx264 -preset slow -crf 22 -c:a copy output.mp4

https://www.nxrte.com/jishu/30717.html

0

评论区