Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Segment Splitting #124

Open
Ichisich opened this issue Nov 21, 2022 · 4 comments
Open

[Feature] Segment Splitting #124

Ichisich opened this issue Nov 21, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@Ichisich
Copy link

Most videos I re-encode are AVC Videos (MPEG-4 Part 10) and given, they were encoded with x264, their key-frames make for proper cutoff points already.
Thankfully, FFmpeg has an inbuilt segment muxer:
https://ffmpeg.org/ffmpeg-formats.html#segment_002c-stream_005fsegment_002c-ssegment

For example, I use the following line and use the output files in a batch folder for NEAV1E as a parallel encode:
ffmpeg -i input.mp4 -c copy -f segment split%d.mp4
No prior re-encode needed and, depending on the video, can be more reliable than even PySceneDetect.

Segment splitting would be a useful third splitting option for NEAV1E.

@Ichisich Ichisich added the enhancement New feature or request label Nov 21, 2022
@Alkl58
Copy link
Owner

Alkl58 commented Nov 21, 2022

Thats equivalent to:
grafik

See:

ffmpegCommand += " -segment_time " + queueElement.ChunkLength.ToString() + " -f segment \"";

@Ichisich
Copy link
Author

Nice, I assumed it only would change the encoder to utvideo and the sort and didn't bother touching it.
Additionaly, key frame segment splitting almost never results in equal chunks.

@Alkl58
Copy link
Owner

Alkl58 commented Nov 21, 2022

Technically you are correct, however it's mostly close enough (within a few seconds), so I didn't put it in a separate category.

@Ichisich
Copy link
Author

Ichisich commented Nov 21, 2022

Personally, I would rearrange it as third option and call it:
Splitting Mehtod: Key Frames

Neither the current arrangement, nor calling it segmenting, would be as expressive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants