If you try to do it normally, it will be converted by sox, but sox cannot solve the m4a encoder from the extension. It is better to do it with ffmpeg.
The following is an example of a python script for simultaneous conversion. I wrote it so that it can be converted even if there are many files containing Japanese names.
#!/usr/bin/env python
import os
import commands
import logging
import traceback
if __name__ == '__main__':
outputdir = os.path.abspath(“<path to output>”)
for root, dirs, files in os.walk('.'):
for f in files:
path = os.path.join(root, f)
base, ext = os.path.splitext(f)
outputpath = os.path.join(outputdir, base + ".wav")
if ext == '.m4a':
print 'converting %s to %s' % (path, outputpath)
status, output = commands.getstatusoutput('ffmpeg -i "%s" "%s"' % (path, outputpath))
if status:
logging.error (output)
Set the \
Recommended Posts