Lines Matching +full:m +full:- +full:tech
17 // number of frames to scan to determine if MPEG-audio sequence is valid
18 // Lower this number to 5-20 for faster scanning
20 // mpeg-audio streams
27 …an the file byte-by-byte and log all the valid audio frame headers - extremely slow, unrecommended…
31 if (!$this->getOnlyMPEGaudioInfo($fd, $ThisFileInfo, $ThisFileInfo['avdataoffset'])) {
32 if ($this->allow_bruteforce) {
34 $this->getOnlyMPEGaudioInfoBruteForce($fd, $ThisFileInfo);
47 …sFileInfo['id3v2']['headerlength'].', then '.($ThisFileInfo['avdataoffset'] - $ThisFileInfo['id3v2…
54 …if (!empty($ThisFileInfo['id3v2']['headerlength']) && (($ThisFileInfo['avdataoffset'] - $ThisFileI…
56 …$synchoffsetwarning .= '. This is a known problem with some versions of LAME (3.90-3.92) DLL in CB…
62 …$synchoffsetwarning .= '. This is a known problem with some versions of LAME (3.90 - 3.92) DLL in …
83 …EversionString, 0, 6) == 'LAME3.') && !preg_match('[0-9\)]', substr($CurrentDataLAMEversionString,…
86 // or a version of LAME with the LAMEtag-not-filled-in-DLL-mode bug (3.90-3.92)
91 … // Not sure what version of LAME this is - look in padding of last frame for longer version string
92 …$PossibleLAMEversionStringOffset = $ThisFileInfo['avdataend'] - $PossiblyLongerLAMEversion_FrameLe…
95 switch (substr($CurrentDataLAMEversionString, -1)) {
100 $CurrentDataLAMEversionString = substr($CurrentDataLAMEversionString, 0, -1);
149 …$ThisFileInfo['playtime_seconds'] = ($ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset']) *…
152 $ThisFileInfo['audio']['encoder_options'] = $this->GuessEncoderOptions($ThisFileInfo);
184 …$KnownEncoderValues[0xFF][58][1][1][3][2][20500] = '--alt-preset insane'; // 3.90, 3.90.1…
185 …$KnownEncoderValues[0xFF][58][1][1][3][2][20600] = '--alt-preset insane'; // 3.90.2, 3.90.3…
186 $KnownEncoderValues[0xFF][57][1][1][3][4][20500] = '--alt-preset insane'; // 3.94, 3.95
187 …$KnownEncoderValues['**'][78][3][2][3][2][19500] = '--alt-preset extreme'; // 3.90, 3.90.1…
188 $KnownEncoderValues['**'][78][3][2][3][2][19600] = '--alt-preset extreme'; // 3.90.2, 3.91
189 $KnownEncoderValues['**'][78][3][1][3][2][19600] = '--alt-preset extreme'; // 3.90.3
190 …$KnownEncoderValues['**'][78][4][2][3][2][19500] = '--alt-preset fast extreme'; // 3.90, 3.90.1…
191 …$KnownEncoderValues['**'][78][4][2][3][2][19600] = '--alt-preset fast extreme'; // 3.90.2, 3.90.3…
192 …$KnownEncoderValues['**'][78][3][2][3][4][19000] = '--alt-preset standard'; // 3.90, 3.90.1…
193 $KnownEncoderValues['**'][78][3][1][3][4][19000] = '--alt-preset standard'; // 3.90.3
194 …$KnownEncoderValues['**'][78][4][2][3][4][19000] = '--alt-preset fast standard'; // 3.90, 3.90.1…
195 $KnownEncoderValues['**'][78][4][1][3][4][19000] = '--alt-preset fast standard'; // 3.90.3
196 …$KnownEncoderValues['**'][88][4][1][3][3][19500] = '--r3mix'; // 3.90, 3.90.1…
197 …$KnownEncoderValues['**'][88][4][1][3][3][19600] = '--r3mix'; // 3.90.2, 3.90.3…
198 $KnownEncoderValues['**'][67][4][1][3][4][18000] = '--r3mix'; // 3.94, 3.95
199 $KnownEncoderValues['**'][68][3][2][3][4][18000] = '--alt-preset medium'; // 3.90.3
200 $KnownEncoderValues['**'][68][4][2][3][4][18000] = '--alt-preset fast medium'; // 3.90.3
202 …$KnownEncoderValues[0xFF][99][1][1][1][2][0] = '--preset studio'; // 3.90, 3.90.1…
203 … $KnownEncoderValues[0xFF][58][2][1][3][2][20600] = '--preset studio'; // 3.90.3, 3.93.1
204 $KnownEncoderValues[0xFF][58][2][1][3][2][20500] = '--preset studio'; // 3.93
205 $KnownEncoderValues[0xFF][57][2][1][3][4][20500] = '--preset studio'; // 3.94, 3.95
206 …$KnownEncoderValues[0xC0][88][1][1][1][2][0] = '--preset cd'; // 3.90, 3.90.1…
207 … $KnownEncoderValues[0xC0][58][2][2][3][2][19600] = '--preset cd'; // 3.90.3, 3.93.1
208 $KnownEncoderValues[0xC0][58][2][2][3][2][19500] = '--preset cd'; // 3.93
209 $KnownEncoderValues[0xC0][57][2][1][3][4][19500] = '--preset cd'; // 3.94, 3.95
210 …$KnownEncoderValues[0xA0][78][1][1][3][2][18000] = '--preset hifi'; // 3.90, 3.90.1…
211 …$KnownEncoderValues[0xA0][58][2][2][3][2][18000] = '--preset hifi'; // 3.90.3, 3.93, …
212 $KnownEncoderValues[0xA0][57][2][1][3][4][18000] = '--preset hifi'; // 3.94, 3.95
213 …$KnownEncoderValues[0x80][67][1][1][3][2][18000] = '--preset tape'; // 3.90, 3.90.1…
214 …$KnownEncoderValues[0x80][67][1][1][3][2][15000] = '--preset radio'; // 3.90, 3.90.1…
215 …$KnownEncoderValues[0x70][67][1][1][3][2][15000] = '--preset fm'; // 3.90, 3.90.1…
216 …$KnownEncoderValues[0x70][58][2][2][3][2][16000] = '--preset tape/radio/fm'; // 3.90.3, 3.93, …
217 $KnownEncoderValues[0x70][57][2][1][3][4][16000] = '--preset tape/radio/fm'; // 3.94, 3.95
218 …$KnownEncoderValues[0x38][58][2][2][0][2][10000] = '--preset voice'; // 3.90.3, 3.93, …
219 $KnownEncoderValues[0x38][57][2][1][0][4][15000] = '--preset voice'; // 3.94, 3.95
220 $KnownEncoderValues[0x38][57][2][1][0][4][16000] = '--preset voice'; // 3.94a14
221 …$KnownEncoderValues[0x28][65][1][1][0][2][7500] = '--preset mw-us'; // 3.90, 3.90.1…
222 $KnownEncoderValues[0x28][65][1][1][0][2][7600] = '--preset mw-us'; // 3.90.2, 3.91
223 …$KnownEncoderValues[0x28][58][2][2][0][2][7000] = '--preset mw-us'; // 3.90.3, 3.93, …
224 $KnownEncoderValues[0x28][57][2][1][0][4][10500] = '--preset mw-us'; // 3.94, 3.95
225 $KnownEncoderValues[0x28][57][2][1][0][4][11200] = '--preset mw-us'; // 3.94a14
226 $KnownEncoderValues[0x28][57][2][1][0][4][8800] = '--preset mw-us'; // 3.94a15
227 … $KnownEncoderValues[0x18][58][2][2][0][2][4000] = '--preset phon+/lw/mw-eu/sw'; // 3.90.3, 3.93.1
228 $KnownEncoderValues[0x18][58][2][2][0][2][3900] = '--preset phon+/lw/mw-eu/sw'; // 3.93
229 $KnownEncoderValues[0x18][57][2][1][0][4][5900] = '--preset phon+/lw/mw-eu/sw'; // 3.94, 3.95
230 $KnownEncoderValues[0x18][57][2][1][0][4][6200] = '--preset phon+/lw/mw-eu/sw'; // 3.94a14
231 $KnownEncoderValues[0x18][57][2][1][0][4][3200] = '--preset phon+/lw/mw-eu/sw'; // 3.94a15
232 … $KnownEncoderValues[0x10][58][2][2][0][2][3800] = '--preset phone'; // 3.90.3, 3.93.1
233 $KnownEncoderValues[0x10][58][2][2][0][2][3700] = '--preset phone'; // 3.93
234 $KnownEncoderValues[0x10][57][2][1][0][4][5600] = '--preset phone'; // 3.94, 3.95
247 // http://gabriel.mp3-tech.org/mp3infotag.html
248 // int Quality = (100 - 10 * gfp->VBR_q - gfp->quality)h
251 $LAME_V_value = 10 - ceil($thisfile_mpeg_audio_lame['vbr_quality'] / 10);
252 $LAME_q_value = 100 - $thisfile_mpeg_audio_lame['vbr_quality'] - ($LAME_V_value * 10);
253 $encoder_options = '-V'.$LAME_V_value.' -q'.$LAME_q_value;
279 $encoder_options .= ' -b'.$thisfile_mpeg_audio_lame['bitrate_min'];
283 $encoder_options .= ' --nogap';
288 if ($ExplodedOptions[0] == '--r3mix') {
292 case '--preset':
293 case '--alt-preset':
294 case '--r3mix':
326 $encoder_options .= ' --lowpass '.$thisfile_mpeg_audio_lame['lowpass_frequency'];
339 $encoder_options .= ' --resample 44100';
341 $encoder_options .= ' --resample 48000';
345 // may or may not be same as source frequency - ignore
352 case '--preset':
353 case '--alt-preset':
361 $encoder_options .= ' --resample '.$thisfile_mpeg_audio['sample_rate'];
366 'phon+/lw/mw-eu/sw|16000' => 16000,
367 'mw-us|24000' => 24000, // 3.95
368 'mw-us|32000' => 32000, // 3.93
369 'mw-us|16000' => 16000, // 3.92
377 $encoder_options .= ' --resample '.$thisfile_mpeg_audio['sample_rate'];
383 case '--r3mix':
385 $encoder_options .= ' --resample '.$thisfile_mpeg_audio['sample_rate'];
425 …//$headerstring = fread($fd, 1441); // worst-case max length = 32kHz @ 320kbps layer 3 = 1441 byte…
430 // where $aa..$aa is the four-byte mpeg-audio header (below)
431 // $bb $bb is the optional 2-byte CRC
448 …rValid($MPEGheaderRawArray, false, true); // allow badly-formatted freeformat (from LAME 3.90 - 3…
492 …= 'Invalid bitrate index (15), this is a known bug in free-format MP3s encoded by LAME v3.90 - 3.9…
499 // only skip multiple frame check if free-format bitstream found at beginning of file
556 // Variable-bitrate headers
560 // specs taken from http://minnie.tuhs.org/pipermail/mp3encoder/2001-January/001800.html
598 $SideInfoData = substr($headerstring, 4 + 2, $VBRidOffset - 4);
602 …// 'Info' is LAME-encoded CBR (This was done to avoid CBR files to be recognized as traditional Xi…
643 //$thisfile_mpeg_audio['VBR_frames']--; // don't count header Xing/Info frame
655 // BitRate = (((FrameLengthInBytes / 4) - Padding) * SampleRate) / 12
656 …//$ThisFileInfo['audio']['bitrate'] = ((($framelengthfloat / 4) - intval($thisfile_mpeg_audio['pad…
659 // Bitrate = ((FrameLengthInBytes - Padding) * SampleRate) / 144
660 …//$ThisFileInfo['audio']['bitrate'] = (($framelengthfloat - intval($thisfile_mpeg_audio['padding']…
677 // http://gabriel.mp3-tech.org/mp3infotag.html
696 // Offsets of various bytes in http://gabriel.mp3-tech.org/mp3infotag.html
698 // MPEG-1 non-mono, but not for other combinations
699 $LAMEtagOffsetContant = $VBRidOffset - 0x24;
715 // bytes $9C-$A4 Encoder short VersionString
724 …e['vbr_method'], 0, 3); // usually either 'cbr' or 'vbr', but truncates 'vbr-old / vbr-rh' to 'vbr'
729 // bytes $A7-$AE Replay Gain
731 // bytes $A7-$AA : 32 bit floating point "Peak signal amplitude"
733 // LAME 3.94a16 and later - 9.23 fixed point
737 // LAME 3.94a15 and earlier - 32-bit floating point
806 …_mpeg_audio_lame['raw']['abrbitrate_minbitrate'] > 0) { // Variable BitRate (VBR) - minimum bitrate
810 // bytes $B1-$B3 Encoder delays
831 // bytes $B6-$B7 Preset and surround info
839 …'Unknown LAME preset used ('.$thisfile_mpeg_audio_lame['preset_used_id'].') - please report to inf…
846 // bytes $B8-$BB MusicLength
850 // bytes $BC-$BD MusicCRC
853 // bytes $BE-$BF CRC-16 of Info Tag
891 …ioBytes > 0) && ($ExpectedNumberOfAudioBytes != ($ThisFileInfo['avdataend'] - $ThisFileInfo['avdat…
892 if ($ExpectedNumberOfAudioBytes > ($ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset'])) {
893 …if (($ExpectedNumberOfAudioBytes - ($ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset'])) =…
896 …sFileInfo['avdataend'] - $ThisFileInfo['avdataoffset']).' (short by '.($ExpectedNumberOfAudioBytes…
899 …if ((($ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset']) - $ExpectedNumberOfAudioBytes) =…
905 $ThisFileInfo['avdataend']--;
908 …ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset']).' ('.(($ThisFileInfo['avdataend'] - $Th…
911 …ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset']).' ('.(($ThisFileInfo['avdataend'] - $Th…
922 // BitRate = (((FrameLengthInBytes / 4) - Padding) * SampleRate) / 12
923 …$ThisFileInfo['audio']['bitrate'] = ((($framebytelength / 4) - intval($thisfile_mpeg_audio['paddin…
925 // Bitrate = ((FrameLengthInBytes - Padding) * SampleRate) / 144
926 …$ThisFileInfo['audio']['bitrate'] = (($framebytelength - intval($thisfile_mpeg_audio['padding'])) …
929 …$ThisFileInfo['error'][] = 'Error calculating frame length of free-format MP3 without Xing/LAME he…
953 // End variable-bitrate headers
966 // // experimental side info parsing section - not returning anything useful yet
973 // // MPEG-1 (mono)
978 // // MPEG-1 (stereo, joint-stereo, dual-channel)
985 // // MPEG-2, MPEG-2.5 (mono)
990 // // MPEG-2, MPEG-2.5 (stereo, joint-stereo, dual-channel)
1141 …$ThisFileInfo['error'][] = 'Cannot find next free-format synch pattern ('.getid3_lib::PrintHexByte…
1144 …][] = 'ModeExtension varies between first frame and other frames (known free-format issue in LAME …
1156 while ($nextoffset < ($ThisFileInfo['avdataend'] - 6)) {
1157 fseek($fd, $nextoffset - 1, SEEK_SET);
1160 // good - found where expected
1163 // ok - found one byte earlier than expected (last frame wasn't padded, first frame was)
1164 $ActualFrameLengthValues[] = ($framelength - 1);
1165 $nextoffset--;
1167 // ok - found one byte later than expected (last frame was padded, first frame wasn't)
1171 …$ThisFileInfo['error'][] = 'Did not find expected free-format sync pattern at offset '.$nextoffset;
1219 fseek($fd, $i - 4, SEEK_CUR);
1248 fseek($fd, $MPEGaudioHeaderLengthCache[$head4] - 4, SEEK_CUR);
1258 fseek($fd, -4, SEEK_CUR);
1269 fseek($fd, $WhereWeWere - 3, SEEK_SET);
1284 $ThisFileInfo['error'][] = 'Corrupt file - more than one MPEG version detected';
1287 $ThisFileInfo['error'][] = 'Corrupt file - more than one MPEG layer detected';
1290 $ThisFileInfo['error'][] = 'Corrupt file - more than one MPEG sample rate detected';
1334 $sync_seek_buffer_size = min(128 * 1024, $ThisFileInfo['avdataend'] - $avdataoffset);
1383 …// if this is the first valid MPEG-audio frame, save it in case it's a VBR header frame and there's
1384 // garbage between this frame and a valid sequence of MPEG-audio frames, to be restored below
1403 …if (!(abs($ThisFileInfo['audio']['bitrate'] - $FirstFrameThisfileInfo['audio']['bitrate']) <= 1)) {
1405 // of valid MPEG-audio frames the VBR data is no longer discarded.
1418 …-valid VBR header not used because could not find '.GETID3_MP3_VALID_CHECK_FRAMES.' consecutive MP…
1422 …LID_CHECK_FRAMES.' consecutive MPEG-audio frames immediately after VBR header (garbage data for '.…
1593 1 => array('4-31', '8-31', '12-31', '16-31'),
1594 2 => array('4-31', '8-31', '12-31', '16-31'),
1647 // known issue in LAME 3.90 - 3.93.1 where free-format has bitrate ID of 15 instead of 0
1684 // A - Frame sync (all bits set)
1685 // B - MPEG Audio version ID
1686 // C - Layer description
1687 // D - Protection bit
1688 // E - Bitrate index
1689 // F - Sampling rate frequency index
1690 // G - Padding bit
1691 // H - Private bit
1692 // I - Channel Mode
1693 // J - Mode extension (Only if Joint stereo)
1694 // K - Copyright
1695 // L - Original
1696 // M - Emphasis
1742 } else { // MPEG-2 / MPEG-2.5
1769 …$NewFramelength = floor($NewFramelength / $SlotLength) * $SlotLength; // round to next-lower mult…
1782 static $BitrateTable = array(0=>'-');
1783 $roundbitrate = intval(round($bitrate, -3));
1786 $BitrateTable[$roundbitrate] = round($bitrate, -4);
1791 if ($roundbitrate >= $StandardBitrate - (($LastBitrate - $StandardBitrate) / 2)) {
1832 0x03 => 'vbr-old / vbr-rh',
1833 0x04 => 'vbr-new / vbr-mtrh',
1834 0x05 => 'vbr-mt',
1890 $LAMEpresetUsedLookup[$i] = '--alt-preset '.$LAMEtag['vbr_method'].' '.$i;
1894 $LAMEpresetUsedLookup[$i] = '--alt-preset '.$i;
1899 // named old-style presets (studio, phone, voice, etc) are handled in GuessEncoderOptions()
1901 // named alt-presets
1902 $LAMEpresetUsedLookup[1000] = '--r3mix';
1903 $LAMEpresetUsedLookup[1001] = '--alt-preset standard';
1904 $LAMEpresetUsedLookup[1002] = '--alt-preset extreme';
1905 $LAMEpresetUsedLookup[1003] = '--alt-preset insane';
1906 $LAMEpresetUsedLookup[1004] = '--alt-preset fast standard';
1907 $LAMEpresetUsedLookup[1005] = '--alt-preset fast extreme';
1908 $LAMEpresetUsedLookup[1006] = '--alt-preset medium';
1909 $LAMEpresetUsedLookup[1007] = '--alt-preset fast medium';
1912 …$LAMEpresetUsedLookup[1010] = '--preset portable'; …
1913 …$LAMEpresetUsedLookup[1015] = '--preset radio'; …
1915 …$LAMEpresetUsedLookup[320] = '--preset insane'; …
1916 $LAMEpresetUsedLookup[410] = '-V9';
1917 $LAMEpresetUsedLookup[420] = '-V8';
1918 $LAMEpresetUsedLookup[440] = '-V6';
1919 …$LAMEpresetUsedLookup[430] = '--preset radio'; …
1920 …$LAMEpresetUsedLookup[450] = '--preset '.(($LAMEtag['raw']['vbr_method'] == 4) ? 'fast ' : '').'p…
1921 …$LAMEpresetUsedLookup[460] = '--preset '.(($LAMEtag['raw']['vbr_method'] == 4) ? 'fast ' : '').'m…
1922 …$LAMEpresetUsedLookup[470] = '--r3mix'; …
1923 …$LAMEpresetUsedLookup[480] = '--preset '.(($LAMEtag['raw']['vbr_method'] == 4) ? 'fast ' : '').'s…
1924 $LAMEpresetUsedLookup[490] = '-V1';
1925 …$LAMEpresetUsedLookup[500] = '--preset '.(($LAMEtag['raw']['vbr_method'] == 4) ? 'fast ' : '').'e…
1927 …ag['preset_used_id']] : 'new/unknown preset: '.$LAMEtag['preset_used_id'].' - report to info@getid…