C.W.K.
Stream
Lesson 07 of 08 · published

Complex Filter 예시

~12 min · filter_complex, advanced, production

Level 0Viewer
0 XP0/73 lessons0/15 achievements
0/100 XP to next level100 XP to go0% complete

Production-quality recipe

실 작업에 외울 가치 있는 filtergraph 패턴:

  1. Side-by-side 비교 — original 옆 graded.
  2. Picture-in-picture overlay — 화면 녹화의 webcam.
  3. Pre-roll + body + post-roll — intro clip + main 콘텐츠 + outro.
  4. Watermark + lower-third + audio music — full short-form package.

Code

Pre-roll + main + post-roll (normalize 와 concat)·bash
# 다른 source, 같은 target spec
ffmpeg -i intro.mov -i main.mp4 -i outro.mov \
  -filter_complex "[0:v]scale=1920:1080,fps=30,setsar=1[v0]; \
                   [1:v]scale=1920:1080,fps=30,setsar=1[v1]; \
                   [2:v]scale=1920:1080,fps=30,setsar=1[v2]; \
                   [0:a]aformat=sample_rates=48000:channel_layouts=stereo[a0]; \
                   [1:a]aformat=sample_rates=48000:channel_layouts=stereo[a1]; \
                   [2:a]aformat=sample_rates=48000:channel_layouts=stereo[a2]; \
                   [v0][a0][v1][a1][v2][a2]concat=n=3:v=1:a=1[outv][outa]" \
  -map "[outv]" -map "[outa]" \
  -c:v libx264 -crf 20 -preset slow \
  -c:a aac -b:a 192k \
  -movflags +faststart \
  package.mp4
Full short-form package: PiP + logo + music + lower-third·bash
ffmpeg -i screen.mp4 -i webcam.mp4 -i logo.png -i music.mp3 \
  -filter_complex "[1:v]scale=320:-2[cam]; \
                   [2:v]scale=140:-2[lg]; \
                   [0:v][cam]overlay=W-w-20:H-h-20[withcam]; \
                   [withcam][lg]overlay=20:20[withlogo]; \
                   [withlogo]drawtext=fontfile=/System/Library/Fonts/Supplemental/Arial.ttf:text='Pippa Quest — FFmpeg':fontcolor=white:fontsize=42:x=20:y=H-th-30:box=1:boxcolor=black@0.6:boxborderw=15[outv]; \
                   [3:a]volume=-14dB[bgm]; \
                   [0:a][bgm]amix=inputs=2:duration=first[outa]" \
  -map "[outv]" -map "[outa]" \
  -c:v libx264 -crf 20 -preset slow \
  -c:a aac -b:a 192k \
  -movflags +faststart \
  short.mp4

External links

Exercise

Full short-form package recipe 를 자기 asset 으로 빌드. 각 output 검증: PiP 보임? Logo top-left? Music 이 voice 아래로 ducked? 그 다음 component 한 번에 하나씩 strip + 다시 빌드 — 'shippable' 하는 minimal graph 가 뭐?

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.