Transcode AC-3 Audio to AAC with FFmpeg and Senta
To transcode audio from AC-3 to AAC while keeping the video stream unchanged, you can use the ffmpeg profile below.
Setup Instructions
Section titled “Setup Instructions”Step 1: Adding a profile
Section titled “Step 1: Adding a profile”First, you need to add a profile for audio transcoding.
-
Start adding a new profile.
-
In the profile command input, paste the following command and save:
Terminal window ffmpeg -re -i ${i} \-c:v copy \-map 0:v -map 0:a -c:a aac -b:a 128k \-f mpegts ${o}Where:
${i}- input stream/file${o}- output stream/file-c:v copy- copy video without re-encoding-map 0:v -map 0:a- map the video and all audio tracks-c:a aac- transcode audio to AAC codec-b:a 128k- set audio bitrate to 128 kbps
Step 2: Assign Profile to Stream
Section titled “Step 2: Assign Profile to Stream”-
Start adding a new stream
-
Set the input and output stream variables.
-
Save and start the stream.
Check that it works
Section titled “Check that it works”Click the log link in the stream’s row in the Streams table. At the start of the session log ffmpeg lists the input streams (the audio shows ac3) and the stream mapping: the video line says copy, the audio line ends with aac. Then the progress lines (frame=, fps=, bitrate=) keep growing. See Stream logs.
Common mistakes
Section titled “Common mistakes”- Mapping only the audio. Once any
-mapis used, ffmpeg stops choosing streams by itself, so the video needs its own-map 0:v. Without it the output has no video. - Using this on a source whose audio is already AAC. Nothing needs converting there.
- Expecting a custom bitrate from the starter profile. It sets none, so ffmpeg’s default applies; use the command above to get
128k.