Giter VIP home page Giter VIP logo

Comments (11)

drawcall avatar drawcall commented on May 16, 2024 3

@mrtian Use v2.0+ version you can set the cacheType to save the cache disk, which can be about one-tenth of the original
https://github.com/tnfe/FFCreator/blob/master/README.md#about-cache

from ffcreator.

drawcall avatar drawcall commented on May 16, 2024 2

Oh yes. fluent-ffmpeg receives a stream buffer data. But the difficulty is not here, it is the processing of more complex rendering code. I can implement it if I have time.

from ffcreator.

drawcall avatar drawcall commented on May 16, 2024 2

Oh i have upgraded the library.
FFCreator3.0+ uses node Stream for data caching. The original version frees up disk space and further improves the speed.

from ffcreator.

drawcall avatar drawcall commented on May 16, 2024

Oh, generally <2G, because FFCreator uses the raw format to cache it is the fastest (other compression formats are slow). General video production software will use a large cache, this requires a choice between speed and cache size. But don’t worry that FFCreator will delete it eventually

from ffcreator.

wujohns avatar wujohns commented on May 16, 2024

这边遇到了类似的问题(1分钟的视频消耗了70G左右的磁盘空间),临时的解决方法是在creator的complete事件中做手动清理。

但是这里还是想知道是否有办法做一个最大缓存限制(比如单个creator最多消耗50G),因为不知道超出磁盘全部空间后会发生什么问题

from ffcreator.

wujohns avatar wujohns commented on May 16, 2024

可能采用 stream 的方式进行处理是更合适的做法,即不是在生成全部缓存数据后再做视频生成策略,而是采用边生成缓存,边将缓存加工为视频的数据的方式,这样的话可以利用 stream 的机制做最大缓存占用限制,同时也可以避免向磁盘中写入缓存(直接在内存中操作数据)

from ffcreator.

drawcall avatar drawcall commented on May 16, 2024

@wujohns Oh, very good suggestion, but there are some difficulties to implement. If you have feasible code, please submit a PR.

from ffcreator.

wujohns avatar wujohns commented on May 16, 2024

最近工作极为繁忙,虽然已经有怎么处理该部分的思路,但大概率在今年的10月份前都没有太多时间去完成这个 pr

不过这里写了一个简单的 demo,可以作为 ffcreator 流式处理的参考:https://gitee.com/wujohns/video-stream

虽然 demo 中依旧是采用已经生成的文件合并为 readstream 模拟 frame stream(实际在 ffcreator 工程中应该采用 transfrom 流更合适),但该 demo 证明了在 ffcreator 中使用流式处理的可行性(至少证明了 ffcreator 的下游 fluent-ffmpeg 是支持该特性的)

其他如果需要沟通的话,不介意的话可以微信联系,微信号是:wujohns

from ffcreator.

wujohns avatar wujohns commented on May 16, 2024

额,那部分的确麻烦,从 sence 的处理到 frame 的处理,大概是至少两个 stream 串联起来,一看就是那种写起来很麻烦的代码。。。
不过采用 stream 后应该会同时得到减少存储消耗和时间消耗两者的优势(stream控制 内存/存储 消耗,且处理得当的话还可以减少了向硬盘存储中写入的操作,也就减少了整个流程的消耗时间),还是挺期待的

from ffcreator.

wujohns avatar wujohns commented on May 16, 2024

灰常感谢,不愧是dalao,👍👍👍👍👍👍

from ffcreator.

drawcall avatar drawcall commented on May 16, 2024

灰常感谢,不愧是dalao,👍👍👍👍👍👍

Thank you for your demo

from ffcreator.

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.