[FFmpeg-user] problem with fast seeking and splitting

Alexander Solonsky alexander.solonsky at castlabs.com
Tue May 3 04:59:23 EEST 2022




> On 5/1/2022 10:27 PM, Alexander Solonsky via ffmpeg-user wrote:
>> I'm trying to split an input file into 2 second chunks, transcode and
>> assemble using a concat muxer.
> I hate to question the question, but what's the purpose of this process? Generally speaking, you're better off transcoding in a single pass. If that process is too slow, can you use hardware to accelerate the process? Cutting into 2-second chunks to recode seems like a poor approach.

> If you really want to recode chunks, which may have their own issues when concatenated together, decode the entire stream and select chunks from the uncompressed data.

Hi Carl,

the original idea was to split accelerate video encoding by splitting on scene changes or much larger chunks than 2 seconds to make it more efficient, for sure. 2 seconds were selected to isolate the problem and make the debugging easier and faster.
VP9 and AV1 encoders are not thread efficient yet and splitting to several independent encoding processes speeds up things significantly. Or the lambda encoding also requires accurate splitting and concatenation. And none of that seems to be working. Decoding into intermediate uncompressed is not an option because of complications and additional cost (think about 4K movie in 10 bits). And why would we do that? - when we have input stream with all offsets, frame types, pts times etc. And neither seeking (I couldn't actually find a compressed file for which the fast seek would work more or less accurately) nor concatenation seems to be working properly.
And yet there is https://trac.ffmpeg.org/wiki/Seeking with quotes  "-ss is now also "frame-accurate" even when used as an input option", "The input will be parsed using keyframes, which is very fast", "-ss as an input option is now both fast and accurate" @Paul B Mahol <onemda at gmail.com>

Thanks,
Alexander
//////////
 _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user

> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


-- 
Best regards,
Alexander Solonsky



More information about the ffmpeg-user mailing list