Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert ATRAC3 Plus to ATRAC1 #9

Open
Invictaz opened this issue Dec 2, 2019 · 11 comments
Open

Convert ATRAC3 Plus to ATRAC1 #9

Invictaz opened this issue Dec 2, 2019 · 11 comments

Comments

@Invictaz
Copy link

Invictaz commented Dec 2, 2019

  1. Input track.oma or .msf (not yet supported)
  2. Determine if it is ATRAC 3 or ATRAC 3 Plus
  3. Convert to ATRAC 1 and output track.aea

Is not possible yet. It's only possible to decode Atrac1, not Atrac 3 or Atrac 3 Plus.

Decoding source

ATRAC3 Plus https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/atrac3plus.c
ATRAC3 https://github.com/FFmpeg/FFmpeg/blob/master/libavcodec/atrac3.c

Or use the one from VGMStream

https://github.com/losnoco/vgmstream

@dcherednik
Copy link
Owner

You can decode atrac3plus by ffmpeg to pcm and than encode pcm to atrac1. The result will be same.

@Invictaz
Copy link
Author

Invictaz commented Dec 3, 2019

That requires additional extra steps and extra harddrive space which consume a lot of time.

@dcherednik
Copy link
Owner

I can support read from stdin, on linux/mac it makes possible to pipeline ffmpeg and atracdenc without saving temporal files. It can be done for quite short period.

@Invictaz
Copy link
Author

Invictaz commented Dec 4, 2019

Great, I hope it is possible on the Windows build as well (or with temp files which can be deleted after processing).

@dcherednik
Copy link
Owner

The New Year present ))
I added support of reading from stdin for windows and POSIX. So now it should be possible make a pipe from ffmpeg to atracdenc. Example:
ffmpeg -i input_audio_file_supported_by_ffmpeg -f au - | atracdenc -e atrac1 -i - -o out.aea

https://github.com/dcherednik/atracdenc/releases/tag/0.0.2

@Invictaz
Copy link
Author

It seems as if the pipe is failing:

image

@dcherednik
Copy link
Owner

dcherednik commented Apr 4, 2020

The ffmpeg input file has 48000 samplerate. Try to add ffmpeg option to resample stream to 44100

@Invictaz
Copy link
Author

Invictaz commented Apr 6, 2020

Thanks, it seems to work for ATRAC3, but not for ATRAC3 plus (see below)

ffmpeg -i <inputfile.extension> -ar 44100 -f au - | atracdenc -e atrac1 -i - -o out.aea

image

For ATRAC3Plus it seems to fail

image

Can upload sample file if you want.

@Invictaz
Copy link
Author

Invictaz commented Apr 6, 2020

It's quite weird as an output file is generated but still the errors in the console.

@dcherednik
Copy link
Owner

Can you just decode this sample by ffmpeg? If so please send me this sample.

@enimatek-nl
Copy link

Maybe use -f wav instead, all formats seem to work for me instead of using -f au.

And to get 'DSP Type-?' kind of that extra 'airy'-sound you could pre-process the wav with eg. stereotool.com (free version is what i use) and search for a very neutral profile on the forum (or create one your self) especially more silent/background instruments need to be pushed more forward i guess, and widen the stereo a bit, that is probably what the DSP/Type stuff does during recording, but i can only guess.

For example; you can also pipe stereotool so you command will be like:
ffmpeg -i input.flac -f wav - | stereo_tool_mac - - -s neutral.sts | atracdenc -e atrac1 -i - -o output.aea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants