Get Video/Audio Duration & Dimensions INSTANTLY! Free PHP Media Info API
In this tutorial, I’m giving you another powerful free tool for your automation toolkit — a self-hosted PHP API endpoint that extracts detailed information from any video or audio file in seconds.
No more guessing file properties! With this simple script, you can programmatically retrieve:
  • ✅ Exact duration (in seconds)
  • ✅ Video dimensions (width & height)
  • ✅ File size
  • ✅ Format details (MP4, MP3, MOV, etc.)
  • ✅ Video codec (e.g., h264) & frame rate (FPS)
  • ✅ Audio codec, sample rate, and channel info
  • …and much more!
Perfect for:
  • Pre-flight checks in your automation workflows
  • Deciding processing steps based on media attributes
  • Quickly analyzing media files before handling them
🛠️ Setup Instructions:
  1. Download
  2. Upload
  3. Visit the URL
  4. Check Requirements
🚀 Live Demo Walkthrough
I’ll guide you through:
  • Setting up the script step-by-step
  • Using it with n8n via the “Import cURL” feature (works with Make.com and other tools too)
  • Extracting detailed info from both audio and video files — instantly
This API is essential if your workflows involve media processing, such as using our Video Merger API. Knowing the exact duration, dimensions, or format upfront can save time and prevent errors.
3
2 comments
Razvan Sava
6
Get Video/Audio Duration & Dimensions INSTANTLY! Free PHP Media Info API
Automation-Tribe-Free
skool.com/automation-tribe-free
Learn to build smart automations with n8n, Make.com, and AI. Free tutorials, workflows, and a community that helps you automate everything.
Leaderboard (30-day)
Powered by