Skip to content
Browse all functions

Convert MP3 into MP4 with Images

audiovideo/audio2video

audio2video (Convert MP3 into MP4 with Images) is a 1001fx API function in the group Audio & video: POST https://api.1001fx.com/audiovideo/audio2video, 4 credits per minute (minimum 4). It works as a ready-made module in Make and n8n or as a plain HTTP call.

Converts an MP3 into an MP4 video with a thumbnail and images for given durations. The result is a URL to the MP4, available for 48 hours.

Use cases

  • Turn a podcast episode into a video with cover images for YouTube
  • Create a video from a voice-over and a series of product photos
  • Publish audio recordings on video platforms that do not accept MP3 files

Try it in the 1001fx app

Run audio2video in your browser with your API key – fill the form, click Run and get the answer or the file.

audio2video in the 1001fx app: the form with example values
Convert MP3 into MP4 with Images in the 1001fx app

Endpoint

POSThttps://api.1001fx.com/audiovideo/audio2video
Header
X-API-KEY: YOURSECRETAPIKEY How to
Content type
application/json

Parameters

  • urlstringrequired

    The URL of the audio file. You can use 1001fx uploadasset for temporary asset upload.

    Example:
    https://api.1001fx.com/testdata/jingle.mp3
  • imagesarray<object>required

    Array of images to show in your video. Notice: The length of your video will be the sum of your video durations. It is recommended that all your images should have the same aspect ratio.

    • imageUrlstringrequired

      The URL of an image to show in your video. You can use 1001fx uploadasset for temporary asset upload.

    • durationnumberrequired

      The number of seconds this image should be shown.

  • thumbnailImageUrlstringoptional

    The URL of the thumbnail image. You can use 1001fx uploadasset for temporary asset upload.

    Example:
    https://api.1001fx.com/testdata/image.jpg

Examples

Convert MP3 into MP4 with Images

Returns a url to the generated video

Input

Expects a json body
{
  "url": "https://api.1001fx.com/testdata/jingle.mp3",
  "images": [
    {
      "imageUrl": "https://1001fx.com/_next/image?url=https%3A%2F%2Fprod-1001fx-public.b-cdn.net%2Fmisc%2F1678977739_Changelog3.png&w=828&q=75",
      "duration": 2
    },
    {
      "imageUrl": "https://1001fx.com/_next/image?url=https%3A%2F%2Fprod-1001fx-public.b-cdn.net%2Fmisc%2F1680622414_1001fxMakeJS.png&w=828&q=75",
      "duration": 2
    },
    {
      "imageUrl": "https://1001fx.com/_next/image?url=https%3A%2F%2Fprod-1001fx-public.b-cdn.net%2Fmisc%2F1680511208_Charts-Blogpost.png&w=828&q=75",
      "duration": 2
    },
    {
      "imageUrl": "https://1001fx.com/_next/image?url=https%3A%2F%2Fprod-1001fx-public.b-cdn.net%2Fmisc%2F1679924358_AirtableImages.png&w=828&q=75",
      "duration": 2
    },
    {
      "imageUrl": "https://1001fx.com/_next/image?url=https%3A%2F%2Fprod-1001fx-public.b-cdn.net%2Fmisc%2F1679501411_speakerimage17.png&w=828&q=75",
      "duration": 2
    },
    {
      "imageUrl": "https://1001fx.com/_next/image?url=https%3A%2F%2Fprod-1001fx-public.b-cdn.net%2Fmisc%2F1679475802_1001fxMake_Live.png&w=828&q=75",
      "duration": 2
    },
    {
      "imageUrl": "https://1001fx.com/_next/image?url=https%3A%2F%2Fprod-1001fx-public.b-cdn.net%2Fmisc%2F1679329895_Podcast_Ad_Checker1.png&w=828&q=75",
      "duration": 2
    }
  ],
  "thumbnailImageUrl": "https://api.1001fx.com/testdata/image.jpg",
  "videoResolution": {
    "width": 1280,
    "height": 720
  }
}

Output · HTTP 200

Result is a url to a file containing the audio.
{
  "statusCode": 200
}
Show curl command
curl -X POST 'https://api.1001fx.com/audiovideo/audio2video' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://api.1001fx.com/testdata/jingle.mp3","images":[{"imageUrl":"https://1001fx.com/_next/image?url=https%3A%2F%2Fprod-1001fx-public.b-cdn.net%2Fmisc%2F1678977739_Changelog3.png&w=828&q=75","duration":2},{"imageUrl":"https://1001fx.com/_next/image?url=https%3A%2F%2Fprod-1001fx-public.b-cdn.net%2Fmisc%2F1680622414_1001fxMakeJS.png&w=828&q=75","duration":2},{"imageUrl":"https://1001fx.com/_next/image?url=https%3A%2F%2Fprod-1001fx-public.b-cdn.net%2Fmisc%2F1680511208_Charts-Blogpost.png&w=828&q=75","duration":2},{"imageUrl":"https://1001fx.com/_next/image?url=https%3A%2F%2Fprod-1001fx-public.b-cdn.net%2Fmisc%2F1679924358_AirtableImages.png&w=828&q=75","duration":2},{"imageUrl":"https://1001fx.com/_next/image?url=https%3A%2F%2Fprod-1001fx-public.b-cdn.net%2Fmisc%2F1679501411_speakerimage17.png&w=828&q=75","duration":2},{"imageUrl":"https://1001fx.com/_next/image?url=https%3A%2F%2Fprod-1001fx-public.b-cdn.net%2Fmisc%2F1679475802_1001fxMake_Live.png&w=828&q=75","duration":2},{"imageUrl":"https://1001fx.com/_next/image?url=https%3A%2F%2Fprod-1001fx-public.b-cdn.net%2Fmisc%2F1679329895_Podcast_Ad_Checker1.png&w=828&q=75","duration":2}],"thumbnailImageUrl":"https://api.1001fx.com/testdata/image.jpg","videoResolution":{"width":1280,"height":720}}'

Frequently asked questions

How long is the resulting video?
The video is as long as the sum of the durations of your images. Each image is shown for the number of seconds you set.
How do I pass the audio and image files?
As public URLs. If your files are not online yet, upload them with the 1001fx function uploadasset and use the returned URLs.
How long is the MP4 available?
The result is a URL to the MP4 file that stays available for 48 hours. Download or move the file within that time.

Try audio2video now

Run it in your browser or create a free account and get 100 credits every month.

Changelog

  • 1.0.018.04.2023created
Ask 1001fx