Audio & Video File Info Viewer (Duration, Codec)
Read duration, bitrate, codecs, resolution, fps, sample rate, channels, tags and cover art of MP3, M4A, FLAC, OGG, WAV, MP4, MOV, WebM and MKV files.
Result
Press “Run” to see the result.
Upload the file as multipart file (or raw body / file_base64), or give a public url: only the first max_mb MB (default 8, max 25) are downloaded, which is enough for most files. Formats: MP3 (ID3v1 / v2), AAC (ADTS), M4A / MP4 / MOV (ISO BMFF), FLAC, Ogg Vorbis / Opus, WAV, AIFF, WebM / MKV (Matroska), WMA / ASF and more, parsed with the music-metadata library.
The response has the container, main codec, duration (seconds and duration_hms), bitrate, sample_rate, channels, bits_per_sample, lossless, and for video the width, height, fps and video_codec (H.264, H.265 / HEVC, VP9, AV1…). tracks lists every audio / video / subtitle track; tags holds title, artist, album, year, genre, track number, comment and encoder.
cover describes embedded cover art; with cover=true it includes a JPEG thumbnail (max 300 px) as a data URL. When a URL is read only partly, duration and bitrate may be estimates and MP4 files with their index at the end may lack details (the response says so).
Use this in your code
curl -X POST "https://apibox.io.vn/v1/media-metadata" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@./my-file"const form = new FormData();
form.append('file', fileInput.files[0]);
const res = await fetch('https://apibox.io.vn/v1/media-metadata', {
method: 'POST',
headers: { Authorization: 'Bearer YOUR_API_KEY' },
body: form,
});
console.log(await res.json());import requests
res = requests.post(
"https://apibox.io.vn/v1/media-metadata",
headers={"Authorization": "Bearer YOUR_API_KEY"},
files={"file": open("my-file", "rb")},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/media-metadata');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
CURLOPT_POSTFIELDS => ['file' => new CURLFile('my-file')],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
FAQ
Is the whole file downloaded for a URL?
No. Only the first max_mb megabytes (default 8) are read. That covers the headers of almost all audio files and MP4 files with the index at the start (fast start).
Does it read video resolution and frame rate?
Yes for MP4, MOV, M4V, WebM and MKV: width, height, fps and the video codec of each video track.
Are the files stored?
No. Files are processed in memory for the request and discarded.