Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 7, 2019 16:25
Show Gist options
  • Save parzibyte/7f140033c097457111c9e7715d3425a2 to your computer and use it in GitHub Desktop.
Save parzibyte/7f140033c097457111c9e7715d3425a2 to your computer and use it in GitHub Desktop.
<?php
include_once __DIR__ . "/src/Mp3Info.php";
use wapmorgan\Mp3Info\Mp3Info;
$rutaDeLaCancion = __DIR__ . "/01 Locos.mp3";
$informacion = new Mp3Info($rutaDeLaCancion, true);
$peso = $informacion->_fileSize;
$duracionEnSegundos = $informacion->duration;
$bitRate = $informacion->bitRate;
$canal = $informacion->channel;
printf("El peso es %f, la duración en segundos es %f, el bitrate es de %d bps y el canal es %s",
$peso, $duracionEnSegundos, $bitRate, $canal);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment