ffmpeg轉成h264編碼格式、moov(meta資料)移動到頭部、碼率做一定壓縮、解析度也降下來

來源:互聯網
上載者:User

標籤:ast   load   min   htm   fas   解析度   dmi   等等   需要   

ffmpeg -i test.mp4 -threads 4 -vcodec mpeg4 -b:v 1000k test_A1.mp4ffmpeg -i test.mp4 -threads 8 -vcodec mpeg4 -b:v 800k  test_A2.mp4ffmpeg -i test.mp4 -threads 8 -vcodec mpeg4 -b 200k  test_A3.mp4--開啟8個線程,壓縮碼率-crf越小清晰度越高ffmpeg -i test.mp4 -threads 8 -crf 22 -y  -vcodec mpeg4 -strict experimental test_B1.mp4ffmpeg -i test.mp4 -threads 8 -crf 26 -y  -vcodec mpeg4 -strict experimental test_B2.mp4ffmpeg -i test.mp4 -threads 8 -crf 28 -y  -vcodec mpeg4 -strict experimental test_B3.mp4ffmpeg -i test.mp4 -threads 8 -crf 30 -y  -vcodec mpeg4 -strict experimental test_B4.mp4--轉h264。-s 640*360--用的:ffmpeg -i  test.mp4  -c:v libx264 -b 600k -r 25 -s 640*360 -ab 48k -strict -2 test_ok.mp4  ffmpeg -i  test.mp4 -threads 8 -c:v libx264 -movflags faststart -b 200k -r 25 -ab 48k -strict -2 test_C1.mp4ffmpeg -i  test.mp4 -c:v libx264 -movflags faststart -b 600k -r 25 -ab 48k -strict -2 test_C2.mp4ffmpeg -i  test.mp4 -threads 2 -c:v libx264 -movflags faststart -b 600k -r 25 -ab 48k -strict -2 test_C3.mp4--發現threads加了沒什麼用,反而感覺有點慢似的ffmpeg -i  test.mp4 -c:v libx264 -movflags faststart -b 600k -r 25 -s 640*360 -ab 48k -strict -2 test_C4.mp4ffmpeg -i  C:\Users\guestAdmin\Desktop\K空檔案夾\A00000592C0B5B\20180610\IMG_20180610104643.mp4 -c:v libx264 -b 600k -r 25 -s 1280*720 -ab 48k -strict -2 test_C5.mp4ffmpeg -i  DreamItPossible.mp4 -c:v libx264 -movflags faststart -b 300k -r 25 -s 640*360 -ab 48k -strict -2 test_C5.mp4ffmpeg -i  DreamItPossible.mp4  -threads 8 -c:v libx264 -movflags faststart -b 300k -r 25 -s 320*240 -ab 48k -strict -2 test_C6.mp4--支援邊下載邊放:qt-faststart test_c4.mp4 test_D1.mp4qt-faststart DreamItPossible.mp4 test_D2.mp4-- -movflags faststart -- http://saas.ihaihong.cn/YinShiPin/upload/FTP/862107034362822/20180615/filesIMG_20180615193440.mp4ffmpeg -i  862107034362822\20180615\filesIMG_20180615193440-old.mp4 -c:v libx264 862107034362822\20180615\filesIMG_20180615193440-264.mp4qt-faststart 862107034362822\20180615\filesIMG_20180615193440-264.mp4 862107034362822\20180615\filesIMG_20180615193440.mp4ffmpeg -i  862107034362822\20180615\filesIMG_20180615193440-old.mp4 -c:v libx264 -movflags faststart 862107034362822\20180615\filesIMG_20180615193440.mp4--轉載請註明,海宏軟體,iHaihong.cnffmpeg -i  862107034362822\20180615\filesIMG_20180615183646-old.mp4 -c:v libx264 -movflags faststart 862107034362822\20180615\filesIMG_20180615183646.mp4

  

mp4看著是mp4副檔名,但是編碼格式有很多,比如3gp、MP4、MP42、avc、xvid等等,MP4要在html5網頁上用<video src="xxx.mp4" />播放,需要這兩點:

1:moov中繼資料要放在前面,通過 -movflags faststart 實現。

2:格式需要是h264的。

這樣隨便用個<video src="xxx.mp4" autoplay="autoplay"/>就能播放了。

 

ffmpeg轉成h264編碼格式、moov(meta資料)移動到頭部、碼率做一定壓縮、解析度也降下來

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.