Skip to content

Instantly share code, notes, and snippets.

@reinink
Created June 14, 2021 16:00
Show Gist options
  • Save reinink/adff32983c9fa7887c2b54536977a25b to your computer and use it in GitHub Desktop.
Save reinink/adff32983c9fa7887c2b54536977a25b to your computer and use it in GitHub Desktop.
getID3
<?php
use getID3;
$id3 = (new getID3())->analyze(Request::file('file')->getPathname());
$duration = isset($id3['playtime_string']) ? str_pad($id3['playtime_string'], 8, '00:00:00', STR_PAD_LEFT) : null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment