Guest User

Untitled

a guest
Jul 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. ffmpeg -ss 0.125 -i "input.mp3" -acodec copy "output.mp3"
  2.  
  3. find -E "path/to/audio/files" -type f -iregex ".*.(MP3)$" |
  4. while read full_audio_filepath
  5. do
  6.  
  7. # Break up the full audio filepath stuff into different directory and filename components.
  8. audio_dirname=$(dirname "${full_audio_filepath}");
  9. audio_basename=$(basename "${full_audio_filepath}");
  10. audio_filename="${audio_basename%.*}";
  11.  
  12. # Set the MP3 directory.
  13. mp3_dirpath="${audio_dirname}/mp3";
  14. mp3_filepath="${mp3_dirpath}/${audio_filename}.mp3";
  15.  
  16. # Create the child MP3 directory.
  17. mkdir -p "${mp3_dirpath}";
  18.  
  19. # And here is where the magic happens.
  20. ffmpeg -y -v quiet -ss 0.125 -i "$full_audio_filepath" -acodec copy "$mp3_filepath" < /dev/null;
  21.  
  22. done
Add Comment
Please, Sign In to add comment