» 您尚未登录:请 登录 | 注册 | 标签 | 帮助 | 小黑屋 |


发新话题
打印

[电脑] 有没有ffmpeg高手,请教一个音频转换命令

微软copilot的回答:

Got it 👍 — you want to take an MKV file that has multiple audio tracks (possibly in different formats), convert all of them to AAC, and output a new MKV file **without touching the video or subtitle streams**.  

Here’s the correct **FFmpeg command**:

```bash
ffmpeg -i input.mkv -map 0 -c:v copy -c:s copy -c:a aac -b:a 192k output.mkv
```

### Explanation:
- `-i input.mkv` → your source MKV file.  
- `-map 0` → includes **all streams** (video, audio, subtitles).  
- `-c:v copy` → copies video as-is (no re-encoding).  
- `-c:s copy` → copies subtitle streams unchanged.  
- `-c:a aac` → converts **all audio streams** to AAC.  
- `-b:a 192k` → sets audio bitrate (you can adjust, e.g., 128k, 256k).  
- `output.mkv` → final file with AAC audio, original video, and subtitles intact.  

### Notes:
- If you want **only audio streams** (dropping video and subs entirely), use:
  ```bash
  ffmpeg -i input.mkv -map 0:a -c:a aac -b:a 192k output.mkv
  ```
  This keeps only audio tracks, all converted to AAC.  

- If your MKV has multiple audio formats (e.g., DTS, AC3, MP3), FFmpeg will transcode each one into AAC automatically.  

Do you want the **video and subtitles preserved** (just audio converted), or do you want an **audio-only MKV**?


TOP

发新话题
     
官方公众号及微博