HydrogenAudio

Hosted Forums => foobar2000 => General - (fb2k) => Topic started by: audiomonkey248 on 2021-06-15 19:55:26

Title: Can in the future be added an advanced setting for seekbar on aac files?
Post by: audiomonkey248 on 2021-06-15 19:55:26
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
Title: Re: Can in the future be added an advanced setting for seekbar on aac files?
Post by: Porcus on 2021-06-16 09:26:04
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".
Title: Re: Can in the future be added an advanced setting for seekbar on aac files?
Post by: audiomonkey248 on 2021-06-16 19:50:29
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?
Title: Re: Can in the future be added an advanced setting for seekbar on aac files?
Post by: sveakul on 2021-06-16 20:12:25
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:

Code: [Select]
FOR %F IN (*.aac) DO C:\ffmpeg\ffmpeg.exe -i "%F" -codec copy "%~nF.m4a"
Title: Re: Can in the future be added an advanced setting for seekbar on aac files?
Post by: Porcus on 2021-06-16 20:35:14
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 are
Code: [Select]
FOR /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

Title: Re: Can in the future be added an advanced setting for seekbar on aac files?
Post by: audiomonkey248 on 2021-06-16 21:43:55
Thank you @sveakul  and @porcus!! Will use that ;-)

Quote
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
Title: Re: Can in the future be added an advanced setting for seekbar on aac files?
Post by: sveakul on 2021-06-16 21:47:50
Also there are lots of radio streams in AAC that if one saved with a tool like Streamripper would result in *.AAC tracks.
Title: Re: Can in the future be added an advanced setting for seekbar on aac files?
Post by: MojoBass on 2021-06-17 05:11:26
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.
Code: [Select]
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%"
Title: Re: Can in the future be added an advanced setting for seekbar on aac files?
Post by: Porcus on 2021-06-17 07:20:23
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.

Title: Re: Can in the future be added an advanced setting for seekbar on aac files?
Post by: MojoBass on 2021-06-18 04:37:10
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.
SimplePortal 1.0.0 RC1 © 2008-2021