Blue Sky SRT
Blue Sky SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
01-blue-sky.srtdf98bfdbc94f9a020161538cf6d26234861f300a7c090158735eba993762e5a4Subtitle
動画字幕で広く使われるテキスト形式。番号、タイムコード、字幕本文のブロックで構成されます。
31 0A 30 30 3A 30 30 1.00:00SIGNATURE = bytes.fromhex("310a30303a3030")
OFFSET = 0
def is_srt(path: str) -> bool:
with open(path, "rb") as f:
f.seek(OFFSET)
head = f.read(len(SIGNATURE))
return head == SIGNATUREconst SIGNATURE = [0x31, 0x0a, 0x30, 0x30, 0x3a, 0x30, 0x30];
const OFFSET = 0;
// bytes: a Uint8Array / Buffer holding the start of the file
export function isSrt(bytes) {
return SIGNATURE.every((byte, i) => bytes[OFFSET + i] === byte);
}package fileid
import "bytes"
var issrtSignature = []byte{0x31, 0x0a, 0x30, 0x30, 0x3a, 0x30, 0x30}
const issrtOffset = 0
func IsSrt(b []byte) bool {
end := issrtOffset + len(issrtSignature)
if len(b) < end {
return false
}
return bytes.Equal(b[issrtOffset:end], issrtSignature)
}const SIGNATURE: &[u8] = &[0x31, 0x0a, 0x30, 0x30, 0x3a, 0x30, 0x30];
const OFFSET: usize = 0;
fn is_srt(bytes: &[u8]) -> bool {
bytes.get(OFFSET..OFFSET + SIGNATURE.len()) == Some(SIGNATURE)
}<?php
$signature = "\x31\x0a\x30\x30\x3a\x30\x30";
$offset = 0;
function is_srt(string $bytes): bool {
global $signature, $offset;
return substr($bytes, $offset, strlen($signature)) === $signature;
}SubRip Subtitle はデータ交換、インポート/エクスポート、パーサのテスト、検証ワークフローで使われます。エンコーディング・区切り文字・バージョン・コンテナ構造が実装の挙動を変えることがあります。
形式が判定できたからといって、信頼できない入力が安全とは限りません。パーサ例外・巨大ファイル・想定外のエンコーディング・外部参照を考慮してください。
11 個のサンプルで、先頭バイト判定・パーサのエラー・アップロード上限・ダウンロード挙動をテストできます。
Blue Sky SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
01-blue-sky.srtdf98bfdbc94f9a020161538cf6d26234861f300a7c090158735eba993762e5a4Flower Garden SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
02-flower-garden.srt0cfd87b4517ffe51778c7f0d6387d4e83cecf7ff950226f897f6f9a7dfae4956Navy Blue Sky SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
03-navy-blue-sky.srt494bd539264047912fa02785b36a80474c8b5b0b6e079967ef4bf236568fdcdeNature of the Sky SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
04-nature-sky.srt466d40a2e987a462611e234655d5020ed9c3a0c78971311828dfbc8ef8df68d3Sky Landscape SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
05-sky-landscape.srt82aef437534e82862820628e3868d631672f56ea21f808814b4c4e867e16f13dStarry Sky SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
06-starry-sky.srte0a400c54266cf8af4940679e89e29d510baaf45fba5766cbff603bb45667ff6Blue Night Sky SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
07-blue-night-sky.srta13e8e06c9db6cbdb6b97d17948bb5c39ccedcd441ee5d25e3a64a4e83b939a0Hibiscus Flower SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
08-hibiscus-flower.srtf618dc19ae2bebe46ca4defe0db51f596b9209c4c8cd2ddbe6988dd672c85fb7Arctic Sky SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
09-arctic-sky.srtb40fc412ab14f1ccc272c96b890f8bf7f5b6fe4ad134f5cb14cde3e8423677beSunset Rays SRT is a SubRip Subtitle sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.
10-sunset-rays.srt7419b45bc6adcb4b91eb64665474d99716f835bdc50b771e45d9c19b61b70807NASA Blue Marble SRT is a SubRip Subtitle sample based on NASA Image and Video Library. It can be used to test downloads, parsers, previews, and file type detection.
nasa-blue-marble-2012-east.srt4d5b3cd6f6de5de54a34fdceb6fa30f7cf6e88bc695b78311164b2aaa621439fSubRip Subtitle ファイルはバイトシグネチャ 31 0A 30 30 3A 30 30 ("1.00:00") で始まります。拡張子に頼らず、この先頭バイトを読み取って形式を判定してください。
SubRip Subtitle のMIMEタイプは application/x-subrip, text/plain です。
SubRip Subtitle ファイルは .srt 拡張子を使います。拡張子は慣習にすぎず中身を保証しないため、シグネチャや構造のチェックと組み合わせてください。