Reputation: 1762
I am trying to parse ffmpeg output in php to extract all meta data of a mp3 URL.
Is there any pre-written API or something in php or python?
We can use this command to generate a new mp3 file with specified tags:
ffmpeg -i inputfile -metadata title="Movie Title" -metadata year="2010" outputfile
But how can we extract them in an array or object?
Something like
$ffmpeg->setUrl(---- MP3 URL ---- );
$ffmpeg->getArtist();
$ffmpeg->getAlbum();
$ffmpeg->getYear();
Thanks,
Upvotes: 0
Views: 2617
Reputation: 4916
I think this is what you are looking for.
From the API documentation:
$movie->getTitle()
$movie->getArtist()
$movie->getTrackNumber()
$movie->getYear()
$movie->getFrameHeight()
$movie->getFrameWidth()
$movie->getPixelFormat()
$movie->getBitRate()
and so on
Upvotes: 1