video-editor
/video-editor
Doradza w montażu wideo z ffmpeg: dobre praktyki kodowania, optymalizacja jakości, transkodowanie, remuxing, przestrzenie barw i diagnoza problemów z jakością.
- Autor
- ckorhonen ↗
- Repozytorium
- claude-skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 26.09.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 13
Brak sygnałów. Repozytorium zmienione 26.09.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Doradza w montażu wideo z ffmpeg: dobre praktyki kodowania, optymalizacja jakości, transkodowanie, remuxing, przestrzenie barw i diagnoza problemów z jakością.
Oryginalny opis (EN)
Expert guidance for video editing with ffmpeg, encoding best practices, and quality optimization. Use when working with video files, transcoding, remuxing, encoding settings, color spaces, or troubleshooting video quality issues.
Jak działa
- When to Use This Skill
- Core Concepts
- Quality Principles
- Quick Reference: FFmpeg Commands
- Encoding Settings Deep Dive
- Container-Specific Considerations
- Color Space & Color Management
- Hardsubbing (Burning In Subtitles)
- What to Avoid
- Recommended Tools
Podgląd SKILL.md
--- name: video-editor description: Expert guidance for video editing with ffmpeg, encoding best practices, and quality optimization. Use when working with video files, transcoding, remuxing, encoding settings, color spaces, or troubleshooting video quality issues. --- # Video Editor - FFmpeg & Encoding Expert Expert guidance for video editing, encoding, and processing with ffmpeg. This skill covers container formats, codecs, encoding best practices, and quality optimization for video production workflows. ## When to Use This Skill Use this skill when: - Encoding or transcoding video files - Converting between container formats (MKV, MP4, etc.) - Optimizing encoding settings for quality or file size - Troubleshooting video quality issues - Working with color spaces and color matrices - Hardsubbing or softsubbing videos - Preparing videos for specific platforms or devices - Understanding why a video looks wrong after processing ## Core Concepts ### Container vs. Codec **This distinction is critical.** File extensions like `.mkv` or `.mp4` are **container formats** that package already-compressed streams. The actual compression happens through **codecs** like H.264, H.265, VP9, or AV1. | Concept | What It Is | Examples | |---------|------------|----------| | Container | Wrapper that holds video/audio/subtitle streams | MKV, MP4, AVI, MOV, WebM | | Codec | Algorithm that compresses/decompresses video | H.264, H.265/HEVC, VP9, AV1 | | Encoder | Software that implements a codec | x264, x265, libvpx, NVENC | ### Remuxing vs. Reencoding | Operation | What It Does | Quality Impact | Speed | |-----------|--------------|----------------|-------| | **Remuxing** | Moves streams between containers without re-compression | None (lossless) | Very fast | | **Reencoding** | Decodes and re-encodes video with new settings | Always loses quality | Slow | **Rule of thumb:** If you only need to change the container format, remux. Only reencode when absolutely necessary. ## Quality Principles ### What "Quality" Actually Means Video quality measures **how closely the output resembles the source**. Every processing step moves the video further from the original. There is no way to add quality - only preserve or lose it. ### Common Misconceptions | Myth | Reality | |------|---------| | Higher resolution = better quality | Resolution is just dimensions; a 720p video can look better than a 4K one | | Higher bitrate = better quality | Encoder efficiency matters more; same quality at different sizes is possible | | H.265 is always 50% smaller | Depends on encoder settings; poorly-configured H.265 can be worse than H.264 | | Hardware encoding is fine for quality | Hardware encoders (NVENC, QuickSync) sacrifice quality for speed | | AI upscaling improves quality | Upscaling adds artificial detail that wasn't in the source | ### The Encoding Quality Hierarchy From most to least important: 1. **Encoder settings** (CRF, preset, tuning) 2. **Encoder choice** (x264/x265 vs. hardware encoders) 3. **Codec** (H.265 vs. H.264 vs. VP9) ## Quick Reference: FFmpeg Commands ### Remux (Change Container, No Quality Loss) ```bash # MKV to MP4 (preserves all streams) ffmpeg -i input.mkv -c copy output.mp4 # MP4 to MKV ffmpeg -i input.mp4 -c copy output.mkv ``` ### Basic Encoding ```bash # Encode with x264, copy audio ffmpeg -i input.mkv -c:a copy -c:v libx264 -preset slower -crf 20 output.mkv # Encode with x265 ffmpeg -i input.mkv -c:a copy -c:v libx265 -preset slower -crf 22 output.mkv ``` ### Quality-Focused Encoding ```bash # High-quality x264 for animation ffmpeg -i input.mkv -c:a copy -c:v libx264 -preset slower -crf 18 \ -x264-params bframes=8 output.mkv # High-quality x265 ffmpeg -i input.mkv -c:a copy -c:v libx265 -preset slower -crf 20 \ -x265-params bframes=8 output.mkv ``` ## Encoding Settings Deep Dive ### CRF (Constant Rate Factor) CRF controls quality vs. file size tradeoff. **Lower = higher quality, larger file.** | CRF Range | Quality Level | Typical Use | |-----------|---------------|-------------| | 0 | Lossless | Archival, intermediate | | 15-18 | Visually lossless | High-quality archival | | 19-23 | High quality | General use, streaming | | 24-28 | Medium quality | Web, mobile | | 29+ | Low quality | Previews, thumbnails | **Note:** CRF values aren't directly comparable between encoders. x265 CRF 22 ≈ x264 CRF 20. ### Preset Presets control encoding speed vs. compression efficiency. | Preset | Speed | File Size | Use When | |--------|-------|-----------|----------| | ultrafast | Fastest | Largest | Live streaming | | fast | Fast | Large | Quick transcodes | | medium | Moderate | Moderate | Default | | slow | Slow | Smaller | Quality-focused | | slower | Very slow | Even smaller | Recommended for quality | | veryslow | Extremely slow | Smallest | Maximum compression | **Recommendation:** Use `slower` for quality-focused encoding. The difference between `slower` and `veryslow` is minimal for significant time cost. ### Tune Options | Tune | Best For | |------|----------| | film | Live-action with film grain | | animation | Cartoons, anime, flat areas | | grain | Preserve film grain | | stillimage | Slideshow, static content | | fastdecode | Playback on weak devices | ```bash # Animation tuning ffmpeg -i input.mkv -c:v libx264 -preset slower -crf 20 -tune animation output.mkv ``` ## Container-Specific Considerations ### MKV (Matroska) **Pros:** - Supports virtually any codec - Multiple audio/subtitle tracks - Chapter markers - Variable frame rate support **Cons:** - Less compatible with some devices/software - Some streaming services don't accept it ### MP4 **Pros:** - Universal compatibility - Web-friendly - Hardware decoder support everywhere **Cons:** - Limited subtitle format support - Stricter codec requirements - Constant frame rate expected ### Converting MKV to MP4 for Editing Software Some editing software requires constant frame rate MP4. Use this two-pass approach: ```bash # Step 1: Initial remux with timescale adjustment ffmpeg -i input.mkv -c copy -video_track_timescale 24000 intermediate.mp4 # Step 2: Fix timestamps ffmpeg -i intermediate.mp4 -c copy \ -bsf:v "setts=dts=1001*round(DTS/1001):pts=1001*round(PTS/1001)" output.mp4 ``` ## Color Space & Color Management ### Understanding Color Metadata Videos store colors in YCbCr format with metadata specifying: - **Color matrix**: How to convert YCbCr to RGB (BT.709, BT.601) - **Color range**: Limited (16-235) vs. Full (0-255) - **Chroma location**: Where color samples are positioned ### Common Issues | Symptom | Likely Cause | |---------|--------------| | Washed out colors | Wrong color range (Limited treated as Full) | | Crushed blacks/blown whites | Wrong color range (Full treated as Limited) | | Greenish/pinkish tint | Wrong color matrix | | Colors look "off" after encode | Mismatched color metadata | ### Preserving Color Information ```bash # Explicitly preserve color metadata ffmpeg -i input.mkv -c:v libx264 -preset slower -crf 20 \ -colorspace bt709 -color_primaries bt709 -color_trc bt709 output.mkv ``` ## Hardsubbing (Burning In Subtitles) ### Using FFmpeg ```bash # Hardsub from external subtitle file ffmpeg -i input.mkv -vf "subtitles=subs.ass" -c:v libx264 -preset slower -crf 20 output.mkv # Hardsub from embedded subtitle track ffmpeg -i input.mkv -vf "subtitles=input.mkv:si=0" -c:v libx264 -preset slower -crf 20 output.mkv ``` ### Using mpv (Better for Complex Subtitles) mpv handles complex ASS subtitles (styling, positioning) more accurately: ```bash mpv --no-config input.mkv -o output.mkv \ --audio=no \ --ovc=libx264 \ --ovcopts=preset=slower,crf=20,bframes=8 ``` ## What to Avoid ### Tools | Tool | Problem | |------|---------| | Handbrake | Unpredictable settings, hides important options | | Online converters | Quality loss, privacy concerns | | "AI upscalers" | Add fake detail, move further from source | | Windows built-in tools | Poor quality, limited options | ### Practices | Practice | Why It's Bad | |----------|--------------| | Unnecessary sharpening | Adds artifacts, moves from source | | Upscaling to higher resolution | Doesn't add real detail | | Multiple reencodes | Quality loss compounds | | Using NVENC for quality | Hardware encoders prioritize speed over quality | | Frame rate interpolation | Adds fake frames with artifacts | ## Recommended Tools ### Essential | Tool | Purpose | |------|---------| | [ffmpeg](https://ffmpeg.org/) | Swiss army knife for video processing | | [MediaInfo](https://mediaarea.net/en/MediaInfo) | Inspect video properties and metadata | | [mpv](https://mpv.io/) | Superior media player, encoding support | | [MKVToolNix](https://mkvtoolnix.download/) | GUI for MKV muxing operations | ### Specialized | Tool | Purpose | |------|---------| | [Aegisub](https://aegisub.org/) | Subtitle editing | | [HandBrake](https://handbrake.fr/) | Simple transcoding (use with caution) | | [yt-dlp](https://github.com/yt-dlp/yt-dlp) | Download online videos | ## Troubleshooting ### Video Won't Play 1. Check codec support on target device 2. Try remuxing to different container 3. Verify file isn't corrupted: `ffmpeg -v error -i file.mkv -f null -` ### Colors Look Wrong After Encoding 1. Compare color metadata: `mediainfo input.mkv` vs. `mediainfo output.mkv` 2. Check color range (Limited vs. Full) 3. Check color matrix (BT.709 vs. BT.601) 4. Explicitly set color parameters in ffmpeg command ### File Size Too Large 1. Increase CRF (e.g., 20 → 23) 2. Use slower preset for better compression 3. Consider x265 for better efficiency 4. Check if you're unnecessarily encoding (remux instead) ### Encoding Takes Forever 1. Use faster preset (but accept larger file) 2. Check if hardware encoding is acceptable for your use case 3. Ensure source isn't being decoded unnecessarily ### Audio/Video Out of Sync 1. Check source file for sync issues first 2. Use `-async 1` for audio sync correction 3. Try remuxing instead of reencoding ## Examples ### Archive a Blu-ray Rip ```bash ffmpeg -i input.mkv -c:a copy -c:v libx265 -preset slower -crf 18 \ -x265-params bframes=8 output.mkv ``` ### Prepare for YouTube Upload ```bash ffmpeg -i input.mkv -c:a aac -b:a 384k -c:v libx264 -preset slower -crf 18 \ -profile:v high -level 4.2 -pix_fmt yuv420p output.mp4 ``` ### Quick Preview/Proxy ```bash ffmpeg -i input.mkv -c:a aac -b:a 128k -c:v libx264 -preset fast -crf 28 \ -vf scale=640:-2 output.mp4 ``` ### Extract Audio Only ```bash # Copy audio stream (no re-encoding) ffmpeg -i input.mkv -vn -c:a copy output.mka # Convert to MP3 ffmpeg -i input.mkv -vn -c:a libmp3lame -b:a 320k output.mp3 ``` ### Trim Without Re-encoding ```bash # Trim from 1:00 to 2:30 ffmpeg -i input.mkv -ss 00:01:00 -to 00:02:30 -c copy output.mkv ``` ## Resources - [FFmpeg Documentation](https://ffmpeg.org/documentation.html) - [FFmpeg Wiki](https://trac.ffmpeg.org/wiki) - [x264 Settings Guide](https://trac.ffmpeg.org/wiki/Encode/H.264) - [x265 Settings Guide](https://trac.ffmpeg.org/wiki/Encode/H.265) - [MediaInfo](https://mediaarea.net/en/MediaInfo) - [mpv Manual](https://mpv.io/manual/stable/)
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · ckorhonen/claude-skills | 100 | MIT |
| jtydhr88/comfytv | 100 | MIT |
| gustavogontijo067-bit/video-production-skills | 100 | MIT |
| jstarfilms/vibecode-protocol-suite | 100 | ISC |
| sammmmoo/claude-content-studio | 90 | MIT |
Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.
Migawka bazy z 13.11.2026 · wersja paczki b6ee90bc714d (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100ffmpeg
Przetwarza, sprawdza i naprawia pliki audio i wideo w FFmpeg: kompresja, przycinanie, napisy, głośność i strumienie. - 100ffmpeg
Obsługuje lokalnie FFmpeg i FFprobe: inspekcja mediów, remuks, transkodowanie, filtrowanie, przegląd wideo na dowodach, plany montażu, czyszczenie podcastów i audio oraz kontrola wyników, z jawnym wyborem strumieni. - 95video-add-music
Dodaje piosenkę pod wideo w MP4 przez ffmpeg, zachowując rozdziały i obraz bez ponownego kodowania. - 100ffmpeg-processing
Przetwarza wideo i audio: transkoduje, edytuje, streamuje i analizuje pliki multimedialne. - 100ffmpeg-command
Zamienia opis operacji na wideo lub audio w gotowe polecenie ffmpeg: transkodowanie, przycinanie, łączenie, filtry, nakładki, miniatury, GIF-y i napisy. - 100ffmpeg
Integruje FFmpeg do przetwarzania wideo po stronie serwera: transkodowania, filtrów i generowania miniatur.