Losing original_* and additional files when using /video/merge with static audio

tl;dr: Service to automatically add an empty audio track to still video - upload two files, one disappears and the original_* data sets to the “emptysound” file’s data

I’m currently working on some video importing routines, and trying to add a blank audio track to prevent some issues we’ve had in the past. Sadly, the /video/merge step has left this non-viable for uploading more than one file. Two specific issues are happening:

  • We lose all original_* data for any files going through that step, as they get set to match the blank audio track
  • If uploading more than one file, all but one are discarded in the results

Easiest way to demonstrate this is using the Transloadit example for adding a blank audio track:

If you upload two files at once - note that you get only one file, and it’s called empty-sound.mp4

I dropped a chat message over to support, and they’ve said that it’s “expected behavior”… Frustrations aside, does anyone have any idea on how to work around this? I’d rather not have to limit our users to uploading all files one at a time because of a limitation like this.

Including our own template below in case it helps:

{
  "steps": {
    ":original": {
      "robot": "/upload/handle"
    },
    "emptysound": {
      "robot": "/http/import",
      "url": "http://demos.transloadit.com/inputs/empty-sound.mp3",
      "result": true
    },
    "video_encoded_fakesound": {
      "robot": "/video/merge",
      "use": {
        "steps": [
          {
            "name": ":original",
            "as": "video"
          },
          {
            "name": "emptysound",
            "as": "audio"
          }
        ]
      },
      "ffmpeg_stack": "v5.0.0",
      "preset": "webm",
      "turbo": true
    }
  }
}