Comments (5)
是的,很多手机的解码芯片不一样,解出来的yuv格式也不一样,兼容起来非常麻烦,而且处理起来会比较慢
from videoprocessor.
@yellowcath
我在实现一个倒放,倒放的实现我是这样,从一段视频的末端到前端去循环每两个I帧之间的Buffer,在把Buffer倒着去做Codec在Muxer,目前遇到的问题就是有些视频会出现UV数据好像错乱,但是我不知道怎么解决。。Surface模式好像不能这样处理。
我看到你的倒放的处理方式,全转成关键帧占用的空间变得很大,并且好像耕费时间。有其他的方案吗?
from videoprocessor.
用buffer也是一样的,因为解码必须是从前至后,所以要倒叙,你必须从某个关键帧一直往后解码到下一个关键帧,这中间的所有解码出来的帧都要缓存,然后倒着放入编码器,占用的内存也会非常大,所以最好仍然是先做一个全关键帧的中间视频,再行倒放
from videoprocessor.
如果一定要解决UV错乱的问题,推荐用MediaCode的getOutputImage,返回的是Image,里面成员变量有3个plane,plane0,1,2分别对应Y,U,V或者Y,UV,VU(可能2,3记反了),plane有两个属性,getRowStride,getPixelStride,第一个表示一行有多长,第二个表示隔多少取一个像素。所以这个数据处理起来是很麻烦的
from videoprocessor.
@yellowcath
OK,谢谢。
我的做法就是把buffer 保存到本地,做Encoder的时候逆序去取本地的Buffer。内存是没啥问题。目前看来还是只能用全关键帧的做法了。
from videoprocessor.
Related Issues (20)
- 压缩后的视频拷贝到电脑上播放,视频下半部分界面显示是糊的
- 视频压缩后,视频时长发生了改变 HOT 2
- Asynchronous work on multiple video
- 视频压缩后,上传服务器,浏览器h5无法直接播放
- java.io.IOException: Failed to instantiate extractor
- processor.startTimeMs != null || processor.endTimeMs != null || processor.speed != null HOT 1
- 压缩完的视频上传到服务器,用浏览器播放特别卡
- WAV转AAC error
- 华为设备不稳定
- 文档修改
- 设置width后,height 能否根据视频长宽等比例设置?
- Reverse video with selected duration
- 个别手机压缩后视频绿屏,完全看不清
- 如果实现100倍变速的话,还能优化解码速度么
- 在小米4上压缩后,大小无变化
- java.lang.UnsatisfiedLinkError: dlopen failed: library "libsoundtouch.so" not found
- 我的华为鸿蒙手机不能压缩,能不能帮忙解决 HOT 3
- Vivo手机视频压缩后,马赛克化特别严重
- 设置输出码率后,输出视频的码率与设置不一致。
- 是不是不更新了 这么多问题 也没见解决
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 videoprocessor.