GithubHelp home page GithubHelp logo

Comments (4)

n9Mtq4 avatar n9Mtq4 commented on August 15, 2024

I am not familiar with HLS/DASH and its requirements, but I can comment on what it takes to get Av1an to split every n frames.

Av1an is designed to split on scene cuts to minimize the efficiency loss of chunked encoding and doesn't have a method for splitting every n frames. An option would be to specify the frames in which to split on in a file separated by commas. You can specify this file with --scenes filename. For example, if you want to split every 100 frames for a total of m frames, create a file with 100,200,300,...,m-100.

There is also the problem that we use ffmpeg's segment to do the splitting, which requires an I-frame on the boundary. The best option for now is to lossless encode your source with a gop of size 1 (or in your case since you know the split points ahead of time with a gop of size n) with ffmpeg -i source.mkv -c:v libx264 -crf 0 -g n source_gop.mkv to ensure that there will always be an I-frame. I am currently working on a patch that will add the option to use ffmpeg's select filter instead which should allow frame accurate splits regardless of I-frame placement.

from av1an.

ddorian avatar ddorian commented on August 15, 2024

Yes, scene cuts need to be 0 (you can enable them inside segments though) in HLS.

Splitting with segment needs an I-frame so it's not doable.

Splitting on exact frame may not have the starting I-frame of the segment.

One way I was thinking is to use -ss to seek to different positions in the stream.
-ss is frame accurate IF you also encode.
Each segment would seek to different positions of the file. Should be fast.

Or maybe splitting with segment but keeping room on both ends, and doing fancy calculations to further cut on exact frames when encoding ?

Will check how select filter may work.

from av1an.

n9Mtq4 avatar n9Mtq4 commented on August 15, 2024

We have added the ability to encode chunks with non-keyframe boundaries in #115 and #116.

from av1an.

sridhard avatar sridhard commented on August 15, 2024

@n9Mtq4 @ddorian For HLS and DSAH we want to encode the video with fixed GOP segment. Can you please help me how you achieved it?

from av1an.

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.