Automating Bookshare

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

converting movies to .wav is easy under Linux, with the help of zsh.

for i in *.mpg;do
mplayer -vc null -vo null -ao pcm:file="${i:r}.wav" "$i" &&
rm "$i";done

a bit of explanation: the[ && symbols after the command says run the rm
command only if the first command (in this case mplayer) succeeded.
the ${i:r} is a zsh specific extension that will strip the extension off
the filename in $i.

If you wanted to do this in windows, I have no idea how you would string
the two commands together - but here's a line out of my useful commands
file that should get you headed on the right path:

for %i in (*.avi) do d:\mplayer\mplayer -vc null -vo null -dumpaudio -dumpfile "%~ni.mp3" "%i"

- - Tyler

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)

iEYEARECAAYFAke9NgsACgkQTsjaYASMWKSUCQCfeA0/XDn8+Z+8ooHpxiwr3CRB
DikAoJo/EpJUTe4Q91NTHBcmWB2gHobq
=mE/x
-----END PGP SIGNATURE-----




[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux