exporting to ape with Audacity

In “external program” been trying a lot of combinations but the syntax so far is eluding me

EDIT [if you want to skip reading entire thread]

short answer is the encoder only handles 16-bit and Audacity works from 32-bit

this is the guide

this is the encoder i use [ffmpeg not an option to encode]:


mac--- Monkey's Audio Console Front End (v 4.11) (c) Matthew T. Ashland ---
Proper Usage: [Input File] [Output File] [Mode]


Modes: 
    Compress (fast): '-c1000'
    Compress (normal): '-c2000'
    Compress (high): '-c3000'
    Compress (extra high): '-c4000'
    Compress (insane): '-c5000'
    Decompress: '-d'
    Verify: '-v'
    Convert: '-nXXXX'


Examples:
    Compress: mac "Metallica - One.wav" "Metallica - One.ape" -c2000
    Decompress: mac "Metallica - One.ape" "Metallica - One.wav" -d
    Verify: mac "Metallica - One.ape" -v
    (note: int filenames must be put inside of quotations)

Lines I tried to use out of many

mac - "%f.wav" "%f.ape" -c3000

or

mac - "%f.wav" - "%f.ape" -c3000

or

mac - "f%.wav" - "f%.ape" -c3000




any better offers? thanx

thanx

You could try:

mac - "%f.ape" -c2000

though personally I’d just use FLAC instead.

Thanx but I have tried this and many others permutations
What I am seeking here is a line that actually works and has been tested not a guess :slight_smile:
Any thanx for input

It wasn’t a “guess”, it’s what the documentation says :wink:

Have you checked that your monkey audio encoder works from the command line? If so, what exactly are you entering?

Apologies Steve that came across a tad rude on my part :wink:

I use this one here:

mac--- Monkey's Audio Console Front End (v 4.11) (c) Matthew T. Ashland ---
Proper Usage: [Input File] [Output File] [Mode]


Modes: 
    Compress (fast): '-c1000'
    Compress (normal): '-c2000'
    Compress (high): '-c3000'
    Compress (extra high): '-c4000'
    Compress (insane): '-c5000'
    Decompress: '-d'
    Verify: '-v'
    Convert: '-nXXXX'


Examples:
    Compress: mac "Metallica - One.wav" "Metallica - One.ape" -c2000
    Decompress: mac "Metallica - One.ape" "Metallica - One.wav" -d
    Verify: mac "Metallica - One.ape" -v
    (note: int filenames must be put inside of quotations)

ant it works a dream


like yourself followed the instructions:

Format Options

In the Command: box type:

The path to the program
If the program syntax requires it, space then the infile command
Space, hyphen
If required, space then valid output options for the file
If the program syntax requires it, space then the outfile command
Finally (assuming file output), space then “%f”.

The “%f” command passes the file name and extension entered in the Export Audio dialog as the output file of the external program.

AND spent 3 hours trying permutations as one does but so far still no dice :slight_smile:

Can you give an actual example that works for you from the command line, for example, to convert a file

~/Desktop/test.wav

to

~/Desktop/test.ape

Also, do you get any output from the command:

which mac

Also, wondering why you want APE files rather than WAV or FLAC. It seems a strange decision considering that Monkey’s Audio only support Windows.

shan@shan-Aspire-XC-780:~$ which mac
/usr/bin/mac
shan@shan-Aspire-XC-780:~$

and


shan@shan-Aspire-XC-780:~/Desktop/trial$ mac plank\ 7\ june\ 2020\ .wav plank\ 7\ june\ 2020\ .ape -c4000
--- Monkey's Audio Console Front End (v 4.11) (c) Matthew T. Ashland ---
Compressing (extra high)...
Progress: 100.0% (0.0 seconds remaining, 5.6 seconds total)          
Success...
shan@shan-Aspire-XC-780:~/Desktop/trial$

Is that verbatim? If so, I’m surprised that it works :open_mouth:

it does :slight_smile:

Does this also work?

mac "plank 7 june 2020 .wav" test.ape -c4000

yep it does Steve

mac "plank 7 june 2020 .wav" test.ape -c4000
--- Monkey's Audio Console Front End (v 4.11) (c) Matthew T. Ashland ---
Compressing (extra high)...
Progress: 100.0% (0.0 seconds remaining, 6.0 seconds total)

hmmmm and no “” on the ape bit … odd that it works


PS never mentioned it but my versh is 2.3.3 if it helps to know that on Ubuntu 20.04 on my main toy . I also have Slackware on a different older machine

If you enable the “Show output” option in the export dialog, and then run

mac - "%f.ape" -c2000

what is shown in the “Command Output” screen?

ERROR_INVALID_INPUT_FILE                        1002

Does the encoder support 32-bit float input?

not sure how to check that

no manual all we have is

PS i hope it does as what i am seeking to make here are 24-bit files


 mac --help
--- Monkey's Audio Console Front End (v 4.11) (c) Matthew T. Ashland ---
Proper Usage: [Input File] [Output File] [Mode]

Modes: 
    Compress (fast): '-c1000'
    Compress (normal): '-c2000'
    Compress (high): '-c3000'
    Compress (extra high): '-c4000'
    Compress (insane): '-c5000'
    Decompress: '-d'
    Verify: '-v'
    Convert: '-nXXXX'

Examples:
    Compress: mac "Metallica - One.wav" "Metallica - One.ape" -c2000
    Decompress: mac "Metallica - One.ape" "Metallica - One.wav" -d
    Verify: mac "Metallica - One.ape" -v
    (note: int filenames must be put inside of quotations)

Here’s a couple of 5 second tones. 32-bit float mono and 32-bit float stereo.
See if you can encode them to APE from the command line.

hmmmmmmmmmmm interesting


mac test32.wav test.ape -C4000
— Monkey’s Audio Console Front End (v 4.11) (c) Matthew T. Ashland —
Compressing (extra high)…

Error: 1002
shan@shan-Aspire-XC-780:~/Desktop$ mac “test32.wav” “test.ape” -C4000
— Monkey’s Audio Console Front End (v 4.11) (c) Matthew T. Ashland —
Compressing (extra high)…

Error: 1002
shan@shan-Aspire-XC-780:~/Desktop$ mac "test32s.wav “test2.ape” -C4000

^C
shan@shan-Aspire-XC-780:~/Desktop$ mac “test32s.wav” “test2.ape” -C4000
— Monkey’s Audio Console Front End (v 4.11) (c) Matthew T. Ashland —
Compressing (extra high)…

Error: 1002

Ha ok seems this encoder only handles 16-bit

after what you asked last I ran a 24-bit alac to wav then to mac and again the dreaded ERROR: 1002 reared its head again
And since Audacity works from 32-bit that right there might indeed be the fly in the ointment


see below:

shan@shan-Aspire-XC-780:~/Desktop/trial$ mediainfo Rubycon\ Part\ 1.m4a 
General
Complete name                            : Rubycon Part 1.m4a
Format                                   : MPEG-4
Format profile                           : Apple audio with iTunes info
Codec ID                                 : M4A  (M4A /isom/iso2)
File size                                : 185 MiB
Duration                                 : 17 min 15 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 1 494 kb/s
Album                                    : Rubycon
Track name/Position                      : 1
Performer                                : Tangerine Dream
Genre                                    : Berlin School, Krautrock, Kosmische Rock, Cosmic Rock, Electronic, Electronica,
Recorded date                            : 1975
Writing application                      : Lavf58.49.100
Cover                                    : Yes
COMMENT                                  : 1975 UK Cassette

Audio
ID                                       : 1
Format                                   : ALAC
Codec ID                                 : alac
Codec ID/Info                            : Apple Lossless Audio Codec
Duration                                 : 17 min 15 s
Duration_LastFrame                       : -4 ms
Bit rate mode                            : Variable
Bit rate                                 : 1 472 kb/s
Nominal bit rate                         : 2 304 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Bit depth                                : 24 bits
Stream size                              : 182 MiB (98%)
Default                                  : Yes
Alternate group                          : 1


shan@shan-Aspire-XC-780:~/Desktop/trial$ ffmpeg -i Rubycon\ Part\ 1.m4a -c:a pcm_s24le Rubycon\ Part\ 1.WAV
ffmpeg version N-98601-g134a48a Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/home/shan/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/shan/ffmpeg_build/include --extra-ldflags=-L/home/shan/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/shan/bin --enable-gpl --enable-gnutls --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
  libavutil      56. 57.100 / 56. 57.100
  libavcodec     58. 98.100 / 58. 98.100
  libavformat    58. 49.100 / 58. 49.100
  libavdevice    58. 11.101 / 58. 11.101
  libavfilter     7. 87.100 /  7. 87.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x562aa7618380] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Rubycon Part 1.m4a':
  Metadata:
    major_brand     : M4A 
    minor_version   : 512
    compatible_brands: M4A isomiso2
    artist          : Tangerine Dream
    album           : Rubycon
    genre           : Berlin School, Krautrock, Kosmische Rock, Cosmic Rock, Electronic, Electronica,
    track           : 1
    date            : 1975
    encoder         : Lavf58.49.100
    COMMENT         : 1975 UK Cassette
  Duration: 00:17:15.77, start: 0.000000, bitrate: 1494 kb/s
    Stream #0:0(und): Audio: alac (alac / 0x63616C61), 48000 Hz, stereo, s32p (24 bit), 1471 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
    Stream #0:1: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 1540x2492 [SAR 72:72 DAR 55:89], 90k tbr, 90k tbn, 90k tbc (attached pic)
Stream mapping:
  Stream #0:0 -> #0:0 (alac (native) -> pcm_s24le (native))
Press [q] to stop, [?] for help
Output #0, wav, to 'Rubycon Part 1.WAV':
  Metadata:
    major_brand     : M4A 
    minor_version   : 512
    compatible_brands: M4A isomiso2
    IART            : Tangerine Dream
    IPRD            : Rubycon
    IGNR            : Berlin School, Krautrock, Kosmische Rock, Cosmic Rock, Electronic, Electronica,
    IPRT            : 1
    ICRD            : 1975
    ICMT            : 1975 UK Cassette
    ISFT            : Lavf58.49.100
    Stream #0:0(und): Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      encoder         : Lavc58.98.100 pcm_s24le
size=  291311kB time=00:17:15.77 bitrate=2304.0kbits/s speed= 506x    
video:0kB audio:291311kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000094%
shan@shan-Aspire-XC-780:~/Desktop/trial$ mediainfo Rubycon\ Part\ 1.WAV 
General
Complete name                            : Rubycon Part 1.WAV
Format                                   : Wave
File size                                : 284 MiB
Duration                                 : 17 min 15 s
Overall bit rate mode                    : Constant
Overall bit rate                         : 2 304 kb/s
Part/Position                            : 1
Director                                 : Tangerine Dream
Genre                                    : Berlin School, Krautrock, Kosmische Rock, Cosmic Rock, Electronic, Electronica,
Recorded date                            : 1975
Writing application                      : Lavf58.49.100
Original source form/Name                : Rubycon
Comment                                  : 1975 UK Cassette

Audio
Format                                   : PCM
Format settings                          : Little / Signed
Codec ID                                 : 00000001-0000-0010-8000-00AA00389B71
Duration                                 : 17 min 15 s
Bit rate mode                            : Constant
Bit rate                                 : 2 304 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Bit depth                                : 24 bits
Stream size                              : 284 MiB (100%)


shan@shan-Aspire-XC-780:~/Desktop/trial$ mac Rubycon\ Part\ 1.WAV Rubycon\ Part\ 1.ape -C5000
--- Monkey's Audio Console Front End (v 4.11) (c) Matthew T. Ashland ---
Compressing (insane)...

Error: 1002

======


further corroborated by the fact that I got nowhere fast with ttaenc either the message I get from Audacity and ttaenc is this:

_ttaenc -e Rubycon\ Part\ 1.wav
TTA1 lossless audio encoder/decoder, release 3.4.1
Copyright (c) 2007 Aleksander Djuric. All rights reserved.
For more information see > http://tta.sourceforge.net

File: [Rubycon Part 1.wav]
Error: not compatible file format
Total: [0/1, 0.0/0.0 Mb], ratio: 0.000, time: 0’00
------------------------------------------------------------


FROM THIS 32-Bit FILE

shan@shan-Aspire-XC-780:~/Desktop/trial$ mediainfo Rubycon\ Part\ 1.wav
General
Complete name : Rubycon Part 1.wav
Format : Wave
File size : 379 MiB
Duration : 17 min 15 s
Overall bit rate mode : Constant
Overall bit rate : 3 072 kb/s
Part/Position : 1
Director : Tangerine Dream
Genre : Berlin School, Krautrock, Kosmische Rock, Cosmic Rock, Electronic, Electronica,
Recorded date : 1975
Writing application : Lavf58.49.100
Original source form/Name : Rubycon
Comment : 1975 UK Cassette

Audio
Format : PCM
Format settings : Little / Signed
Codec ID : 00000001-0000-0010-8000-00AA00389B71
Duration : 17 min 15 s
Bit rate mode : Constant
Bit rate : 3 072 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Bit depth : 32 bits
Stream size : 379 MiB (100%)_

AND YET ffmpeg CAN encode to 24-bit from a 32-bit when ttaenc cannot so there must be a way to do likewise in Audacity maybe with mac and ttaenc if you catch my roundabout logic :wink: or maybe not …

see:

ffmpeg -i Rubycon\ Part\ 1.wav -c:a tta Rubycon\ Part\ 1.tta
ffmpeg version N-98601-g134a48a Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/home/shan/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/shan/ffmpeg_build/include --extra-ldflags=-L/home/shan/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/home/shan/bin --enable-gpl --enable-gnutls --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
  libavutil      56. 57.100 / 56. 57.100
  libavcodec     58. 98.100 / 58. 98.100
  libavformat    58. 49.100 / 58. 49.100
  libavdevice    58. 11.101 / 58. 11.101
  libavfilter     7. 87.100 /  7. 87.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Input #0, wav, from 'Rubycon Part 1.wav':
  Metadata:
    artist          : Tangerine Dream
    comment         : 1975 UK Cassette
    date            : 1975
    genre           : Berlin School, Krautrock, Kosmische Rock, Cosmic Rock, Electronic, Electronica,
    album           : Rubycon
    track           : 1
    encoder         : Lavf58.49.100
  Duration: 00:17:15.77, bitrate: 3072 kb/s
    Stream #0:0: Audio: pcm_s32le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s32, 3072 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s32le (native) -> tta (native))
Press [q] to stop, [?] for help
[tta @ 0x55ebbc8c05c0] encoding as 24 bits-per-sample
Output #0, tta, to 'Rubycon Part 1.tta':

PS: all these I have tested and work

ffmpeg -i - -c:a alac -sample_fmt s32p "%f" [24-bit]
ffmpeg -i - -acodec alac "%f"   [16-bit]
ffmpeg -i -  -c:a wavpack -sample_fmt s32p "%f" [24-bit]
ffmpeg -i -  -c:a wavpack  "%f" [16-bit]
ffmpeg -i - -c:a tta "%f" [16-bit]
shorten - "%f"   [16-bit]

==============

EDIT

Andrew here on Ubuntuforums came up with one alternative encoder which works with command provided by the handbook but it stays in 16-bit as Linux mac versions still not doing 24-bit; it is a partial solution certainly helps a bit