Need a script for automation the convert a lot number audio files to another format
2
votes
0
answers
686
views
I have a lot number audio files in MP3 the proprietary format, I want to convert them to 'opus' the free and high quality format, with keep metadata also.
My selection command-line programs are SoX (Sound eXchange) for convert MP3 files to 'AIFF' format in order to keep quality and metadata* and 'opusenc ' the official encoder for convert 'AIFF' files to 'opus' format. Most important part of the work is use of 'mediainfo' program for exporting metadata tags of MP3 files and giving them to 'opusenc' program for importing metadata tags to encoding opus files, also giving the original bit-rate value of MP3 files to 'opusenc' for encoding large size AIFF files in order to achieve the opus files with same bit-rate of original MP3 files, so I need a script for automation listed below operations:
1. Use sox for convert MP3 files in a directory with many sub-directory to the files with AIFF format with same name.
2. Use 'mediainfo' for exporting metadata tags (Album, Performer, Track name, Recorded date, Genre) and bit-rate value of original MP3 files.
3. Giving the previous step information to 'opusenc' (artist, title, album, date YYYY-MM-DD, genre) and run it.
4. Delete MP3 and AIFF files after encode successfully done.
I want mentioned operations run consecutive on directories one by one.
My goal of this work is achieve to more freedom. Thank you very much for help and time that you devote to this work.
*: I choose AIFF format because it supports ID3v2 tags but when for test I convert a MP3 file contains metadata to 'AIFF' format with 'SoX' program and convert it to 'opus' with 'opusenc', result was the output opus file lacks metadata (don't known what is the problem exactly) also there was need to specify bit-rate value of MP3 file, so use of 'mediainfo' is necessary.
Asked by user138130
(23 rep)
Oct 12, 2015, 11:59 AM
Last activity: Oct 12, 2015, 01:54 PM
Last activity: Oct 12, 2015, 01:54 PM