Comments (7)
我也遇到这个问题了,问题主要是压缩参数,目标视频的宽高和码率,调整之后就可以了,但不清楚调整有没有什么规则
from videocompressor.
@ZDZN 你是怎么设置的啊,能发一下吗贴一下代码吗
from videocompressor.
看下是不是你的视频width,height属性,是不是有问题?
MediaFormat里面的width,height属性,只接受2的倍数的。不然就会报Android android.media.MediaCodec$CodecException: Error 0xfffffc0e 错误
解决方法:
在MediaFormat outputFormat = MediaFormat.createVideoFormat(MIME_TYPE, resultWidth, resultHeight);之前做判断,宽高改为2的倍数。
改为
if ((resultWidth & 1) == 1) {
resultWidth--;
}
if ((resultHeight & 1) == 1) {
resultHeight--;
}
MediaFormat outputFormat = MediaFormat.createVideoFormat(MIME_TYPE, resultWidth, resultHeight);
from videocompressor.
2的倍数也不行 @biansemao
from videocompressor.
@biansemao我也遇到了,不是所有手机都出现。压缩后140b
from videocompressor.
华为手Mate30 也是同样问题
from videocompressor.
遇到同样的问题 压缩之后无法播放
from videocompressor.
Related Issues (20)
- 某些视频压缩不成功 HOT 2
- does not work on samsung devices HOT 6
- Hot to set minimum video size result
- error on compression slowmotion videos, compression success even if isn't
- how to stop or cancel the process
- Background concurrent copying GC freed 44432(4MB) AllocSpace objects, 3(60KB) LOS objects, 49% free, 5MB/11MB, paused 351us total 112.931ms HOT 2
- 压缩后上传服务器在线看会卡顿 HOT 1
- moov置前 HOT 1
- 压缩后,只有声音。画面一直卡在第一帧 HOT 2
- No Gradle integration
- 压缩之后,没有声音 HOT 7
- How to set Movie Data Offset?
- impelment
- compressed video not getting saved to destination HOT 1
- 压缩的时候设置帧率无效 HOT 3
- After video compress couldn't play in exoplayer but success upload to server
- 20秒,33兆的视频,压缩,用了2分钟,这正常吗
- 這沒在維護了吧 HOT 2
- compress video not play.
- 压缩视频有问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from videocompressor.