Skip to content

Instantly share code, notes, and snippets.

@DusanBrejka
Created February 28, 2023 07:28
Show Gist options
  • Save DusanBrejka/39559d9611906891b7131d66ac6c9362 to your computer and use it in GitHub Desktop.
Save DusanBrejka/39559d9611906891b7131d66ac6c9362 to your computer and use it in GitHub Desktop.
H264 profile + level ID map
42000a 1 Baseline
42e00a 1 ConstrainedBaseline
640c0a 1 ConstrainedHigh
64000a 1 High
4d000a 1 Main
42000b 1.1 Baseline
42e00b 1.1 ConstrainedBaseline
640c0b 1.1 ConstrainedHigh
64000b 1.1 High
4d000b 1.1 Main
42000c 1.2 Baseline
42e00c 1.2 ConstrainedBaseline
640c0c 1.2 ConstrainedHigh
64000c 1.2 High
4d000c 1.2 Main
42000d 1.3 Baseline
42e00d 1.3 ConstrainedBaseline
640c0d 1.3 ConstrainedHigh
64000d 1.3 High
4d000d 1.3 Main
42100b 1.b Baseline
42f00b 1.b ConstrainedBaseline
1.b ConstrainedHigh
1.b High
4d100b 1.b Main
420014 2 Baseline
42e014 2 ConstrainedBaseline
640c14 2 ConstrainedHigh
640014 2 High
4d0014 2 Main
420015 2.1 Baseline
42e015 2.1 ConstrainedBaseline
640c15 2.1 ConstrainedHigh
640015 2.1 High
4d0015 2.1 Main
420016 2.2 Baseline
42e016 2.2 ConstrainedBaseline
640c16 2.2 ConstrainedHigh
640016 2.2 High
4d0016 2.2 Main
42001e 3 Baseline
42e01e 3 ConstrainedBaseline
640c1e 3 ConstrainedHigh
64001e 3 High
4d001e 3 Main
42001f 3.1 Baseline
42e01f 3.1 ConstrainedBaseline
640c1f 3.1 ConstrainedHigh
64001f 3.1 High
4d001f 3.1 Main
420020 3.2 Baseline
42e020 3.2 ConstrainedBaseline
640c20 3.2 ConstrainedHigh
640020 3.2 High
4d0020 3.2 Main
420028 4 Baseline
42e028 4 ConstrainedBaseline
640c28 4 ConstrainedHigh
640028 4 High
4d0028 4 Main
420029 4.1 Baseline
42e029 4.1 ConstrainedBaseline
640c29 4.1 ConstrainedHigh
640029 4.1 High
4d0029 4.1 Main
42002a 4.2 Baseline
42e02a 4.2 ConstrainedBaseline
640c2a 4.2 ConstrainedHigh
64002a 4.2 High
4d002a 4.2 Main
420032 5 Baseline
42e032 5 ConstrainedBaseline
640c32 5 ConstrainedHigh
640032 5 High
4d0032 5 Main
420033 5.1 Baseline
42e033 5.1 ConstrainedBaseline
640c33 5.1 ConstrainedHigh
640033 5.1 High
4d0033 5.1 Main
420034 5.2 Baseline
42e034 5.2 ConstrainedBaseline
640c34 5.2 ConstrainedHigh
640034 5.2 High
4d0034 5.2 Main
import * as h from 'h264-profile-level-id';
const levels = Object.keys(h).filter(k => k.startsWith('Level'));
const profiles = Object.keys(h).filter(k => k.startsWith('Profile') && typeof h[k] === "number");
levels.forEach(level => {
profiles.forEach(profile => {
const p = new h.ProfileLevelId(h[profile], h[level]);
console.log([
h.profileLevelIdToString(p),
level.replace('Level', '').replace('_', '.'),
profile.replace('Profile', '')
].join("\t"));
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment