Automate open/export

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
SweatCoder
Posts: 16
Joined: Tue Nov 25, 2008 6:05 am
Operating System: Please select

Re: Automate open/export

Post by SweatCoder » Wed Oct 15, 2014 6:51 pm

Gale Andrews wrote:
SweatCoder wrote:This Chain approach seemed to work for some files, but not others. In fact, the files it didn't fix couldn't even be fixed by what I thought was my bulletproof fallback: manually export the file in Audacity. Here's an example of a file that seems unfixable for iphone streaming:

http://www.zerogravpro.com/temp/unfixable.mp3 (works fine in browser or desktop)

Can anyone see anything in the file that might cause a problem with streaming?
The two features which seem to be in both "bad" files are 22050 Hz sample rate and duplicated information at the end for the name of the encoder.

Have you tried exporting the unfixable one at 44100 Hz? To do that, change the project rate bottom left.

Gale
Gale, I just tried that. Sounded promising, but it didn't work. Here is the new file at 44100 Hz:
http://www.zerogravpro.com/temp/unfixable2.mp3

And for reference/baseline purposes, here's one of my original mp3s that I didn't have to touch with Audacity, yet it worked fine from the beginning. And it's 22050 Hz:
http://www.zerogravpro.com/temp/good_22050.mp3

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Automate open/export

Post by steve » Wed Oct 15, 2014 10:22 pm

SweatCoder wrote:Steve: I exported to VBR format and it still worked fine. So I'm thinking the difference is unrelated to VBR vs CBR.
Yes that's what it means, but at least we have eliminated that possibility.

What we have so far:

Bad files:

foobar2000.mp3

Code: Select all

File size                                : 20.3 KiB
Duration                                 : 6s 870ms
Format                                   : MPEG Audio
Format version                           : Version 2
Format profile                           : Layer 3
Bit rate mode                            : Variable
Channel(s)                               : 1 channel
Sampling rate                            : 22.05 KHz
Compression mode                         : Lossy
Stream size                              : 19.9 KiB (98%)
unfixable.mp3

Code: Select all

File size                                : 29.4 KiB
Duration                                 : 1s 854ms
Format                                   : MPEG Audio
Format version                           : Version 2
Format profile                           : Layer 3
Duration                                 : 1s 854ms
Bit rate mode                            : Constant
Bit rate                                 : 128 Kbps
Channel(s)                               : 1 channel
Sampling rate                            : 22.05 KHz
Compression mode                         : Lossy
Stream size                              : 29.0 KiB (99%)
Writing library                          : LAME3.99r
Encoding settings                        : -m m -V 4 -q 3 -lowpass 11 -b 128
unfixable2.mp3

Code: Select all

File size                                : 20.4 KiB
Duration                                 : 1s 828ms
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 3
Duration                                 : 1s 828ms
Bit rate mode                            : Variable
Bit rate                                 : 89.6 Kbps
Minimum bit rate                         : 32.0 Kbps
Channel(s)                               : 1 channel
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 20.0 KiB (98%)
Writing library                          : LAME3.99r
Encoding settings                        : -m m -V 4 -q 0 -lowpass 17.5 --vbr-new -b 32
Good files

audacity.mp3

Code: Select all

File size                                : 40.6 KiB
Duration                                 : 5s 172ms
Format                                   : MPEG Audio
Format version                           : Version 2
Format profile                           : Layer 3
Duration                                 : 6s 948ms
Bit rate mode                            : Constant
Bit rate                                 : 128 Kbps
Channel(s)                               : 1 channel
Sampling rate                            : 22.05 KHz
Compression mode                         : Lossy
Stream size                              : 108 KiB (100%)
Writing library                          : LAME3.99r
Encoding settings                        : -m m -V 4 -q 3 -lowpass 11 -b 128
good_22050.mp3

Code: Select all

File size                                : 40.6 KiB
Duration                                 : 5s 172ms
Format                                   : MPEG Audio
Format version                           : Version 2
Format profile                           : Layer 3
Duration                                 : 5s 172ms
Bit rate mode                            : Variable
Bit rate                                 : 63.9 Kbps
Minimum bit rate                         : 8 000 bps
Channel(s)                               : 1 channel
Sampling rate                            : 22.05 KHz
Compression mode                         : Lossy
Stream size                              : 40.4 KiB (99%)
Writing library                          : LAME3.99r
Encoding settings                        : -m m -V 4 -q 0 -lowpass 11 --vbr-new -b 8

The only pattern that I can see is "File Size". The "bad" ones are all under 40 kiB and the "good" ones are all over 40 kiB.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

SweatCoder
Posts: 16
Joined: Tue Nov 25, 2008 6:05 am
Operating System: Please select

Re: Automate open/export

Post by SweatCoder » Wed Oct 15, 2014 10:46 pm

Steve: I think you cracked the code. I took the "unfixable" file and made it bigger by doubling the track in audacity. Now it streams perfectly in iphone. It never crossed my mind that iphone demands mp3 files of a certain size before streaming will work. At least that's how it appears.

Any idea how to (in some automated way) make mp3 files larger without adding junk? Anyway, that is a much smaller problem. Thanks so much for your analysis and help with this.

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Automate open/export

Post by steve » Wed Oct 15, 2014 11:05 pm

SweatCoder wrote:Any idea how to (in some automated way) make mp3 files larger without adding junk?
Encode them at a higher bit rate, or just convert them to WAV format. Do WAV files work?
Here is your "unfixable" file decoded to WAV format:
unfixable.wav
(79.92 KiB) Downloaded 34 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply