R
R
robids2021-04-22 16:46:45
PowerShell
robids, 2021-04-22 16:46:45

How to batch split video into segments of 10 minutes using ffmpeg?

good afternoon/evening!
Help me figure out the issue, please.
I am extracting a video from a video recorder in mp4 format and then I want to split it into fragments of 10 minutes each. So far, I've come to this code in powershell that doesn't work at all:

ls | Where { $_.Extension -eq ".mp4" } | ForEach { .\ffmpeg -i $_.FullName -segment_time 600 utput%%
_03d.mp4 }

the script searches for files, finds and launches ffmpeg with the parameter that I specify. But the files after the script are not readable, and it also processes a 250mb 15 minute video for a very long time ...
Is there any way to quickly cut the video into fragments in batches, delete the original video after cutting?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
MaxKozlov, 2021-04-22
@MaxKozlov

help read more carefully :)
well, or google
a bunch of options missed
https://unix.stackexchange.com/questions/94168/any...
and this "ls | Where { $_.Extension -eq ".mp4" }" can be shortened to "ls *.mp4"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question