Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ffmpeg -ss 0.125 -i "input.mp3" -acodec copy "output.mp3"
- find -E "path/to/audio/files" -type f -iregex ".*.(MP3)$" |
- while read full_audio_filepath
- do
- # Break up the full audio filepath stuff into different directory and filename components.
- audio_dirname=$(dirname "${full_audio_filepath}");
- audio_basename=$(basename "${full_audio_filepath}");
- audio_filename="${audio_basename%.*}";
- # Set the MP3 directory.
- mp3_dirpath="${audio_dirname}/mp3";
- mp3_filepath="${mp3_dirpath}/${audio_filename}.mp3";
- # Create the child MP3 directory.
- mkdir -p "${mp3_dirpath}";
- # And here is where the magic happens.
- ffmpeg -y -v quiet -ss 0.125 -i "$full_audio_filepath" -acodec copy "$mp3_filepath" < /dev/null;
- done
Add Comment
Please, Sign In to add comment