Archive for the ‘mp4’ Tag

Ampache and AAC nero/apple tags track numbers

I’ve installed ampache 3.5.1 on a machine, and I discovered that it cannot get track numbers from MP4/AAC files tagged by Nero AAC encoder o Apple encoder.

This issue can be solved by writing a script that uses faad to get the track number, and modifying some ampache code.

The scripts is:

$ cat /usr/local/bin/

if [ -z "$1" ]; then
 echo usage: $0 file

faad -i "$1" 2>&1 |grep track: |cut -d\   -f2

You need also to edit the file /usr/share/ampache/www/lib/class/vainfo.class.php (this is the ampache debian package path, please change it to match your installation). Locate the function getinfo and add before the line at the end of the function:


the code:

if($this->tags['quicktime']['track']==0) {
 $this->tags['quicktime']['track']=exec('/usr/local/bin/ '.escapeshellarg($this->filename).'',$retval);

Enabling the debug log to level 5 on ampache you can see that it gets the track numbers from the mp4/aac files.