[FFmpeg-user] how to use ffmpeg - OS X Yosemite

Lou lou at lrcd.com
Fri Dec 18 22:16:09 CET 2015


On Thu, Dec 17, 2015, at 04:51 PM, nathan shane wrote:
[...]
> What I would like to do is edit some video files that I have in a batch. 
> I do not want to run ffmpeg on individual files.
> 
> I will have a total of 10000 - 17000 mpegs that I need to execute my
> script on.  All of these files will be located in 1 folder on the same
> hard drive
> 
> For all the files, I want to cut off the beginning (1 second of time) as
> they have information tagged in the beginning of each file that I don’t
> want presented in the video.

ffmpeg -ss 1 -i input -map 0 -c copy output

Make sure to read the docs for each option:

-ss: <https://ffmpeg.org/ffmpeg.html#Advanced-options>
-map: <https://ffmpeg.org/ffmpeg.html#Main-options>
-c copy: <https://ffmpeg.org/ffmpeg.html#Stream-copy>

The scripting part is offtopic here, but you could use a bash for loop
with parameter expansion. Untested example:

mkdir trim
for f in *.mp4; do ffmpeg -ss 1 -i "$f" -map 0 -c copy
"trim/${f%.*}.mp4"; done

I CC'd you because you are unsubscribed, so check the archives to see if
there are other answers:

<https://lists.ffmpeg.org/pipermail/ffmpeg-user/2015-December/thread.html>


More information about the ffmpeg-user mailing list