TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Open-source video smart cutting

3 点作者 skeskinen9 个月前
Hi HN,<p>I&#x27;ve been building my own video editor for about 8 months now. I&#x27;m slowly realizing that marketing this software might be the end of my solopreneur dreams. If I can get video creators on calls and show them the software in action, they like it, but so far nothing else works.<p>So I&#x27;ve decided to open-source the most polished part of my app which is video smart cutting.<p>It uses PyAV and libavcodec (ffmpeg internals) to encode a small part of the video near the cutpoints and then uses libavformat to stitch the recoded segments and parts of the original video back together into a whole video. The benefit of this is that reusing parts of the original video is way way faster than recoding, so doing it this way we can have very fast frame-accurate cutting.<p>While this is not a new idea, and there are a couple open-source implementations already, I believe mine is the first foss one to really try to solve the problem, and not just treat it as experimental feature that might work sometimes.<p>I&#x27;ve written a test suite that checks the implementation with various codecs (h264, h265, vp9, av1), container formats (.mp4, .mkv) and audio codecs (mp3, vorbis, opus, aac, flac, wav). The tests generate bunch of synthetic videos and sets of randomized cutting points and verify that input and output videos are the same.<p>I want to keep improving it further, but in my experience it works pretty much on everything that is produced in a reasonable manner. E.g. anything from obs, my phones, YouTube, Twitch and everything that my ~10 test users have tried throwing at it. I think there was one video at <a href="https:&#x2F;&#x2F;kodi.wiki&#x2F;view&#x2F;Samples" rel="nofollow">https:&#x2F;&#x2F;kodi.wiki&#x2F;view&#x2F;Samples</a> that failed and I&#x27;ll try to get to that eventually. I think sometimes it has problems with files where the seeking is difficult. Best would be if we didn&#x27;t have to seek at all, but that would require some changes that I have to think through.<p>Please check it out and offer any feedback on either the command line tool or the full GUI app. <a href="https:&#x2F;&#x2F;github.com&#x2F;skeskinen&#x2F;smartcut">https:&#x2F;&#x2F;github.com&#x2F;skeskinen&#x2F;smartcut</a><p>And if mifi or someone else would be interested in trying to incorporate this into lossless-cut, I&#x27;d be down to help.

1 comment

roberja909 个月前
Really cool. Hoping to try this on my project. It relies a lot on chopping down vids programatically. Hoping this will help with workflow. Nice work. Great video demo too.
评论 #41426836 未加载