How to Convert your Audio File to a Video with a Shareable URL
Imagine you just finished creating an audio ad, podcast or other audio asset. To share this on social media, it's useful to be able to quickly generate a video to accompany your audio, and get a shareable link.
With AudioStack, this is now really simple.
You'll need to have AudioStack installed and your development environment set up first
If you haven't done this yet, check out our guide to getting started.
Step One
Upload your audio to AudioStack. There are a couple of ways you can do this. First, using the Python SDK:
import audiostack
audiostack.api_key = "APIKEY"
audiostack.assume_org_id = "ORGID"
f = audiostack.Content.File.create(localPath="jukebox.wav", uploadPath="audiofiles/jukebox.wav", fileType="audio")
print(f)
Remember to add your API Key, and if needed, the Org ID of the organisation you want the files to belong to (this only applies if you're a member of multiple organisations).
Alternatively, for a no-code approach, you can follow these instructions to upload the files using AudioStack platform.
Step Two
Run this short script to create videos for your files. You'll need to have the File IDs of the files you want to convert to hand.
You can always check the File IDs and location of any AudioStack file in the AudioStack Platform
import audiostack
audiostack.api_key = "APIKEY"
audiostack.assume_org_id = "ORGID"
file_ids = ["FileID1", "FileID2"]
for i in range(6):
video_item = audiostack.Delivery.Video.create_from_file_and_image(fileId=file_ids[i])
print(video_item.url)
In your terminal, you should now see a list of all the URLs created.
Simply copy and paste these into your browser to view your videos, or share them. They will be available publicly, so anyone you share them with can see them.
Updated 6 months ago
Find out how to create a video directly from a production ID, instead of an uploaded file: