Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: iTunesEncode.exe AIFF Encoder parameters [error code; no pipe/stdin support] (Read 751 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

iTunesEncode.exe AIFF Encoder parameters [error code; no pipe/stdin support]

This is somewhat of an obsession that I want to fix, but not really all that necessary as I can repair and encode using Flac.  However, I have friends and family that want files in AIFF format. 

Using EAC, I rip to Aif format using the iTunes AIFF encoder.  As such, I thought it would be easy to use the iTunes AIFF encoder in CueTools.  However, no matter what parameters I use, CueTools returns an error code stating something like "Exception: iTunesEncode.exe has exited prematurely with code -1; The pipe has been ended."   Depending on the parameters I use, this error message will change to a -3 or -5 code instead of -1. 

I have tried dozens of different parameters, but here is one based on my EAC set up.  With these parameters, iTunes returns a file track titled "01. music track name.aiff" (See below for content)

-e "AIFF Encoder" -a "%artist%" -l "%albumtitle%" -t "%title%" -g "%genre%" -y "%year%" -n "%tracknr%" -r "%coverfile%" -i "%source%" -o "%dest%"

"01. music track name.aiff" content from iTunesEncoder.exe:

Artist: %artist%
Album: %albumtitle%
Title: %title%
Genre: %genre%
Year: %year%
TrackNumber: %tracknr%
Artwork File: %coverfile%
Input File: %source%
Output File: %dest%
Encoder: AIFF Encoder
Delay: 4000
Starting iTunes Encoder... Please Wait...
Encode Progress at 100%
Encoder Finished, Adding Tags (if any)
Error getting tracks, user cancelled convert?

Anyone know how to make this work?

Re: iTunesEncode.exe AIFF Encoder parameters [error code; no pipe/stdin support]

Reply #1
You cannot specify tagging in parameters (tagging is done internally (if supported) by taglib-sharp). Encoding parameters only.
http://cue.tools/wiki/CUETools_Advanced_Settings:_Encoders
korth

Re: iTunesEncode.exe AIFF Encoder parameters [error code; no pipe/stdin support]

Reply #2
Yeah, based on looking at examples of other parameter files, I figured this contained too much.  However, it's not clear to me what parameters should or should not be included.  Any idea what I should include?  I should note that I've studied the CueTools parameter page and tried many different variations of parameters without success. 

Re: iTunesEncode.exe AIFF Encoder parameters [error code; no pipe/stdin support]

Reply #3
You have a link the supported parameters? Mr. google hasn't provided one based on my search terms.
korth

Re: iTunesEncode.exe AIFF Encoder parameters [error code; no pipe/stdin support]

Reply #4
Somewhere I did find them, but now I'm having trouble finding again.  I'll keep looking.

Re: iTunesEncode.exe AIFF Encoder parameters [error code; no pipe/stdin support]

Reply #5
Based on
 
Code: [Select]
-i "%source%" -o "%dest%"
you might have to use
 
Code: [Select]
-i - -o %O
korth

Re: iTunesEncode.exe AIFF Encoder parameters [error code; no pipe/stdin support]

Reply #6
I'm unable to find the allowable parameters, but I did try the two options you provided.  Neither option worked.  Both returned the same error with -5 as the code.

Re: iTunesEncode.exe AIFF Encoder parameters [error code; no pipe/stdin support]

Reply #7
Here is what iTunesEncoder.exe returns as the parameter file:

Usage: iTunesEncode.exe [options] -i <input.wav> [-o <output.m4a>]

  Tagging Options:
  -a <Artist>      Adds an artist tag to the file
  -l <Album>       Adds an album tag to the file
  -t <Title>       Adds a song title tag to the file
  -g <Genre>       Adds a genre tag to the file
  -y <Year>        Adds a year tag to the file
  -n <TrackNum>    Adds a track number tag to the file
  -m <TrackCount>  Adds a track count tag to the file
  -b <BPM>         Adds a BPM tag to the file
  -c <Comment>     Adds a comment tag to the file
  -u <Grouping>    Adds a grouping tag to the file
  -x <Compilation> Adds a compilation tag to the file
  -p <Composer>    Adds a composer tag to the file
  -j <DiscNumber>  Adds a disc number tag to the file
  -k <DiscCount>   Adds a disc count tag to the file
  -r <filename>    Adds artwork to the file

Tag option notes:
-Options y,n,m,b,e,f should be numeric.
-Option x is a boolean and can be 1,true,yes,T,Y,on,enable...

  Non-tagging options:
  -i <filename>    Specifies the input file. The input file can be
                   of any format iTunes can read.
                   (WAV, AIFF, M4A, MP3, WMA)

  -o <filename>    Specifies an output file. The resulting encoded
                   file will be copied here after encoding and
                   tagging are complete.

  -s <delay>       Delay to use in milliseconds (default: 4000).
                   Increase this if you experience problems
                   using iTunesEncode on long batch encodes.

  -e EncoderName   Lets you specify the encoder iTunes will use.
                   Choose from "AAC Encoder", "WAV Encoder",
                   "MP3 Encoder", "AIFF Encoder",
                   or "Lossless Encoder".
                   (Default is "AAC Encoder".)

  -d   This switch will make the program delete the song from
       the iTunes library once encoding and copying are complete.

Non-tag option notes:
-If you don't have an output specified, then the output
 won't be copied anywhere, and so using -d would be a bad idea.

-If the output file exists, it will be overwritten.

Re: iTunesEncode.exe AIFF Encoder parameters [error code; no pipe/stdin support]

Reply #8
CUETools expects the encoder to support stdin (standard input). I don't see that specified for the input.
Quote
  -i <filename>    Specifies the input file. The input file can be
                   of any format iTunes can read.
                   (WAV, AIFF, M4A, MP3, WMA)

  -o <filename>    Specifies an output file. The resulting encoded
                   file will be copied here after encoding and
                   tagging are complete.

  -e EncoderName   Lets you specify the encoder iTunes will use.
                   Choose from "AAC Encoder", "WAV Encoder",
                   "MP3 Encoder", "AIFF Encoder",
                   or "Lossless Encoder".
                   (Default is "AAC Encoder".)

I didn't add the flag for the encoder but this probably won't work either if stdin isn't allowed by the encoder.
Code: [Select]
-e "AIFF Encoder" -i - -o %O
or
Code: [Select]
-e "AIFF Encoder" - -o %O
korth

Re: iTunesEncode.exe AIFF Encoder parameters [error code; no pipe/stdin support]

Reply #9
Yeah, that returns the same error message.  I'm beginning to think the iTunes external AIFF encoder isn't compatible with CueTools, but it works just fine in EAC.  

Re: iTunesEncode.exe AIFF Encoder parameters [error code; no pipe/stdin support]

Reply #10
You could encode using ffmpeg
https://hydrogenaud.io/index.php?msg=1020471
Decoding support was added to CUETools since that thread.
korth

Re: iTunesEncode.exe AIFF Encoder parameters [error code; no pipe/stdin support]

Reply #11
Sounds like that's the only choice.  Where does one get a copy of ffmpeg.exe?

Re: iTunesEncode.exe AIFF Encoder parameters [error code; no pipe/stdin support]

Reply #12
I get my 64bit from https://github.com/GyanD/codexffmpeg/releases/

You can get creative and get the shared version and unpack the \bin contents to \CUETools_2.2.5\plugins\x64\
This will give you the needed dll files for the ffmpeg plugin along with ffmpeg.exe. ffmpeg.exe will need to stay in that location to use the shared dll files so you will need to use that path for setting up the encoder.
korth

Re: iTunesEncode.exe AIFF Encoder parameters [error code; no pipe/stdin support]

Reply #13
Thanks. I'll give it a try.

Happy to report that using ffmpeg worked without any issues.  You might want to put a sticky note at the top of CueTools page to warn folks that iTunesEncode.exe cannot be used to encode wav files as it's not compatible with CueTools.