【FFmpeg】FFmpeg常用基本命令(转载)
生活随笔
收集整理的這篇文章主要介紹了
【FFmpeg】FFmpeg常用基本命令(转载)
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
轉(zhuǎn)自:http://www.cnblogs.com/dwdxdy/p/3240167.html
1.分離視頻音頻流
ffmpeg -i input_file -vcodec copy -an output_file_video //分離視頻流 ffmpeg -i input_file -acodec copy -vn output_file_audio //分離音頻流2.視頻解復(fù)用
ffmpeg –i test.mp4 –vcodec copy –an –f m4v test.264 ffmpeg –i test.avi –vcodec copy –an –f m4v test.2643.視頻轉(zhuǎn)碼
ffmpeg –i test.mp4 –vcodec h264 –s 352*278 –an –f m4v test.264 //轉(zhuǎn)碼為碼流原始文件 ffmpeg –i test.mp4 –vcodec h264 –bf 0 –g 25 –s 352*278 –an –f m4v test.264 //轉(zhuǎn)碼為碼流原始文件 ffmpeg –i test.avi -vcodec mpeg4 –vtag xvid –qsame test_xvid.avi //轉(zhuǎn)碼為封裝文件 //-bf B幀數(shù)目控制,-g 關(guān)鍵幀間隔控制,-s 分辨率控制4.視頻封裝
ffmpeg –i video_file –i audio_file –vcodec copy –acodec copy output_file5.視頻剪切
ffmpeg –i test.avi –r 1 –f image2 image-%3d.jpeg //提取圖片 ffmpeg -ss 0:1:30 -t 0:0:20 -i input.avi -vcodec copy -acodec copy output.avi //剪切視頻 //-r 提取圖像的頻率,-ss 開(kāi)始時(shí)間,-t 持續(xù)時(shí)間6.視頻錄制
ffmpeg –i rtsp://192.168.3.205:5555/test –vcodec copy out.avi7.YUV序列播放
ffplay -f rawvideo -video_size 1920x1080 input.yuv8.YUV序列轉(zhuǎn)AVI
ffmpeg –s w*h –pix_fmt yuv420p –i input.yuv –vcodec mpeg4 output.avi常用參數(shù)說(shuō)明:
主要參數(shù):
-i 設(shè)定輸入流
-f 設(shè)定輸出格式
-ss 開(kāi)始時(shí)間
視頻參數(shù):
-b 設(shè)定視頻流量,默認(rèn)為200Kbit/s
-r 設(shè)定幀速率,默認(rèn)為25
-s 設(shè)定畫面的寬與高
-aspect 設(shè)定畫面的比例
-vn 不處理視頻
-vcodec 設(shè)定視頻編解碼器,未設(shè)定時(shí)則使用與輸入流相同的編解碼器
音頻參數(shù):
-ar 設(shè)定采樣率
-ac 設(shè)定聲音的Channel數(shù)
-acodec 設(shè)定聲音編解碼器,未設(shè)定時(shí)則使用與輸入流相同的編解碼器
-an 不處理音頻
轉(zhuǎn)載于:https://www.cnblogs.com/lance-ehf/p/4167453.html
與50位技術(shù)專家面對(duì)面20年技術(shù)見(jiàn)證,附贈(zèng)技術(shù)全景圖總結(jié)
以上是生活随笔為你收集整理的【FFmpeg】FFmpeg常用基本命令(转载)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 在SQL Server 2008中调用.
- 下一篇: 『重构--改善既有代码的设计』读书笔记-