ALAC lossless encoding

Archived from the Transloadit support forum. Originally posted on July 16, 2014; details may be outdated, see our docs for current behavior. Original thread

Ever since we started encoding the ALACs with transloadit, we have been getting an error saying that the files are not lossless when submitting to iTunes. In the past when we encoded the files with dbPoweramp, we could take the ALAC files and upload them directly to iTunes.

Please see if this can be corrected. I am including a sreen shot.

Hi Mike,

I would need to look into it. Do you have an assembly id so I can check it out?

Kind regards,
Kevin

Every assembly that created alac (m4a) files has this problem. Here is an assembly id from the screenshot I sent earlier: REDACTED

Did you make any progress on this issue?

Hi Mike,

We released an Heroku addon yesterday and are currently swamped dealing with the first feedback, we’ll attend to your assembly soon!

Sorry for the delays,

Kevin

Hello Mike,

After some investigation I have the idea it could be related to settings inside the alac preset.

Could you try not using the preset, but these parameters instead?

{
  "robot"       : "/audio/encode",
  "ffmpeg_stack": "v2.1.0",
  "ffmpeg"      : {
    "map": [
      "0",
      "-0:d",
      "-0:s",
      "-0:v"
    ],
    "f"            : "m4a",
    "id3v2_version": 3,
    "write_id3v1"  : 1,
    "codec:a"      : "alac"
  }
}

Please remember to add the appropriate use parameter.

If I am correct, we will update the preset (in a later stack version though as to not break backwards compatibility).

Kind regards,
Kevin

Do you still want me to try the template adjustment you suggested in your previous message?

Mike

Hi Mike,

Yes if you could check if the settings I supplied yield your expected results that would be great!

Kind regards,
Kevin

The settings did not work. We tried with three jobs and they all failed. Here are the assembly ids:

REDACTED
REDACTED
REDACTED

Hi Mike,

The output mentions m4a is not a suitable output format. That’s ‘correct’ as we only support demuxing from m4a (https://transloadit.com/docs/supported-formats) sorry I missed that.

I think a workaround is using the .ipod format. Our ffmpeg can write to that format, iTunes can read it, and it supports the ALAC codec. So "f": "ipod".

Hope this helps!

Kind regards,
Kevin

We iPod format produce m4a file? We need to have .m4a for our purposes

Mike

Hi Mike,

Unfortunately we do not support encoding to m4a. Only decoding (demuxing).
However the ipod format was used by the alac preset, which was in turn used in your assemblies. My guess is that you used the a final (export) step to make the files have an m4a extension? While in fact the file’s format was ipod already. It’s possible Apple/iTunes will gracefully this inconsistency though, which probably is what made this work (be it not lossless) in the first place.

Let me know what you think,

Kevin

Some folks are having issues playing m4a files in VLC player.

In VLC they try to open as videos and on the information tab the alac files all have the “Stream 0 Video” and “Stream 1 Audio” instead of only “Stream 0 Audio”.

Could this be related to the issue? Screenshot attached.

Hey Mike,

not sure if this is related, I doubt it. Does this happen all the time? What are some assembly IDs of result files where this occurred?

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos

We are trying to use the preset options for iPod as Kevin suggested earlier. Seems like that works.

If all testing works and everyone is happy with mp4 file output instead of m4a, we should be OK. I’ll let you know as soon as I hear.

Alright, sounds good!