NotEnoughAV1Encodes icon indicating copy to clipboard operation
NotEnoughAV1Encodes copied to clipboard

[Feature] Segment Splitting

Open Ichisich opened this issue 2 years ago • 4 comments

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 avatar Nov 21 '22 15:11 Ichisich

Thats equivalent to: grafik

See: https://github.com/Alkl58/NotEnoughAV1Encodes/blob/6415c867115b3eb2cd7db167eb90a76d2f231b95/NotEnoughAV1Encodes/Video/VideoSplitter.cs#L183

Alkl58 avatar Nov 21 '22 15:11 Alkl58

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.

Ichisich avatar Nov 21 '22 15:11 Ichisich

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

Alkl58 avatar Nov 21 '22 15:11 Alkl58

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.

Ichisich avatar Nov 21 '22 16:11 Ichisich