![]() ![]() Downmixing without discarding the LFE channel (Dave_750's answer) It therefore seems pretty conclusive that the ATSC formula detailed in Gregory's answer is the same one already implemented by FFmpeg, and that using it is entirely redundant when it does nothing that -ac 2 doesn't, and is a much more cumbersome command. I then compared the sizes of the resulting output files and found they were, byte-for-byte, the same size:įinally, I opened both of the two output files in Audacity, and compared their waveforms to confirm they were identical (click to enlarge): I decided to test this for certain by re-encoding the same input audio using both -ac 2 and the -af filter from Gregory's answer (the exact commands used can be seen in the footnotes to this answer). If this is true, then typing out the entire formula in Gregory's answer would be no different than using the -ac 2 switch, and therefore a waste of time. This specification is itself directly linked to by the FFmpeg documentation on the topic, indicating it's highly likely to be the same formula that FFmpeg already implements for its -ac 2 switch. Downmixing with the ATSC formula (Gregory's answer)Īs of the time of posting this answer, the top-voted answer to this question was Gregory's, which puts the formula from the ATSC specification (see section 7.8.2, Downmixing into Two Channels) into an FFmpeg audio filter. If you want a more high quality downmix, or you absolutely must include the LFE stream into your output, you can use FFmpeg's audio filter switch ( -af) to downmix the audio using a custom mix formula. ![]() To downmix an audio stream to stereo and transcode it to the AC3 codec, for example: ffmpeg -i "sourcetrack.dts" -c:a ac3 -ac 2 "stereotrack.ac3"ĭownmixing a 5.1 channel audio stream to stereo with a custom mix algorithm However, note that doing so too much may result in distortion or artifacts, especially during its louder sections. to keep its codec and extension the same): ffmpeg -i "sourcetrack.dts" -c:a dca -ac 2 "stereotrack.dts"Īs pointed out by Mephisto in his answer, if the dialogue and the music sound well-balanced among each other to you but simply lack volume, you can downmix the stream while also increasing its volume: ffmpeg -i "sourcetrack.dts" -c:a dca -ac 2 -vol 425 "stereotrack.dts"įor the -vol switch, 100% volume in the source is equivalent to the integer value 256, and using a larger value than this will increase the overall volume of the audio stream. To downmix a DTS track with -ac 2 without transcoding it (i.e. Unfortunately, in my tests -ac 2 resulted in overall levels of both music and dialogue that were the most different to the source, making it the downmix formula that gives the worst output out of all the formulae I tested, although you may test it and find that it gives you a perfectly adequate downmix for your needs, in which case using any other formula would be overkill for you. 1 in 5.1, reserved for the subwoofer and used for deep, low-frequency effects) is discarded completely when using this option. When doing so, audio from the LFE channel (the. The -ac 2 switch works by mixing proportions of the first 5 channels from the source's 6-channel stream - Back Left, Back Right, Front Left, Front Right and Front Center - into the Front Left and Front Right channels of the output stereo stream: Should be preferred (the -ac option) over the pan filter unless you Note: ffmpeg integrates a default down-mix (and up-mix) system that Most importantly, it's worth bearing in mind that Gregory's answer, currently the top-voted answer to this question, is no different than using the -ac 2 switch - more on this below.ĭownmixing a 5.1 channel audio stream to stereo with -ac 2įFmpeg comes with built-in capabilities for downmixing a 5.1 track to stereo, and this is also the solution that FFmpeg's own documentation recommends: This answer is an attempt to streamline the information in these answers while doing away with the problems in them. The answers on this question have since become a bit of a mess, with many containing redundant information and others complete inaccuracies. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |