You will have to use -ss as suggested by others. If you want to slice at intervals which vary in time on a list of custom cue out / in points, then the above option is not for you. ![]() If you want perfect 5 min chunks, then you will have to transcode rather than copy. MP4/ISOMBFF is getting there with some of the MOOF atom/boxes, but for this application, TS is probably king of the containers. I would recommend TS, since in broadcast world, TS was designed to support splicing. ![]() ![]() You can choose your intermediary container (TS, MP4, NUT), but TS container is one of the better containers for subsequent concatting. The above worked example should work as-is straight from the terminal (give or take O/S).Īnd to play it as an ffconcat playlist. $ ffmpeg -i -map 0 -codec copy -f segment -segment_time 300 -segment_list output.ffconcat -segment_list_type ffconcat output_%05d.ts It also generates an ffconcat v1.0 index file, which is useful for keeping track of the chunks and can be used as an input list to reconstruct the output. The following slices up into near 5 min (300s) chunks, accurate to the nearest IDR intraframe. I like this approach because it is harnessing existing functionality, and because it is occurring in a single process, it is frame accurate and automatically chops on nearest keyframes for you. The HLS/DASH muxers can also be used but these muxers are typically used for smaller chunks. You can use the segment muxer to chop the content into chunks. ![]() If you are looking to slice them up into chunks of a near fixed duration, then there is one very easy solution that works in a limited number of use cases.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |