1

I am working on a project where I am looking to extract a video clip from an input video. I have found many links(Eg : link) which do this task, but in all this I have to specify video duration.

Unfortunately I don't have that information as I am giving a file-path. What I am looking for is a 10 seconds clip from the video which is saved at specific location without the audio part.

My intention is to show that 10 seconds video as a preview of the actual video in the front end, and I don't want to start sound in that.

3

You are most likely after:

ffmpeg -i "A_File.mp4" -ss 00:00:0.0 -t 10 -an "B_File.mp4"

To do it a bit faster you can also try adding -threads $(nproc) eg:

ffmpeg -threads $(nproc) -i "A_File.mp4" -ss 00:00:0.0 -t 10 -an "B_File.mp4"

There is already a substantial number of articles and documentation on achieving these results including:

https://ffmpeg.org/ffmpeg.html

http://www.labnol.org/internet/useful-ffmpeg-commands/28490/

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.