video-optimization
Fungsinya
Skill ini meninjau file video di situs web dan menyarankan cara membuatnya lebih kecil. Skill ini ditujukan untuk pemilik situs dan pengembang yang halamannya lambat karena video.
Kapan dipakai
- ✓Saat sebuah halaman memuat video besar yang memperlambat tampilan pertamanya.
- ✓Saat sebuah situs web menyajikan video 4K untuk layar ponsel yang kecil.
- ✓Saat video latar tanpa suara menyertakan trek audio yang tidak dibutuhkan.
Link skill
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/video-optimization/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Beranda saya memiliki video latar dan ukurannya sangat berat. Bagaimana cara membuatnya dimuat lebih cepat?”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent memeriksa resolusi, codec, audio, dan ukuran file setiap video dibandingkan tempat video itu ditampilkan. Lalu agent menyarankan encode ulang dan penyajian versi yang lebih kecil untuk layar yang lebih kecil.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Optimize and compress web videos
Unoptimized video is frequently the single heaviest asset on a page—an uncompressed or oversized video can dwarf every image and script combined, delaying Largest Contentful Paint and burning mobile data budgets.
Quick Reference
- Re-encode source video instead of shipping raw camera/screen-recorder output
- Serve multiple resolutions so mobile doesn't download a 4K file
- Prefer modern codecs: AV1/VP9/HEVC over baseline H.264 where supported
- Strip audio tracks from silent background/looping videos
Check
Scan this codebase for <video> elements and video asset references. For each one, verify: 1) The served resolution is appropriate for the rendered player size and device (no 4K video in a 400px player). 2) The codec/container is efficient (H.264 baseline is acceptable but VP9/AV1/HEVC is preferred when available). 3) Audio is stripped from silent background/looping videos. 4) A poster attribute or lightweight thumbnail is present. 5) File size is reasonable for its duration and placement (hero/background videos under a few MB). Report issues grouped by severity with file paths.
Fix
For each video optimization issue found: 1) Re-encode to multiple resolutions (e.g. 480p/720p/1080p) and serve the smallest one that fits the player via <source> or JS-based selection. 2) Convert to an efficient codec (VP9 or AV1 in WebM, or HEVC/H.264 in MP4) with a reasonable CRF/ quality setting rather than default encoder settings. 3) Remove the audio track from muted background/looping videos. 4) Add a poster attribute pointing to a compressed thumbnail. 5) Add preload="metadata" (or "none") instead of "auto" for below-the-fold videos. Show the corrected <video> markup and encoding command.
Explain
Explain why video is often the largest asset on a page and how it affects Largest Contentful Paint and mobile data usage. Cover the tradeoffs between H.264, HEVC, VP9, and AV1 (compression efficiency vs browser/ device support and encode time), how resolution and bitrate should scale to the rendered player size and viewport, and why muted background video should have its audio track stripped entirely rather than just muted in markup.
Code Review
Review video assets, <video>/<source> markup, and any encoding or CDN transform pipeline related to Optimize and compress web videos. Flag exact files or components where resolution, codec, bitrate, or loading behavior violates the rule, and describe how to confirm the fix in DevTools' Network and Media panels.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/performance/video-optimization
Pertanyaan umum
Format video mana yang lebih baik?
Skill lebih memilih codec modern seperti VP9, AV1, atau HEVC jika didukung, dibandingkan H.264 dasar bila memungkinkan.
Mengapa menyediakan beberapa resolusi?
Agar ponsel tidak mengunduh file besar yang ditujukan untuk layar besar. Halaman menyajikan versi terkecil yang sesuai dengan pemutar.
Apakah video tanpa suara harus tetap memiliki audio?
Tidak. Skill menyarankan untuk menghapus audio dari video latar atau video berulang yang tanpa suara.
Detail
Deskripsi asli dari pembuat
Use when reviewing <video> elements, background/hero video, or embedded media assets. Check encoded bitrate, resolution relative to the rendered player size, codec/container choice, and whether a poster/thumbnail avoids blocking on the first frame.
Popularitas
- Bintang GitHub
- 75k
- Peringkat
- #3074
- Lisensi
- MIT
- Diperbarui
- 31/10/2026
Komentar
- …
Skill lain dari repositori ini
frontendchecklist
75kMemeriksa kode frontend dan halaman langsung terhadap lebih dari 380 aturan untuk aksesibilitas, kecepatan, SEO, dan keamanan, dengan alat baris perintah.
frontend-checklist-global
75kMengaudit proyek frontend terhadap seluruh 386 aturan Front-End Checklist, dan memberikan perbaikan spesifik untuk setiap masalah yang ditemukan.
404-page
75kMemeriksa bahwa halaman tidak ditemukan Anda menawarkan tautan yang membantu dan mengembalikan status 404 yang sebenarnya, untuk membantu pengunjung yang tersesat.
about-page
75kMeninjau apakah situs Anda memiliki halaman Tentang yang jelas yang menjelaskan siapa yang mengelolanya, untuk membangun kepercayaan pengunjung dan mesin pencari.
Skill serupa
taste-application
280kMembantu agent Anda membuat video dengan gaya tertentu, meniru ritme editing dari video referensi, membuat adegan baru, dan menyesuaikan warna.
taste-distillation
280kMembantu agent Anda menganalisis video untuk membuat style pack berisi warna, ritme pemotongan, dan elemen visual yang bisa dipakai ulang.
ui-demo
280kMembuat agent Anda merekam video demo UI yang rapi. Berguna untuk membuat tutorial atau menunjukkan cara kerja aplikasi web.