ffmpeg 分辨率 压缩_ffmpeg转成h264编码格式、moov(meta数据)移动到头部、码率做一定压缩、分辨率也降下来...

ffmpeg -i test.mp4 -threads 4 -vcodec mpeg4 -b:v 1000k test_A1.mp4

ffmpeg -i test.mp4 -threads 8 -vcodec mpeg4 -b:v 800k test_A2.mp4

ffmpeg -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.mp4

ffmpeg -i test.mp4 -threads 8 -crf 26 -y -vcodec mpeg4 -strict experimental test_B2.mp4

ffmpeg -i test.mp4 -threads 8 -crf 28 -y -vcodec mpeg4 -strict experimental test_B3.mp4

ffmpeg -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.mp4

ffmpeg -i test.mp4 -c:v libx264 -movflags faststart -b 600k -r 25 -ab 48k -strict -2 test_C2.mp4

ffmpeg -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.mp4

ffmpeg -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.mp4

ffmpeg -i DreamItPossible.mp4 -c:v libx264 -movflags faststart -b 300k -r 25 -s 640*360 -ab 48k -strict -2 test_C5.mp4

ffmpeg -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.mp4

qt-faststart DreamItPossible.mp4 test_D2.mp4

-- -movflags faststart

-- http://saas.ihaihong.cn/YinShiPin/upload/FTP/862107034362822/20180615/filesIMG_20180615193440.mp4

ffmpeg -i 862107034362822\20180615\filesIMG_20180615193440-old.mp4 -c:v libx264 862107034362822\20180615\filesIMG_20180615193440-264.mp4

qt-faststart 862107034362822\20180615\filesIMG_20180615193440-264.mp4 862107034362822\20180615\filesIMG_20180615193440.mp4

ffmpeg -i 862107034362822\20180615\filesIMG_20180615193440-old.mp4 -c:v libx264 -movflags faststart 862107034362822\20180615\filesIMG_20180615193440.mp4

--转载请注明,海宏软件,iHaihong.cn

ffmpeg -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网页上用播放,需要这两点:

1:moov元数据要放在前面,通过 -movflags faststart 实现。

2:格式需要是h264的。

这样随便用个就能播放了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值