I understand aac tracks cant seek playback without fully loading them, but I would prefer still to be able to seek an aac track even if in addition is not exact.
Regards
You know you can losslessly encapsulate them into an .m4a and ....?
This is a bit like insisting on feature x when you choose "no feature x".
Thank you! yes for my own collection seems a good solution but what being able to seek to whatever aac file you throw at in other contexts? Also can conversion be automated to m4a? say monitored in real time? (in my ignorance this could a bad idea) but so I don't have to manually convert aac files to m4a?
Also can conversion be automated to m4a?
This isn't "automated" per se but it's the next best thing; the following command line executed within a folder of *.aac files will wrap them into *.m4a files, which Foobar can then seek, tag, etc. The original *.aac files will be kept. You need to grab ffmpeg.exe if you don't have it (https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z (https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z)), and change the path in the command line below to reflect the location of your own ffmpeg.exe:
FOR %F IN (*.aac) DO C:\ffmpeg\ffmpeg.exe -i "%F" -codec copy "%~nF.m4a"
sveakul beat me to it.
If you want to traverse subdirectories, use FOR /R in place of FOR.
If you want to put it in a clickable file, then copy the following to into Notepad and save it as e.g. "aac-remux-to-aacdotm4a.bat"
in the folder where your .aac files areFOR /R %%f IN (*.aac) DO ffmpeg -i "%f" -map 0 -c copy "%%f.m4a"
I omitted the "~n" and so the result isn't that pretty: from file.aac it will produce file.aac.m4a, not file.m4a. But if you do this to folders where there already are .m4a files, then you can use fb2k to search up all ".aac" and you will get both the .aac and the .aac.m4a files and can verify that they are the same before selecting the .aac and deleting them. Then you select the .aac.m4a and rename them to .m4a, and next time you are doing this, all the .aac.m4a will be freshly generated.
Edit: The "-map 0" shouldn't be necessary here. It is for files that have more than one video stream or more than one audio stream. Say, if you want to make mkv out of some video which has selectable audio language.
And I am a bit curious about who uses raw .aac for distributing music :-o
Thank you @sveakul and @porcus!! Will use that ;-)
And I am a bit curious about who uses raw .aac for distributing music :-o
I believe no one... but is typically used as audio stream inside .mp4
Also there are lots of radio streams in AAC that if one saved with a tool like Streamripper would result in *.AAC tracks.
I am using this to convert within foobar with foo_run (https://www.foobar2000.org/components/view/foo_run) or foo_run_group (https://hydrogenaud.io/index.php?topic=45223.msg983460#msg983460). Deletes as well the aac source file.
cmd /c start "1" "cmd.exe" /k ffmpeg -i "%_path%" -acodec copy -bsf:a aac_adtstoasc -y "$replace(%_path%,%_filename_ext%,)%_filename%.m4a" & ping -n 2 127.0.0.1>nul &cmd /c start "2" "cmd.exe" /k del "%_path%"
is typically used as audio stream inside .mp4
Yeah. ".m4a" is just that someone found it a good idea to use a different suffix for an MP4 with audio-only.
To extract audio-only, replace
-c copy by
-acodec copy -vn -sn. Those will in order, copy the audio, omit the video (think -vn means "video: none") and omit any subtitles.
@MojoBass is also right that for AAC you will sometimes need to use the
-bsf:a aac_adtstoasc
(and I don't think it ever hurts to include it, am I right?)
Deleting source: then first make sure that it is indeed an aac. I think this line will take any file and try to make .m4a out of it, and then delete the source no matter what, correct? And it doesn't show up in your trash folder either.
@sveakul: forgot streamripper, thx.
Deleting source: then first make sure that it is indeed an aac. I think this line will take any file and try to make .m4a out of it, and then delete the source no matter what, correct? And it doesn't show up in your trash folder either.
Correct, the delete fuction should be handeled with care. Can of course be removed.
@MojoBass is also right that for AAC you will sometimes need to use the -bsf:a aac_adtstoasc
(and I don't think it ever hurts to include it, am I right?)
Actually I did not dig deeper into ffmeg options, basically got it from a google reseaech quite some time ago and it works.
Main message of my post was that there is as well the possibility to convert aac to m4a within the foobar UI.
I gave up on converting audio to m4a just this is biggest reason of why I love and hate Foobar, I have to resort to use another player alongside for seeking aac files, till I learn how to make a plugin I guess, and even so I guess it may not be allowed? I would rather deal with the performance issues of seeking aac (which are present in the other player) but that is not an option is it? So it goes... :(
I gave up on converting audio to m4a
What went wrong there? It isn't a hard thing to do, if you can install ffmpeg.
Hmm,
The bat file does not work for me. I have a folder where I have 1 raw AAC for the test. How do I manually type the command from the console
ffmpeg -i input.aac -c copy output.m4a
It works, but when I use the script, the terminal appears for a fraction of a second and disappears, and no m4a file appears.
my bath script:
FOR /R %f IN (*.aac) DO C:\ffmpeg\ffmpeg.exe -i "%f" -c copy "%~nf.m4a"
You have to execute the batch file within the same folder that the .aac file is, which means that once you open a command window, you have to use the appropriate command to navigate to that folder first.
For example, if the .aac file is in the folder c:\test, when the command window opens navigate to that folder by typing
cd c:\test, as in the example here:
(https://i.imgur.com/pMlaynF.png)
Then, execute your batch script like the one below at the prompt
FOR %F IN (*.aac) DO C:\ffmpeg\ffmpeg.exe -i "%F" -codec copy "%~nF.m4a"