Created
March 15, 2017 00:17
-
-
Save gdm/02f75e641168780bc06e25b863463260 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #=============================================================================== | |
| # | |
| # FILE: convert.sh | |
| # | |
| # USAGE: ./convert.sh | |
| # | |
| # DESCRIPTION: convert mp4 to mp3 | |
| # | |
| # OPTIONS: --- | |
| # REQUIREMENTS: --- | |
| # BUGS: --- | |
| # NOTES: --- | |
| # AUTHOR: Dmytro Gorbunov | |
| # VERSION: 1.0 | |
| # CREATED: 03/15/2017 01:10:21 CET | |
| # REVISION: --- | |
| #=============================================================================== | |
| extra_opt="-aid 0" | |
| filetype=mp4 | |
| for file in *$filetype ; do | |
| basename=`basename "$file" ".$filetype"` | |
| mplayer $extra_opt -vc dummy -vo null -ao pcm:file="$basename.wav",fast "$file" | |
| lame -h -b128 "$basename.wav" "$basename.mp3" | |
| rm -v "$basename.wav" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment