title
Products            Buy            Support Forum            Professional            About            Codec Central
 

CLI encoder error with fhgaacenc.exe

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jacobacci

    • Dec 2014
    • 43

    CLI encoder error with fhgaacenc.exe

    Hi all,
    Based on the working encoder.txt for qaac I have tried to make one for fhgaacenc.exe from Winamp:

    I put all the needed files from Winamp + fhgaacenc.exe into dbpoweramp's encoder directory. My encoder.txt looks like this
    Code:
    [codec]
    .m4a
    fhgaacenc.exe
    
    [msgifnoencoder]
    Before using this encoder a seperate component must first be installed from https://sites.google.com/site/qaacpage/ .
    
    [radio&slider]
    4
    24
    292
    1
    10
    0
    Quality (VBR)
    
    8
    Variable Bite Rate: Quality 1 (~XXkbps)
    --vbr 1 
    Variable Bite Rate: Quality 2 (~XXkbps)
    --vbr 2 
    Variable Bite Rate: Quality 3 (~XXkbps)
    --vbr 3 
    Variable Bite Rate: Quality 4 (~XXkbps)
    --vbr 4 
    Variable Bite Rate: Quality 5 (~XXkbps)
    --vbr 5 
    Variable Bite Rate: Quality 6 (~XXkbps)
    --vbr 6 
    [/sliderend]
    80
    0
    Bit Rate (CBR)
    
    9
    Constant Bit Rate: 8 Kbps
    --cbr 8
    Constant Bit Rate: 16 Kbps
    --cbr 16 
    Constant Bit Rate: 24 Kbps
    --cbr 24 
    Constant Bit Rate: 32 Kbps
    --cbr 32 
    Constant Bit Rate: 48 Kbps
    --cbr 48 
    Constant Bit Rate: 56 Kbps
    --cbr 56 
    Constant Bit Rate: 64 Kbps
    --cbr 64 
    Constant Bit Rate: 80 Kbps
    --cbr 80 
    Constant Bit Rate: 96 Kbps
    --cbr 96 
    Constant Bit Rate: 128 Kbps
    --cbr 128 
    Constant Bit Rate: 144 Kbps
    --cbr 144 
    Constant Bit Rate: 160 Kbps
    --cbr 160 
    Constant Bit Rate: 192 Kbps
    --cbr 192 
    Constant Bit Rate: 224 Kbps
    --cbr 224 
    Constant Bit Rate: 256 Kbps
    --cbr 256 
    Constant Bit Rate: 320 Kbps
    --cbr 320 
    Constant Bit Rate: 384 Kbps
    --cbr 384
    Constant Bit Rate: 448 Kbps
    --cbr 448
    Constant Bit Rate: 512 Kbps
    --cbr 512
    Constant Bit Rate: 576 Kbps
    --cbr 576
    [/sliderend]
    
    [label]
    10
    44
    low quality (smaller file)
    808080
    
    [label]
    216
    44
    high quality (larger file)
    808080
    
    [combo]
    60
    66
    110
    1
    auto (optimum)
     
    LE AAC (not VBR)
    --profile le
    HE AAC (not vbr)
    --profile he 
    HEV2 AAC (not vbr)
    --profile hev2 
    
    [combo]
    180
    66
    110
    1
    MPEG-4 container
    
    ADTS container
    --adts
    
    [clistring]
    -o "[outfile]"
    
    [highestqualitydecode]
    
    
    [maxchannels]
    8
    When I run the decoder, it works, but at the end it gives an error about not being able to write tags to the target file.
    Does anyone have and idea where my encoder.txt might be wrong?
    Thanks a lot

    EDIT: I added -noidtag to encoder.txt to get rid of the tagging error. Now I am getting the following error:
    "Error writing audio data to StdIn Pipe [dEncoder::EncodeBlock]"
    Last edited by jacobacci; April 20, 2015, 02:21 PM. Reason: Additional information added
  • jacobacci

    • Dec 2014
    • 43

    #2
    Re: CLI encoder error with fhgaacenc.exe

    Update:
    I have checked all the input parameters of fhgaacenc.exe with a simple batch file and they all work as described. A fully working m4a file is produced.
    I have adapted the infile / outfile parts of encoder.txt as follows:
    Code:
    [codec]
    .m4a
    fhgaacenc.exe
    
    [msgifnoencoder]
    Before using this encoder a seperate component must first be installed from [url]https://sites.google.com/site/qaacpage/[/url] .
    
    [radio&slider]
    4
    24
    292
    1
    10
    0
    Quality (VBR)
    
    8
    Variable Bite Rate: Quality 1 (~24kbps)
    --vbr 1 
    Variable Bite Rate: Quality 2 (~56kbps)
    --vbr 2 
    Variable Bite Rate: Quality 3 (~80kbps)
    --vbr 3 
    Variable Bite Rate: Quality 4 (~96kbps)
    --vbr 4 
    Variable Bite Rate: Quality 5 (~128ps)
    --vbr 5 
    Variable Bite Rate: Quality 6 (~144kbps)
    --vbr 6 
    [/sliderend]
    80
    0
    Bit Rate (CBR)
    
    9
    Constant Bit Rate: 8 Kbps
    --cbr 8
    Constant Bit Rate: 16 Kbps
    --cbr 16 
    Constant Bit Rate: 24 Kbps
    --cbr 24 
    Constant Bit Rate: 32 Kbps
    --cbr 32 
    Constant Bit Rate: 48 Kbps
    --cbr 48 
    Constant Bit Rate: 56 Kbps
    --cbr 56 
    Constant Bit Rate: 64 Kbps
    --cbr 64 
    Constant Bit Rate: 80 Kbps
    --cbr 80 
    Constant Bit Rate: 96 Kbps
    --cbr 96 
    Constant Bit Rate: 128 Kbps
    --cbr 128 
    Constant Bit Rate: 144 Kbps
    --cbr 144 
    Constant Bit Rate: 160 Kbps
    --cbr 160 
    Constant Bit Rate: 192 Kbps
    --cbr 192 
    Constant Bit Rate: 224 Kbps
    --cbr 224 
    Constant Bit Rate: 256 Kbps
    --cbr 256 
    Constant Bit Rate: 320 Kbps
    --cbr 320 
    Constant Bit Rate: 384 Kbps
    --cbr 384
    Constant Bit Rate: 448 Kbps
    --cbr 448
    Constant Bit Rate: 512 Kbps
    --cbr 512
    Constant Bit Rate: 576 Kbps
    --cbr 576
    [/sliderend]
    
    [label]
    10
    44
    low quality (smaller file)
    808080
    
    [label]
    216
    44
    high quality (larger file)
    808080
    
    [combo]
    60
    66
    110
    1
    auto
     
    LE AAC (CBR)
    --profile le
    HE AAC (CBR)
    --profile he 
    HEV2 AAC (CBR, max 64k)
    --profile hev2 
    
    [combo]
    180
    66
    110
    1
    MPEG-4 container
    
    ADTS container
    --adts
    
    [clistring]
    -i "[infile]" -o "[outfile]"
    
    [highestqualitydecode]
    
    
    [maxchannels]
    8
    Music Converter runs, but very quickly (in 27ms) and produces a file of 0 bytes size.

    The debug log of Music Converter is as follows:

    Code:
    Splitting Command Line:Done
    ->->  [dBCoreConverter::ReaddBCommandFile]
    <-<-  [dBCoreConverter::ReaddBCommandFile]
    Decodes  [clDecoder::Get]
    BatchID  [clDecoder::Set]
    ->->  [cldBCodecHandler::LoadEncoder]
      Loading Encoder 'C:\Program Files\dBpoweramp\encoder\fhgaacenc (Winamp).DLL'
    <-<-  [cldBCodecHandler::LoadEncoder]
    BatchID  [clEncoder::Set]
    ->->  [dBCoreConverter::StripCoreConverterCmds]
    <-<-  [dBCoreConverter::StripCoreConverterCmds]
    SendRawUnCompressed  [clEncoder::Get]
    Communicate  [clDecoder::Get]
    Communicate  [clEncoder::Get]
    NeedHQAudio  [clEncoder::Get]
    Decode As  [clDecoder::Set]
    ->->  [clDecoder::Open]
      Opening file 'D:\RF My Music\My Music Archive\2a CD 44.1\7notemode\Test\1.wav' for read access: Opened
      Reading Audio Information
      ->->  [clWaveDecoder::Initialize]
      <-<-  [clWaveDecoder::Initialize]
      ->->  [clRIFFHandler::Initialize]
        clRIFFHandler::CalcAllChunks: Ok
      <-<-  [clRIFFHandler::Initialize]
      ->->  [clRIFFHandler::ScanFile]
        clRIFFHandler::CalcAllChunks: Ok
          RIFF Header 'RIFF'  Length: 77956208  FormType 'WAVE'
          Got Chunk 'fmt '  Length: 16  RiffSizeLeft: 77956196  ChunkPosition: 12
          Got Chunk 'data'  Length: 77616000  RiffSizeLeft: 77956172  ChunkPosition: 36
          Got Chunk 'LIST'  Length: 138  RiffSizeLeft: 340164  ChunkPosition: 77616044
          Got Chunk 'id3 '  Length: 340018  RiffSizeLeft: 340018  ChunkPosition: 77616190
        clRIFFHandler::CalcAllChunks: Ok
      <-<-  [clRIFFHandler::ScanFile]
      Read Audio Information
      ->->  [clWaveDecoder::ReadIDTags]
        ->->  [clWaveDecoder::PullOutFMTnDATA]
          Finding 'fmt ' chunk.
          Finding 'data' chunk.
          Assigning 'fmt ' chunk to WFX
        <-<-  [clWaveDecoder::PullOutFMTnDATA]
        ->->  [clRIFFLISTChunk::InitFrom]
          Found Correct INFO ID, decoding LIST chunk:
        <-<-  [clRIFFLISTChunk::InitFrom]
        10 ID Tags:
    			Album: Improvisations in five, seven and twelve notes
    			Album Artist: 7notemode
    			Artist: 7notemode
    			Genre: Jazz
    			Title: Not Stella
    			Track: 01
    			Year: 2012
    			_albumart_1_Front Album Cover: DATA Length: 339816   ......JFIF.....H.H..
    			_riff_1: DATA Length: 4   fmt 
    			_riff_2: DATA Length: 4   data
      <-<-  [clWaveDecoder::ReadIDTags]
      ->->  [clWaveDecoder::FillAudioProps]
    	Audio Quality: CD  (Lossless)
    	Encoder Settings: PCM
    	Wave Header: Wave Format PCM
    	Channel Mapping: Left, Right
    	Sample Count: 19,404,000
    	Riff Chunks: 'fmt ' 16 bytes,  'data' 74.02 MB,  'LIST' 138 bytes,  'id3 ' 333 KB
    	ID Tag: LIST & ID3
    	Contains: Album Art, ID Tag[LIST & ID3]
    	Gapless: Yes
      <-<-  [clWaveDecoder::FillAudioProps]
      Writing Audio Information
      ->->  [clWaveDecoder::FillAudioInfo]
        Audio Length: 440000 mili-seconds  77616000 bytes  1411 kbps
      <-<-  [clWaveDecoder::FillAudioInfo]
      Written Audio Information
      Preparing to Decode
      ->->  [clWaveDecoder::PrepareToDecodeAudio]
        Calling ACMDecoder.CreateNewConverter
        Compressed WFX (on file): Format Tag: 1  Channels: 2  Bits per Sample: 16  Samples Per Second: 44100  Bytes Per Second: 176400  Block Align: 4  CB Size: 0
        Uncompressed WFX (sent to db): Format Tag: 1  Channels: 2  Bits per Sample: 16  Samples Per Second: 44100  Bytes Per Second: 176400  Block Align: 4  CB Size: 0
        Setting Position in File
      <-<-  [clWaveDecoder::PrepareToDecodeAudio]
      Prepared Decoding
    <-<-  [clDecoder::Open]
    SendOverReplayGainTags  [clEncoder::Get]
    ->->  [clEncoder::BeginConversion]
      Converting to 'D:\RF My Music\Converted2\7notemode\Improvisations in five, seven and twelve notes\01-Not Stella.m4a.tmp.m4a' encoder settings ' -cli_encoder="C:\Program Files\dBpoweramp\encoder\fhgaacenc (Winamp)\fhgaacenc.exe" -cli_cmd="--vbr 4  -i {qt}[infile]{qt} -o {qt}[outfile]{qt}" -selection="0,3,0,0"'
      Using Encoder 'C:\Program Files\dBpoweramp\encoder\fhgaacenc (Winamp)\fhgaacenc.exe'
      Command Line '--vbr 4  -i "D:\RF My Music\Converted2\7notemode\Improvisations in five, seven and twelve notes\01-Not Stella.m4a.tmp.m4a.tmp.wav" -o "D:\RF My Music\Converted2\7notemode\Improvisations in five, seven and twelve notes\01-Not Stella.m4a.tmp.m4a"'
      Input Wave Format:Format Tag: 1  Channels: 2  Bits per Sample: 16  Samples Per Second: 44100  Bytes Per Second: 176400  Block Align: 4  CB Size: 0
      Output Wave Format:Format Tag: 1  Channels: 2  Bits per Sample: 16  Samples Per Second: 44100  Bytes Per Second: 176400  Block Align: 4  CB Size: 0
      Passing Wave Header: Yes
      Using StdInput Pipe: No
      dBpoweramp Writing Tags: Yes
    <-<-  [clEncoder::BeginConversion]
    Communicate  [clDecoder::Get]
    Communicate  [clEncoder::Get]
    Encoding To: fhgaacenc (Winamp)
    Encoder Cmd Line:  -cli_encoder="C:\Program Files\dBpoweramp\encoder\fhgaacenc (Winamp)\fhgaacenc.exe" -cli_cmd="--vbr 4  -i {qt}[infile]{qt} -o {qt}[outfile]{qt}" -selection="0,3,0,0"
    ============= CONVERSION BEGIN =============
    ============= CONVERSION END =============
    Communicate  [clDecoder::Get]
    Communicate  [clEncoder::Get]
    ->->  [dBCoreConverter::CloseDecoder]
    ->->  [clDecoder::Close]
      ->->  [clWaveDecoder::Close]
      <-<-  [clWaveDecoder::Close]
    <-<-  [clDecoder::Close]
    ->->  [clEncoder::EndConversion]
      Running program after conversion 'C:\Program Files\dBpoweramp\encoder\fhgaacenc (Winamp)\' Command Line: 
      Program completed
    <-<-  [clEncoder::EndConversion]
      File Size Check (before overwrite final): 0 bytes   Filename: D:\RF My Music\Converted2\7notemode\Improvisations in five, seven and twelve notes\01-Not Stella.m4a.tmp.m4a
    Communicate  [clDecoder::Get]
    Communicate  [clEncoder::Get]
      Conversion completed in 78 mili-seconds x5641 realtime encoding
      File Size Check (core converter exit): 0 bytes   Filename: D:\RF My Music\Converted2\7notemode\Improvisations in five, seven and twelve notes\01-Not Stella.m4a
    Thanks a lot for any feedback.
    Last edited by jacobacci; April 20, 2015, 04:46 PM.

    Comment

    • Spoon
      Administrator
      • Apr 2002
      • 44574

      #3
      Re: CLI encoder error with fhgaacenc.exe

      Run dBpoweramp configuration and enable the debug log, it will show command line passed to the encoder.
      Spoon
      www.dbpoweramp.com

      Comment

      • jacobacci

        • Dec 2014
        • 43

        #4
        Re: CLI encoder error with fhgaacenc.exe

        Originally posted by Spoon
        Run dBpoweramp configuration and enable the debug log, it will show command line passed to the encoder.
        The debug log is in my last post.

        Comment

        • Spoon
          Administrator
          • Apr 2002
          • 44574

          #5
          Re: CLI encoder error with fhgaacenc.exe

          This is your command line:

          --vbr 4 -i "D:\RF My Music\Converted2\7notemode\Improvisations in five, seven and twelve notes\01-Not Stella.m4a.tmp.m4a.tmp.wav" -o "D:\RF My Music\Converted2\7notemode\Improvisations in five, seven and twelve notes\01-Not Stella.m4a.tmp.m4a"

          Recreate the wave file and try to encode manually with your command line above
          Spoon
          www.dbpoweramp.com

          Comment

          • jacobacci

            • Dec 2014
            • 43

            #6
            Re: CLI encoder error with fhgaacenc.exe

            I am baffled where the strange filename "01-Not Stella.m4a.tmp.m4a.tmp.wav" comes from. I can't find anything in my encoder.txt that would suggest such a filename.
            If I run a conversion with qaac (instead of fhgaacenc) the debug log contains the correct filename "01-Nor Stella.wav" and the conversion runs fine. The two encoder.txt files used in each case are essentially the same.
            ????????

            Comment

            • Spoon
              Administrator
              • Apr 2002
              • 44574

              #7
              Re: CLI encoder error with fhgaacenc.exe

              It is just a temp file which the encoder creates to write the wave file to prior to encoding.
              Spoon
              www.dbpoweramp.com

              Comment

              • jacobacci

                • Dec 2014
                • 43

                #8
                Re: CLI encoder error with fhgaacenc.exe

                Thanks, Spoon
                your suggestion pointed me in the right direction. fhgaacenc.exe only requires [Infile] [Outfile] and not -i [Infile] -o [Outfile] like qaac. I did not read the documentation accurately enough.
                Conversion running ... Processed 885 of 38430 files
                So far so good.

                Comment

                Working...

                ]]>