I want to use FFMPEG (or ffprobe) to split a video into multiple shot videos/scenes (scene1.mp4 to sceneX.mp4, each a separate video). So whenever there is a scene change, it should cut it. What is the best command to do it?

So far I was using the following command (with scenecut option) but it is not perfect. Looks like there is another option using select=gt(scene\,.4) (but it stores it into figures). So what is the right command with highest accuracy?

ffmpeg -i myVideo.mp4 -y -c:v libx264 -profile:v high -prese6t:v fast -deinterlace -x264opts min-keyint=15:keyint=1000:scenecut=20 -b:v 2000k -c:a aac -b:a 128k -f segment -segment_format mp4 -segment_format_options movflags=empty_moov+frag_keyframe+default_base_moof+skip_trailer+faststart /home/1/output%%05d.mp4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.