1s Silence M4A
1s Silence M4A is a MPEG-4 Audio sample generated for file format testing. It can be used to test downloads, parsers, previews, and file type detection.
silence-1s.m4aAudio
AACなどの音声をISO BMFF/MPEG-4コンテナに格納する形式。通常はftyp boxを持ちます。
66 74 79 70 ftypSIGNATURE = bytes.fromhex("66747970")
OFFSET = 4
def is_m4a(path: str) -> bool:
with open(path, "rb") as f:
f.seek(OFFSET)
head = f.read(len(SIGNATURE))
return head == SIGNATUREconst SIGNATURE = [0x66, 0x74, 0x79, 0x70];
const OFFSET = 4;
// bytes: a Uint8Array / Buffer holding the start of the file
export function isM4a(bytes) {
return SIGNATURE.every((byte, i) => bytes[OFFSET + i] === byte);
}package fileid
import "bytes"
var ism4aSignature = []byte{0x66, 0x74, 0x79, 0x70}
const ism4aOffset = 4
func IsM4a(b []byte) bool {
end := ism4aOffset + len(ism4aSignature)
if len(b) < end {
return false
}
return bytes.Equal(b[ism4aOffset:end], ism4aSignature)
}const SIGNATURE: &[u8] = &[0x66, 0x74, 0x79, 0x70];
const OFFSET: usize = 4;
fn is_m4a(bytes: &[u8]) -> bool {
bytes.get(OFFSET..OFFSET + SIGNATURE.len()) == Some(SIGNATURE)
}<?php
$signature = "\x66\x74\x79\x70";
$offset = 4;
function is_m4a(string $bytes): bool {
global $signature, $offset;
return substr($bytes, $offset, strlen($signature)) === $signature;
}MPEG-4 Audio は再生、波形処理、アップロードチェック、再生時間の処理、ビットレート検証などで使われます。短いクリップ・無音・環境音はプレイヤーや変換の境界条件を洗い出すのに役立ちます。
メディアファイルも、壊れたメタデータ・極端な寸法・長い再生時間・異常なチャンクでデコーダに負荷をかけることがあります。処理前にサイズ・寸法・長さを読み取ってください。
11 個のサンプルで、再生時間の処理・再生開始・メタデータ読み取り・ダウンロード挙動をテストできます。
1s Silence M4A is a MPEG-4 Audio sample generated for file format testing. It can be used to test downloads, parsers, previews, and file type detection.
silence-1s.m4aLake Waves M4A 0.25s is a MPEG-4 Audio sample based on Wikimedia Commons, 0.25s. It can be used to test downloads, parsers, previews, and file type detection.
01-lake-waves.m4a3acf7a99014ee51084844dfa48809d4fec35e64e6a3dd60ed570a6a2a39f7375Lake Waves M4A 0.5s is a MPEG-4 Audio sample based on Wikimedia Commons, 0.5s. It can be used to test downloads, parsers, previews, and file type detection.
02-lake-waves.m4ae42cf698af2b9a5ed2b1e9748a6d701e5670c9aed139214f351aac04b425c731Lake Waves M4A 1s is a MPEG-4 Audio sample based on Wikimedia Commons, 1s. It can be used to test downloads, parsers, previews, and file type detection.
03-lake-waves.m4ad276f4457c6a8279a76b3d6441fe376199b28f3e58743032cc22f32a4eeab73fLake Waves M4A 1.5s is a MPEG-4 Audio sample based on Wikimedia Commons, 1.5s. It can be used to test downloads, parsers, previews, and file type detection.
04-lake-waves.m4a9bb5abfe5902192df5eea9ff612be786a6a66e6f9a81f6e9b8752985367c9d7eLake Waves M4A 2s is a MPEG-4 Audio sample based on Wikimedia Commons, 2s. It can be used to test downloads, parsers, previews, and file type detection.
05-lake-waves.m4a333f53255cde3ea10ec6a204df25ef0120c2d2e1a18deab7d69cbbf1088b1015Lake Waves M4A 3s is a MPEG-4 Audio sample based on Wikimedia Commons, 3s. It can be used to test downloads, parsers, previews, and file type detection.
06-lake-waves.m4aa0df51be67619ee1285dc2ff7c3eddf1fd96d7c61d77d7af5a674035b44c8fd4Lake Waves M4A 4s is a MPEG-4 Audio sample based on Wikimedia Commons, 4s. It can be used to test downloads, parsers, previews, and file type detection.
07-lake-waves.m4af273420fb35c21dbf949b983c3c290b7b236fe68463d3603a88a0f1581d9ea76Lake Waves M4A 6s is a MPEG-4 Audio sample based on Wikimedia Commons, 6s. It can be used to test downloads, parsers, previews, and file type detection.
08-lake-waves.m4aec4cfe7733673a288bd3ce55009ff2673d39978a459cd7edef1acc8799691f5eLake Waves M4A 8s is a MPEG-4 Audio sample based on Wikimedia Commons, 8s. It can be used to test downloads, parsers, previews, and file type detection.
09-lake-waves.m4af0c43b06e3c2f562cea9301844bcb35b77f638e1e864bb4cc267714d6a4de38fNASA TV Audio M4A is a MPEG-4 Audio sample based on NASA Image and Video Library, 2s. It can be used to test downloads, parsers, previews, and file type detection.
nasa-tv-audio.m4a8cf1d4f56a731eb009dcc14b10952c4b39e4d35d20bb6c6ec99b5f2016b3b21aMPEG-4 Audio ファイルはバイトシグネチャ 66 74 79 70 ("ftyp") で始まります。拡張子に頼らず、この先頭バイトを読み取って形式を判定してください。
MPEG-4 Audio のMIMEタイプは audio/mp4 です。
MPEG-4 Audio ファイルは .m4a 拡張子を使います。拡張子は慣習にすぎず中身を保証しないため、シグネチャや構造のチェックと組み合わせてください。