Change the -segment_time to increase/decrease the amount of time per chunk as desired. The command below will split the video into chunks that are roughly 20 minutes long. there are very-few shared pixels with the previous frame). The above command will encode 8s of video starting at 3s. Also, the -t option specifies a duration, not an end time. For details, see ffmpeg's x264 Encoding Guide for video and AAC Encoding Guide for audio. These usually occur when the video snaps from one scene to another (e.g. ffmpeg -i movie.mp4 -ss 00:00:03 -t 00:00:08 -async 1 cut.mp4 When re-encoding you may also wish to include additional quality-related options or a particular AAC encoder. Luckily, there is a better solution, where you can just tell FFmpeg that you want to split it into relatively equidistant chunks, and it will do this with no overlaps, by splitting on the nearest keyframe. Unfortunately, videos tend not to have "fade-to-black" scenes every 20 minutes, and even worse, I found that using ffmpeg -ss to break up the videos into different chunks, and then playing them back in a VLC playlist, I would end up with a little bit of overlap, making the video look like it would jump. Thus, I wanted to see if I could break the movie up into 20 minute chunks, interpolate those chunks in parallel, and then stitch those processed chunks together and perform a final 2-pass HEVC encode (which is multi-threaded). Unfortunately, the process runs on a single thread, so doing this for a 2 hour movie would take a looooong time. It's pretty amazing how well it does the job. I recently discovered how to get FFmpeg to interpolate frames in order to create amazing 60fps videos.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |