I need to convert audio inside an mkv container from DD+ (E-AC-3) to AC-3. I am assuming that I need to extract, convert and then add the audio back to the mkv container. Is there a tool that makes this task easier?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 30 of 33
Thread
-
-
-
-
-
-
-
Correct would be something like this:
Code:ffmpeg -i "input.mkv" -map 0:v -map 0:a:0 -map 0:a:0 -c:v copy -c:a:0 copy -c:a:1 ac3 "output.mkv"
See:
https://ffmpeg.org/ffmpeg.html#Stream-specifiers
https://trac.ffmpeg.org/wiki/Map -
-
Sorry, my fault, didn't tested, sneaker is right it should be something like this (tested with few different sources):
Code:@ffmpeg.exe -hide_banner -v 32 -stats -y -i %1 -map 0:v -c:v copy -map 0:a -c:a:0 copy -filter_complex [0:a:0]"aresample=resampler=soxr:osr=48000:cutoff=0.990:dither_method=0"[a2c] -map [a2c]:1 -c:a:1 ac3 -b:a 384k -f matroska "%~n1_ac3.mkv"
-
XMedia Recode (free) and myFFmpeg (shareware) will do it. No extraction and remuxing required.
Last edited by mail2tom; 16th Jun 2019 at 18:51.
-
First post, yeah!
I do this a lot. My LG player does not do E-AC3. Here is a batch (.bat) file I wrote.
File: Fix TV Show.bat
Code:@echo off title %~n0 FOR %%I IN (%*) DO nice ffmpeg -i "%%~fI" -vcodec copy -acodec ac3 -abr 640 -sn "%%~dI%%~pI\%%~nI.fixed%%~xI" pause
If you don't have 'nice.exe' just remove the 'nice' from above.
I've used this many times and it produces MKV files that my picky player can play. -
I don't see how to convert E-AC-3 to AC-3 in XMedia Recode. Am I missing something?
How do I get the best audio quality possible?Last edited by kyrcy; 19th Jul 2019 at 11:27.
-
For AC3 bitrate 448kbps or higher accordingly to EBU tests deliver excellent quality:
Dolby Digital requires 448 kbit/s and DTS still requires around 1.5 Mbit/s for
"Excellent" quality.
https://tech.ebu.ch/docs/tech/tech3324.pdf
https://tech.ebu.ch/docs/tech/tech3339.pdf
Dolby Digital (AC3) 512 or 640kbps should deliver overall quality that can be considered from consumer perspective as subjectively lossless. -
-
Map/copy the subtitles you want. (e.g. -map 0:s -c:s copy to copy all subtitles from the first input file to output.)
Set audio bitrate via -b:a (e.g. -b:a 640k to set audio bitrate to 640k for all audio outputs.)
https://ffmpeg.org/ffmpeg-codecs.html#Codec-Options
-
c:\progra~1\ffmpeg-4.1.3-win64-static\bin\ffmpeg.exe -hide_banner -v 32 -stats -y -i %1 -map 0:s -c:v copy -c:a ac3 -b:a 384k -f matroska "%~n1_ac3.mkv"
I get the message:
Stream map '0:s' matches no streams.
To ignore this, add a trailing '?' to the map.
What am I doing wrong? -
Okay. What happens if you use '-c:s copy' instead ?
users currently on my ignore list: deadrats, Stears555 -
'-c copy' should tell ffmpeg to copy the subtitles '-c:v copy' tells it to copy the video and '-c:a ac3 -b:a 384k' tells it to convert the audio to ac3 with a bitrate of 384kBit/s.
No clue why the output would only contain the subtitles.users currently on my ignore list: deadrats, Stears555 -
If you use -map then the default mapping is overriden. I.e. you need:
Code:-map 0:v? -map 0:a? -map 0:s? -c:v copy -c:a ac3 -b:a 384k -c:s copy
-
Yeah, but by replacing the "-map:s" with "-c:s copy" didn't solve it for him, which is what wonders me.
users currently on my ignore list: deadrats, Stears555