ffmpeg -i "URL" -c copy output.mp4
-i: input
→ 입력 파일이나 URL을 지정할 때 사용
-c copy: codec copy
→ 비디오와 오디오 모두 재인코딩 없이 원본 그대로 복사해서 저장 (빠르고 화질 손실 없음)
ffmpeg -i "URL" -vn -acodec pcm_s16le -ar 44100 -ac 2 output.wav
-vn: video none
→ 비디오 스트림을 제외 (오디오만 추출)
-acodec pcm_s16le:
→ pcm_s16le는 WAV 포맷에서 사용하는 무압축 16비트 리틀 엔디언 오디오 코덱
(CD 음질과 동일)
-ar 44100: audio rate 44100Hz
→ 오디오 샘플링 레이트, 일반적인 CD 품질 오디오는 44.1kHz
-ac 2: audio channels = 2
→ 스테레오 (좌우 두 채널)
ffmpeg -i "URL" -vn -codec:a libmp3lame -qscale:a 2 output.mp3
-codec:a libmp3lame:
→ MP3 인코딩을 위한 코덱인 libmp3lame 사용
-qscale:a 2:
→ MP3 음질 조절 (0~9 사이 숫자, 낮을수록 고음질)
→ 2는 일반적으로 고음질과 용량 균형이 좋은 값
.m3u8?.m3u8 is a playlist file format used in streaming video, especially for HLS (HTTP Live Streaming).| 약자 | 의미 |
|---|---|
| M | MPEG (Moving Picture Experts Group – video format) |
| 3U | Comes from M3U: "MP3 URL" or "Moving Picture URL" (originally for audio playlists) |
| 8 | Refers to UTF-8 encoding |
📌 So,
.m3u8= an M3U playlist file encoded in UTF-8
.m3u was used for MP3 audio playlists.m3u8 is the UTF-8 version, and it's now heavily used in HLS video streaming.ts files), not the actual video itself.m3u8 is a playlist file for streaming video/audio.m3u8 Content#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXTINF:10,
chunk1.ts
#EXTINF:10,
chunk2.ts
...
Each chunk.ts is a small piece of the full video, and the player downloads them in order while streaming.