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: FFmpeg AAC conversion (Read 2611 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

FFmpeg AAC conversion

I'm trying to add FFmpeg as a convertor for audio in Foobar2000, using the following settings:

Encoder: C:\Program Files\ffmpeg\bin\ffmpeg.exe
Extension: m4a
Parameters: -i pipe:0 -y -c:a aac -b:a 128k "%d"
  • Do not convert with multiple threads.

And it gives me this:

Code: [Select]
1 out of 1 tracks converted with major problems.
Source: "C:\Users\matthew\Documents\Writing6.wav"
  An error occurred while writing to file (Invalid command-line parameters) : "C:\Users\matthew\Music\Writing6.m4a"
  Conversion failed: Invalid command-line parameters

Is that error from Foobar2000 or FFmpeg? It's a valid path, why would it complain?

So I've also tried these arguments:
-i "%d" -y -c:a aac -b:a 128k "%d"


The conversion works outside Foobar2000:
Code: [Select]
C:\Users\matthew\Documents>ffmpeg -i writing6.wav -y -c:a aac -b:a 128k writing6.m4a
ffmpeg version N-86911-gb664d1f Copyright (c) 2000-2017 the FFmpeg developers
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'writing6.wav':
  Metadata:
    encoded_by      : REAPER
    date            : 2018-04-09
    creation_time   : 13-52-07
    time_reference  : 0
  Duration: 00:01:37.00, bitrate: 2116 kb/s
    Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s32 (24 bit), 2116 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s24le (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, ipod, to 'writing6.m4a':
  Metadata:
    encoded_by      : REAPER
    date            : 2018-04-09
    time_reference  : 0
    encoder         : Lavf57.76.100
    Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp (24 bit), 128 kb/s
    Metadata:
      encoder         : Lavc57.102.100 aac
size=    1544kB time=00:01:37.01 bitrate= 130.4kbits/s speed=34.8x
video:0kB audio:1527kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.120084%
[aac @ 00000000046876a0] Qavg: 1439.548


What's the right syntax for this to work?

Re: FFmpeg AAC conversion

Reply #1
You have quotes around the %d that shouldn't be there.

Re: FFmpeg AAC conversion

Reply #2
del

Re: FFmpeg AAC conversion

Reply #3
You have quotes around the %d that shouldn't be there.

Same behavior without the quotes. I started with none. But I'll try it again with the stdin hack and see if that works.

Re: FFmpeg AAC conversion

Reply #4
You need either - or %s to denote input in your command line.

Re: FFmpeg AAC conversion

Reply #5
I just verified with freshly downloaded Zeranoe's FFmpeg build and your first settings work fine as long as the double quotes are removed. Encoder ffmpeg.exe, extension m4a, parameters -i pipe:0 -y -c:a aac -b:a 128k %d.

Though this seems like a weird encoder. I intentionally tested it with 20 dB boosted audio track and it compressed majority of it to be within digital fullscale. But it left some high peaks that exceed the full scale by over 20 dB. Seems like a bug.

Re: FFmpeg AAC conversion

Reply #6
Thanks I got it working with the following:
-i %s -y -c:a aac -b:a 128k %d

Which I'm sure I tried at one point but whatever.