You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

如何将MKV影片5.1声道音频转2.0立体声并保留原音轨?

Solution: Keep Original 5.1 Audio + Add Normalized 2.0 Stereo Track with FFmpeg

Got it, let's tweak your existing FFmpeg batch command to preserve the original 5.1 audio tracks while adding your normalized 2.0 stereo track. Here's the breakdown and modified command:

Key Changes Explained

Your original command was converting all input audio tracks directly to 2.0. To keep both the original and new track, we need to:

  1. Copy the original 5.1 audio tracks without modification
  2. Generate a new normalized 2.0 track from the original audio
  3. Ensure both tracks are included in the output MKV

Modified Batch Command

for /r %%i in (*.mkv) do (
    @ffmpeg.exe -hide_banner -v 32 -stats -y -i "%%i" ^
    -map 0:v -c:v copy ^
    -map 0:a -c:a:0 copy ^
    -map 0:a -acodec ac3 -ac 2 -ar 48000 -ab 640k -af %aproc2% -c:a:1 ac3 ^
    -map 0:s? -c:s copy ^
    -f matroska "%%~ni [Stereo+5.1].mkv"
)

What Each Part Does

  • -map 0:v -c:v copy: Copies the original video stream unchanged (same as your original command)
  • -map 0:a -c:a:0 copy: Maps the original audio tracks (your 5.1 channels) and copies them directly without encoding
  • -map 0:a -acodec ac3 -ac 2 -ar 48000 -ab 640k -af %aproc2% -c:a:1 ac3: Maps the original audio again, applies your normalization filter (%aproc2%), converts it to 2.0 stereo AC3 with your specified bitrate/sample rate, and marks this as the second audio stream
  • -map 0:s? -c:s copy: Copies all subtitle streams (if present) unchanged
  • The output filename is updated to [Stereo+5.1] to clearly indicate both track types are included

Quick Notes

  • If you have multiple original 5.1 tracks, this command will copy all of them and add a normalized 2.0 track for each. If you only want one 2.0 track (e.g., derived from the first audio stream), adjust the second -map 0:a to -map 0:a:0 instead.
  • Double-check that %aproc2% is properly defined in your batch environment (it should contain your audio normalization filter string, like loudnorm=I=-16:LRA=11:TP=-1.5 or similar).

内容的提问来源于stack exchange,提问作者aur0n

火山引擎 最新活动