目錄
- 前言
- 下載FFmpeg客戶端
- 開始使用
- 打開PowerShell頁面
- 輸入ffmpeg ,驗證是否可以使用;
- 開始轉換視頻
- 總結
前言
這是FFmpeg的官方介紹:
FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.
It contains libavcodec, libavutil, libavformat, libavfilter, libavdevice, libswscale and libswresample which can be used by applications. As well as ffmpeg, ffplay and ffprobe which can be used by end users for transcoding and playing.
The FFmpeg project tries to provide the best technically possible solution for developers of applications and end users alike. To achieve this we combine the best free software options available. We slightly favor our own code to keep the dependencies on other libs low and to maximize code sharing between parts of FFmpeg. Wherever the question of “best” cannot be answered we support both options so the end user can choose.
FFmpeg官方網站
簡單來說,FFmpeg開源免費,功能強大,視頻轉碼只是它部分功能,
此文章只介紹使用此工具進行各種視頻轉成mp4,轉成其他格式視頻方法差不多,
- 我的電腦系統:windows10
- FFmpeg版本:ffmpeg 4.3.1
下載FFmpeg客戶端
在FFmpeg官網下載界面內進行下載
FFmpeg下載界面:http://ffmpeg.org/download.html
將發現如下圖所示界面,根據你的電腦系統來下載,有linux,windows,mac

先將滑鼠放到win圖示上面,將出現兩個鏈接,如上圖,兩個都可以下載,我以第一個鏈接為例,
點開出現下圖界面,

找到 release(發行版本較穩定),這幾個鏈接都可以下載,我是從第一個鏈接下載
# 安裝FFmpeg 安裝很簡單,直接解壓就好了,下載好之后,解壓你的壓縮包, 這是我的安裝的檔案夾目錄   你會發現在bin檔案夾里有三個檔案,ffmpeg.exe,ffplay.exe,ffprobe.exe,本文章內容只用到ffmpeg.exe
開始使用
打開PowerShell頁面
按住shift同時,右鍵檔案夾空的地方,會出現如下選單,點擊“在此處打開…”,進入powershell界面,
(也可以打開cmd,cd命令切到這個目錄下,后期如果經常轉換的話,可以設定一下系統變數,以后也方便),


輸入ffmpeg ,驗證是否可以使用;

出現上圖界面,就可以使用了,如果報錯;
可以嘗試加這個代碼試試:
start ffmpeg
然后ffmpeg應該可以了,
開始轉換視頻
ffmpeg -i E:\影音\影視\汪汪隊立大功第三季第一集.ts D:\轉換后的檔案名.mp4
E:\影音\影視\汪汪隊立大功第三季第一集.ts 這是你要轉的視頻檔案,
D:\轉換后的檔案名.mp4 這是你的視頻檔案,檔案后綴名為你想要轉的格式名字,

等一會就好了,
總結
其實FFmpeg加上引數可以使用更多的功能,上述只是最簡單的方法,還可以加引數例如
-f 指定格式
-r 指定幀率
-s解析度
-b:v 指定碼率
詳細請看官方檔案:http://ffmpeg.org/ffmpeg.html
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/254843.html
標籤:其他
上一篇:linux下BMP圖片旋轉
