FFmpeg FFmpeg常用基本命令

2022-09-06 16:48:15 字數 2330 閱讀 7944

前提:已經完整安裝好ffmpeg。

ffmpeg -i input_file -acodec copy -vn output_file_audio  //分離音訊流

ffmpeg –i test.mp4 –vcodec copy –an –f m4v test.264

ffmpeg –i test.**i –vcodec copy –an –f m4v test.264

ffmpeg –i test.mp4 –vcodec h264 –s 352*278 –an –f m4v test.264              //轉碼為碼流原始檔案

ffmpeg –i test.mp4 –vcodec h264 –bf 0 –g 25 –s 352*278 –an –f m4v test.264 //轉碼為碼流原始檔案

ffmpeg –i test.**i -vcodec mpeg4 –vtag xvid –qsame test_xvid.**i //轉碼為封裝檔案

//-bf b幀數目控制,-g 關鍵幀間隔控制,-s 解析度控制

ffmpeg –i video_file –i audio_file –vcodec copy –acodec copy output_file

ffmpeg –i test.**i –r 1 –f image2 image-%3d.jpeg        //提取

//-r 提取影象的頻率,-ss 開始時間,-t 持續時間

ffmpeg –i rtsp: –vcodec copy out.**i

ffplay -f rawvideo -video_size 1920x1080 input.yuv

8.yuv序列轉**i

ffmpeg –s w*h –pix_fmt yuv420p –i input.yuv –vcodec mpeg4 output.**i

常用引數說明:

主要引數:

-ar 設定取樣率

-ac 設定聲音的channel數

-acodec 設定聲音編解碼器,未設定時則使用與輸入流相同的編解碼器

-an 不處理音訊

ffmpeg -i input_file -acodec copy -vn output_file_audio  //分離音訊流

ffmpeg –i test.mp4 –vcodec copy –an –f m4v test.264

ffmpeg –i test.**i –vcodec copy –an –f m4v test.264

ffmpeg –i test.mp4 –vcodec h264 –s 352*278 –an –f m4v test.264              //轉碼為碼流原始檔案

ffmpeg –i test.mp4 –vcodec h264 –bf 0 –g 25 –s 352*278 –an –f m4v test.264 //轉碼為碼流原始檔案

ffmpeg –i test.**i -vcodec mpeg4 –vtag xvid –qsame test_xvid.**i //轉碼為封裝檔案

//-bf b幀數目控制,-g 關鍵幀間隔控制,-s 解析度控制

ffmpeg –i video_file –i audio_file –vcodec copy –acodec copy output_file

ffmpeg –i test.**i –r 1 –f image2 image-%3d.jpeg        //提取

//-r 提取影象的頻率,-ss 開始時間,-t 持續時間

ffmpeg –i rtsp: –vcodec copy out.**i

ffplay -f rawvideo -video_size 1920x1080 input.yuv

8.yuv序列轉**i

ffmpeg –s w*h –pix_fmt yuv420p –i input.yuv –vcodec mpeg4 output.**i

常用引數說明:

主要引數:

-ar 設定取樣率

-ac 設定聲音的channel數

-acodec 設定聲音編解碼器,未設定時則使用與輸入流相同的編解碼器

-an 不處理音訊

linux築基之常用命令

1.檢視歷史使用的命令history 2.切換目錄 cd 桌面 cd cd 3.檢視檔案 cat小檔案 more tail f動態重新整理 搜尋檔案內容 cut d f1 etc passwd 以 為間隔符 提取第1列 wc l 行數 wc c列數 wc w單詞個數 find name fstab全...

SpringMVC常用註解和可注入引數(基礎)

屬性 produces 返回資料的型別 即accept responsebody pathvariable login public string login pathvariable param string name,string pwd login smith?pwd abc pathvari...

常用的shell命令彙總,夯實Linux基礎

lscpu 檢視cpu的統計資訊 cat proc cpuinfo 檢視cpu詳細資訊,如每個cpu的型號等free m 概要檢視記憶體情況,這裡的單位是mb cat proc meminfo 檢視記憶體詳細資訊lsblk 檢視硬碟的分割槽分布,顯示很值觀 df lh 檢視各分割槽的情況 cat p...