$info['audio'
]['lossless'
] = false;
// Calculate playtime
if (!
isset($info['playtime_seconds'
]) &&
isset($info['audio'
]['bitrate'
]) && ($info['audio'
]['bitrate'
] > 0
)) { // https://github.com/JamesHeinrich/getID3/issues/161
// VBR header frame contains ~0.026s of silent audio data, but is not actually part of the original encoding and should be ignored
$xingVBRheaderFrameLength =
((isset($info['mpeg'
]['audio'
]['VBR_frames'
]) &&
isset($info['mpeg'
]['audio'
]['framelength'
])) ?
$info['mpeg'
]['audio'
]['framelength'
] : 0
);
$info['playtime_seconds'
] =
($info['avdataend'
] -
$info['avdataoffset'
] -
$xingVBRheaderFrameLength) * 8 /
$info['audio'
]['bitrate'
];
} $info['audio'
]['encoder_options'
] =
$this->
GuessEncoderOptions();
return true;
} /**
* @return string
*/
public function GuessEncoderOptions() { // shortcuts
$info = &
$this->getid3->info;
$thisfile_mpeg_audio = array
();