Code Monkey home page Code Monkey logo

Comments (3)

CainKernel avatar CainKernel commented on July 24, 2024

短视频最好的方案就是重新录制一遍,目前像微视等APP也是这么处理的。因为这里涉及很多东西要处理,字幕、特效等跟播放的时间有关,重新播放一遍会,播放过程不输出声音就好。要不然音视频轨道分离处理的话,一些转场动画啥的不好处理,有可能引入音视频不同步等问题。

from caincamera.

ningsk avatar ningsk commented on July 24, 2024

我在添加特效的时候记录下来添加每次添加特效的种类、开始时间、结束时间。然后点击上传或者保存按钮的时候,显示等待效果,将这个视频重新录制一遍是这个意思吗?测试了一下微视的效果,视频编辑特效后等待时长确实和视频本身的时长有一定的关联,而且时间相近。

from caincamera.

CainKernel avatar CainKernel commented on July 24, 2024

是的,目前那些看着合成很快的方案都是这么搞的。跟视频本身时长相近就是因为重新播放,播放时重新录制一遍而已。因为如果要插入转场动画之类的,一帧一帧地处理是非常麻烦的,时间戳会跟音频的不一致,引入的问题会非常非常多,怎么同步都是个问题。但是重新录制一遍,我就能保证跟我预览的一样。就算为了更好地压缩大小,用x264 和 AAC软编码来做录制,时间也不会比硬编码长多少的。720P的视频只不过是做不到百分百实时软编码而已,但合成阶段我不丢帧,直接等待录制流程处理完数据播放器再播放就好,反正时间戳我能保证就行。这就是合成时间总是比视频时长一点的原因。

from caincamera.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.