VideoHelp Forum




+ Reply to Thread
Page 3 of 3
FirstFirst 1 2 3
Results 61 to 69 of 69
  1. Originally Posted by eddy89 View Post
    The QAAC is the wrapper of apple AAC (which is aac_at) in windows, and I am sure there is a way to use it inside of ffmpeg, there are people reporting using it in windows with no problem. Just need to find a compiled version of ffmpeg with the functionality -same as if you wanna use fraunhofer- because of license issues is not coming with the program) So, it is NOT just working in macOS, as you are using it already with QAAC. Look here, here or here.
    The only way I could find to use aac_at with ffmpeg on Windows is to use this.
    I haven't tried it yet, but there's probably no guarantee the result would be the same as on a macOS though.
    Quote Quote  
  2. @ hello_hello,
    Read this topic:
    ffmpeg for aac_at

    This is what autodidact did for me with a version for Windows 7 32-bit.
    I did not ask if he also did this for Windows 64-bit.
    ffmpeg build
    Then you need to add this:
    OT files
    Read this post:

    It works well on most conversions using aac_at.
    It did not on the file eddy89 is working with or the one I posted.
    Those both involved DTS.

    For myself files like the ones linked to for github I do not know how to use them.
    I guess for building a persons own ffmpeg build.
    Quote Quote  
  3. That looks like it'd take a bit of learning and I'm not sure I'm motivated for it at the moment.

    From the link you posted I see it's not correctly working for you yet. Have you tried
    -channel_layout '7.1'
    in the command line instead of -ac 8?
    Quote Quote  
  4. Originally Posted by hello_hello View Post
    That looks like it'd take a bit of learning and I'm not sure I'm motivated for it at the moment.
    Well, then not much to say.

    Originally Posted by hello_hello View Post
    From the link you posted I see it's not correctly working for you yet. Have you tried
    -channel_layout '7.1'
    in the command line instead of -ac 8?
    The flag -channel_layout '7.1' does not work:
    [aac_at @ 0x7fe74f706680] Specified channel layout '7.1' is not supported by the aac_at encoder
    [aac_at @ 0x7fe74f706680] Supported channel layouts:
    [aac_at @ 0x7fe74f706680] mono
    [aac_at @ 0x7fe74f706680] stereo
    [aac_at @ 0x7fe74f706680] 3.0
    [aac_at @ 0x7fe74f706680] 4.0
    [aac_at @ 0x7fe74f706680] 5.0(side)
    [aac_at @ 0x7fe74f706680] 5.1(side)
    [aac_at @ 0x7fe74f706680] 6.0
    [aac_at @ 0x7fe74f706680] 6.1
    [aac_at @ 0x7fe74f706680] 7.0
    [aac_at @ 0x7fe74f706680] 7.1(wide)
    [aac_at @ 0x7fe74f706680] quad
    [aac_at @ 0x7fe74f706680] octagonal
    [aost#0:0/aac_at @ 0x7fe74f706380] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.
    [af#0:0 @ 0x7fe74f706dc0] Error sending frames to consumers: Invalid argument
    [af#0:0 @ 0x7fe74f706dc0] Task finished with error code: -22 (Invalid argument)
    [af#0:0 @ 0x7fe74f706dc0] Terminating thread with return code -22 (Invalid argument)
    [aost#0:0/aac_at @ 0x7fe74f706380] Could not open encoder before EOF
    [aost#0:0/aac_at @ 0x7fe74f706380] Task finished with error code: -22 (Invalid argument)
    [aost#0:0/aac_at @ 0x7fe74f706380] Terminating thread with return code -22 (Invalid argument)
    [out#0/adts @ 0x7fe74f7061c0] Nothing was written into output file, because at least one of its streams received no packets.
    It has to be -channel_layout '7.1(wide)' instead. Find it here. Have a look, but it does not look very good either.
    Quote Quote  
  5. The 7.1(wide) works but only L R C & LFE channels play.
    octaganal works but leaves out the LFE channel.
    I tried using channelmap but I always got errors.
    I could not figure out how to get channelmap to work.
    Quote Quote  
  6. If we want to use ffmpeg, it works perfect with Fraunhofer aac encoder, and if we want to use the apple encoder, with afconvert -just macOS- works perfectly too. So is not the end of the world. Fraunhofer is supposed to be great too.

    What I wanted to do here, was to identify what is good and what is wrong. And we identified them.

    If we find the way to encode with apple AAC within ffmpeg should be great, but if is not possible, we have options already.
    Quote Quote  
  7. Originally Posted by eddy89 View Post
    and if we want to use the apple encoder, with afconvert -just macOS- works perfectly too.
    Well, not true, DTS is not supported as input, which is the main reason of encoding...
    What is clear is ffmpeg is the guilty one using the aac_at wrongly. That's why I requested @ hello_hello to open an issue in ffmpeg the same way he did for qaac, to solve this properly.
    Last edited by eddy89; 25th May 2025 at 08:52.
    Quote Quote  
  8. I was playing around today and apparently bash scripts on Linux and MacOS are fairly interchangeable, and while I'm a novice at creating them, here's one that works that you might like to test. If you save it as a file with a .sh extension and run it in a terminal, it should try to convert every file in the same folder as the script to aac/m4a.

    It's actually piping from ffmpeg to ffmpeg, which is pointless, aside from proving the piping works.

    Code:
    #! /bin/bash
    
    while read filename; do
    
      if [ -f "${filename%.*}.m4a" ]; then
    
          echo -e "\033[1;31mFile Already Exists:\033[1;33m ${filename%.*}.m4a\033[1;39m"
    
      elif [ -f "${filename%.*}.sh" ]; then
    
          echo -e "Skipping ${filename%.*}.sh"
    
      else
    
          ffmpeg -i "${filename%}" -ignore_length true -vn -sn -c:a pcm_f32le -f wav - | ffmpeg -i - -c:a aac "${filename%.*}.m4a"
    
      fi
    
    done < <(find "$PWD" -maxdepth 1 -type f -name '*.*' | sort -t'/')
    
    read -p "Press any key to exit" -rn1
    I can't test it, but I wonder if you can pipe to afconvert instead by changing the line in blue to something like this. I don't know if that's the correct afconvert command line or if it supports pipes because I can't test it.

    ffmpeg -i "${filename%}" -ignore_length true -vn -sn -c:a pcm_f32le -f wav - | afconvert - -d WAVE -s 0 -b 512000 -q 127 -o "${filename%.*}.m4a" -f m4af
    Quote Quote  
  9. Originally Posted by hello_hello View Post
    I was playing around today and apparently bash scripts on Linux and MacOS are fairly interchangeable, and while I'm a novice at creating them, here's one that works that you might like to test. If you save it as a file with a .sh extension and run it in a terminal, it should try to convert every file in the same folder as the script to aac/m4a.

    It's actually piping from ffmpeg to ffmpeg, which is pointless, aside from proving the piping works.

    Code:
    #! /bin/bash
    
    while read filename; do
    
      if [ -f "${filename%.*}.m4a" ]; then
    
          echo -e "\033[1;31mFile Already Exists:\033[1;33m ${filename%.*}.m4a\033[1;39m"
    
      elif [ -f "${filename%.*}.sh" ]; then
    
          echo -e "Skipping ${filename%.*}.sh"
    
      else
    
          ffmpeg -i "${filename%}" -ignore_length true -vn -sn -c:a pcm_f32le -f wav - | ffmpeg -i - -c:a aac "${filename%.*}.m4a"
    
      fi
    
    done < <(find "$PWD" -maxdepth 1 -type f -name '*.*' | sort -t'/')
    
    read -p "Press any key to exit" -rn1
    I can't test it, but I wonder if you can pipe to afconvert instead by changing the line in blue to something like this. I don't know if that's the correct afconvert command line or if it supports pipes because I can't test it.

    ffmpeg -i "${filename%}" -ignore_length true -vn -sn -c:a pcm_f32le -f wav - | afconvert - -d WAVE -s 0 -b 512000 -q 127 -o "${filename%.*}.m4a" -f m4af
    It does NOT work:

    Code:
    [aost#0:0/pcm_f32le @ 0x7fee42705240]Error submitting a packet to the muxer: Broken pipe
        Last message repeated 1 times
    [out#0/wav @ 0x7fee42704880] Error muxing a packet
    [out#0/wav @ 0x7fee42704880] Task finished with error code: -32 (Broken pipe)
    [out#0/wav @ 0x7fee42704880] Terminating thread with return code -32 (Broken pipe)
    [out#0/wav @ 0x7fee42704880] Error writing trailer: Broken pipe
    [out#0/wav @ 0x7fee42704880] Error closing file: Broken pipe
    [out#0/wav @ 0x7fee42704880] video:0KiB audio:1KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 7.968750%
    size=       1KiB time=00:00:00.00 bitrate=2211.2kbits/s speed=0.377x    
    Conversion failed!
    Broken pipe does not seem too encouraging...
    I was playing around with it, but sadly I don't think afconvert is pipeable.

    @ hello_hello could you please open an issue in ffmpeg to make it support aac_at with 7.1 configuration?? Thanks
    Last edited by eddy89; 27th May 2025 at 13:14.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!