I need to cut the first and the last half-second of some audio files.
I need to use ffmpeg (because I know that it works well and I know the command for the right encoding and I have installed it on all my machines) and I need to use it on Ubuntu machine (with bash) and one Mac OSX machine (with zsh) and a window machine (with only ffmpeg and python).
For walking through directories I have a python script and I am ok with it, I have to create a string that is
ffmpeg_command with the file names result from python
os.walk and call it with python
os.system call. And python is multi platform.
I need only an ffmpeg command for cut the first and the last half-second. I know of the super popular
ffmpeg -t duration -ss position way to cut but I don't know the duration because all files have different length. I am aware about some quick solution like the one in this answer that uses
mplayer command to know the length and calculate the duration, but I need to be multiplatform and I am sure that ffmpeg can do it, just didn't see it in the manual.