Back to Support
Downloads

Download Returns 404

Why your download returns 404 and how to fix it

Download Returns 404


If you're getting a 404 error when trying to download your processed video, there are several possible causes.


1. Using the Wrong API Endpoint


FFmpeg Micro has gone through several API versions. Make sure you're using the current endpoint:


✅ Current API (v1)


# Get download URL
curl -X GET "https://api.ffmpeg-micro.com/v1/transcodes/JOB_ID/download" \
  -H "Authorization: Bearer YOUR_API_KEY"

❌ Deprecated Endpoints


These older endpoints may still work but could be removed in the future:


# Old v1/jobs endpoint (deprecated)
GET /v1/jobs/:id/download

# Old api/jobs endpoint (deprecated)
GET /api/jobs/:id/download

Solution: Update your code to use /v1/transcodes/:id/download


2. Job Output Has Expired


Processed video files are automatically deleted after 7 days to save storage costs.


How to Check Expiration


curl -X GET "https://api.ffmpeg-micro.com/v1/transcodes/JOB_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response:

{
  "id": "JOB_ID",
  "status": "completed",
  "completedAt": "2025-01-01T00:00:00Z",
  "outputUrl": "gs://...",
  "expiresAt": "2025-01-08T00:00:00Z"  // 7 days after completion
}

If expiresAt is in the past, the file has been deleted.


Solution for Expired Files


You have two options:


  • Re-run the transcode using the same input file (if you still have it)
  • Download immediately after completion and store the file yourself

  • Preventing Expiration


    If you need to keep processed videos longer than 7 days:


  • Download them immediately after completion
  • Store them in your own storage (S3, Google Cloud Storage, etc.)
  • Or contact support about extended retention options

  • 3. Job Is Not Complete


    You can't download a video until the transcode job is complete.


    Check Job Status


    curl -X GET "https://api.ffmpeg-micro.com/v1/transcodes/JOB_ID" \
      -H "Authorization: Bearer YOUR_API_KEY"
    

    Status values:

  • queued — waiting to start
  • processing — currently transcoding
  • completed — ready to download ✅
  • failed — job failed, check error message

  • Solution


    Wait until status is completed before attempting to download. You can:


  • Poll the status endpoint every 5-10 seconds
  • Use webhooks (contact support to set up)
  • Check the dashboard at /dashboard/jobs

  • 4. Invalid Job ID


    Double-check that you're using the correct job ID. Common mistakes:


  • Using the input filename instead of the job ID
  • Using the upload ID instead of the transcode job ID
  • Typo in the job ID

  • Solution


    The job ID is returned when you create the transcode:


    curl -X POST "https://api.ffmpeg-micro.com/v1/transcodes" \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "inputs": [{"url": "gs://your-bucket/video.mp4"}],
        "outputFormat": "mp4",
        "preset": {"quality": "medium"}
      }'
    

    Response:

    {
      "id": "abc123-def456-ghi789",  // ← This is your job ID
      "status": "queued",
      ...
    }
    

    Save this ID to download the video later.


    5. Network or Permissions Issue


    If the signed download URL itself returns 404:


  • The URL may have expired (signed URLs are valid for 1 hour)
  • There may be a network issue accessing Google Cloud Storage
  • The file may have been deleted from storage

  • Solution


    Request a fresh download URL:


    curl -X GET "https://api.ffmpeg-micro.com/v1/transcodes/JOB_ID/download" \
      -H "Authorization: Bearer YOUR_API_KEY"
    

    This generates a new signed URL valid for 1 hour.


    Quick Debugging Checklist


  • [ ] Using correct endpoint: /v1/transcodes/:id/download
  • [ ] Job status is completed
  • [ ] Job completed less than 7 days ago
  • [ ] Using the correct job ID (not filename or upload ID)
  • [ ] Download URL requested within last hour

  • Still Having Issues?


    Contact support at javid@ffmpeg-micro.com with:

  • The job ID
  • The exact error message
  • The API endpoint you're using