C.W.K.
Stream
Lesson 01 of 10 · published

Format 변환 — 첫 한 줄짜리

~10 min · convert, format, transcoding

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

세상에서 제일 짧은 FFmpeg 명령

Format 변환이 너무 흔해서 FFmpeg이 어이없을 정도로 너그러운 default 동작을 가져: input과 output 주면 output 확장자 보고 sensible codec 추측해. ffmpeg -i input.mov output.mp4 그냥 동작해. Output 확장자가 container 선택 driver, container가 default codec driver.

아무것도 명시 안 하면 FFmpeg이 뭘 고를까

.mp4 output이면 default video는 H.264 (libx264), default audio는 AAC. .webm이면 VP9 + Opus. .mkv면 source가 호환되면 그대로 copy, 아니면 MP4 default와 같은 걸로 re-encode. Default는 reasonable. Optimal은 아냐. 파일 크기나 품질 신경 쓰면 명시적 codec/quality flag 줘 — Track 3에서 다 다뤄.

주마다 한 번씩 나오는 흔한 변환

MOV → MP4 (Final Cut export → 웹 안전), MKV → MP4 (Plex source → 폰), WebM → MP4 (yt-dlp output → editor가 여는 파일), AVI → MP4 (10년 묵은 footage → 모던 container). 다 한 줄.

Code

그냥 변환 (FFmpeg default 사용)·bash
# MOV → MP4 (libx264 + AAC default)
ffmpeg -i input.mov output.mp4

# MKV → MP4
ffmpeg -i input.mkv output.mp4

# WebM → MP4
ffmpeg -i input.webm output.mp4

# 옛날 AVI → MP4
ffmpeg -i ancient.avi modern.mp4
Default가 물지 않게 quality 명시·bash
# 같은 변환, 명시 quality
# -crf 23 이 libx264 default; 낮을수록 좋은 품질, 큰 파일
ffmpeg -i input.mov \
  -c:v libx264 -crf 20 -preset slow \
  -c:a aac -b:a 192k \
  output.mp4

# -preset slow 인 이유: 'medium'보다 ~2배 느리지만 같은 품질에 ~10% 더 작음.
# 일회성 변환엔 slow 가 거의 항상 가치 있어.

External links

Exercise

MP4 아닌 영상 아무거나 잡아. 두 변환 돌려: ffmpeg -i src out_default.mp4ffmpeg -i src -c:v libx264 -crf 18 -preset slow -c:a aac -b:a 192k out_quality.mp4. 파일 사이즈 비교, 둘 다 재생. Full screen 으로 quality 차이 보여?

Progress

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

댓글 0

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

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