- Advanced Topics
- Temporary Files
Temporary Files
Upload local media files that aren't publicly accessible.
If your input files are not publicly accessible via URL, stage them first using temporary presigned URLs.
When to Use This
Use temporary files when your media is on your machine, behind auth, or not reachable by the worker.
Skip this flow when your input is already available at a public HTTPS URL.
Request presigned URLs
Call POST /api/tmp-file to get a one-time upload/download pair.
POST /api/tmp-file HTTP/1.1
Authorization: Bearer REPLACE_BEARER_TOKEN
Host: verygoodffmpeg.com
Response:
{
"data": {
"upload_url": "https://storage.example.com/tmp/input?signature=upload",
"download_url": "https://storage.example.com/tmp/input?signature=download"
}
}The upload URL and download URL both expire after 1 hour.
Upload the file
Perform a PUT request to the upload_url with your file's binary content.
curl -X PUT "$UPLOAD_URL" \
-T "/path/to/local/video.mp4"Use it in a job
Pass the download_url into your job request.
POST /api/ffmpeg HTTP/1.1
Authorization: Bearer REPLACE_BEARER_TOKEN
Content-Type: application/json
Host: verygoodffmpeg.com
{
"input_files": {
"input": "https://storage.verygoodffmpeg.com/sample.mp4"
},
"output_files": [
"output.mp4"
],
"ffmpeg_commands": [
"-i {{input}} -t 5 {{output.mp4}}"
],
"webhook_url": "https://example.com/webhooks/ffmpeg",
"machine": "cpu"
}Notes
- The upload URL accepts
PUT. - The download URL is what you pass to
input_files. - Files are private and only accessible through signed URLs.