Alkl58 / NotEnoughAV1Encodes

GUI for AV1 (aomenc, rav1e & svt-av1)
MIT License
534 stars 24 forks source link

[Feature] Segment Splitting #124

Open Ichisich opened 1 year ago

Ichisich commented 1 year ago

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.

Alkl58 commented 1 year ago

Thats equivalent to: grafik

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

Ichisich commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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.