How to transcode multichannel audio to stereo?

About encoding, codec settings, muxers and filter usage
Frater Kork
Blank Cone
Blank Cone
Posts: 41
Joined: 20 Feb 2004 00:52

How to transcode multichannel audio to stereo?

Postby Frater Kork » 01 Apr 2004 01:21

Hello.

One problem I have run into with streaming video is that an AC3 (5.1) source like a DVD generally grabs an awful lot of bitrate just to fransfer audio (like 448 kbit 5ch). This generally turns into an issue when streaming over links with precious little bandwidth..

I have tried to set transcode to a low enough value and just use 2 stereo channels, this works but I only get the 2 front stereo channels.
None of the other channels are mixed in, this generally gives lots of music and effects while there is low or no voice, no bass and no echoes.

How can I mix the surround audio into simple flat mp3 stereo?

Cheers!

User avatar
hans-jürgen
Blank Cone
Blank Cone
Posts: 85
Joined: 15 Jan 2004 11:50
VLC version: 3.0.18
Operating System: Windows 10 Home
Location: Hamburg, Germany
Contact:

Re: How to transcode multichannel audio to stereo?

Postby hans-jürgen » 01 Apr 2004 10:49

How can I mix the surround audio into simple flat mp3 stereo?
Instead of downmixing the AC-3 5.1 signal to MP3 stereo there are other possibilities, too. Since you want to stream the file over the internet, you could also transcode to AAC and use the MP4 container then. Using the open source FAAC codec at the setting -q 80 -c 13000 will give you a very good sounding 5.1 file with ~220-250 kbps VBR, depending on your input sound. The Windows audio player foobar2000 is perfect for an easy transcoding of AC-3->AAC, by the way. If you want to go lower than that, you could try HE AAC available in Nero 6, but that's a commercial software (~60 EUR plus 15 EUR for the AAC codec, as far as I know).

Another option is to transcode the AC-3 5.1 file to Dolby Surround, but I don't know if there are free encoders for that. Using LAME for MP3 transcoding can also preserve the surround information if it has been downmatrixed before the MP3 encoding, as far as I know, e.g. with a downmixer plugin or DirectShow filter.

All this also depends on the OS you're using and the players that the clients on the network are using for decoding your files.
ZZee ya, Hans-Jürgen
BLUEZZ BASTARDZZ - "That lil' ol' ZZ Top cover band from Hamburg..."
INDIGO ROCKS - "Down home rockin' blues. Tasty as strudel."

Frater Kork
Blank Cone
Blank Cone
Posts: 41
Joined: 20 Feb 2004 00:52

Postby Frater Kork » 02 Apr 2004 00:24

Ah, yes I am aware of ways to convert the media files to prepackaged materiel that can be sent without transcoding by VLC, and since it saves a lot of CPU to do so it is a good idea indeed.

However, in some cases I want to be able to stream on the fly from various sources - like DVD. vlc transcode does a wonderful job on the video but I have still to figure out how to make the same on the audio...

User avatar
hans-jürgen
Blank Cone
Blank Cone
Posts: 85
Joined: 15 Jan 2004 11:50
VLC version: 3.0.18
Operating System: Windows 10 Home
Location: Hamburg, Germany
Contact:

Postby hans-jürgen » 02 Apr 2004 10:30

However, in some cases I want to be able to stream on the fly from various sources - like DVD. vlc transcode does a wonderful job on the video but I have still to figure out how to make the same on the audio...
You could e.g. compile VLC with FAAC support which should enable direct transcoding from 5.1 AC-3 to 5.1 AAC/MP4 then. As far as I know, this affords to install the FAAC library first, then compile ffmpeg with FAAC support and then compile VLC with ffmpeg support. At least this was the necessary procedure some weeks ago, but maybe the VideoLAN developers have changed this in the meantime.
ZZee ya, Hans-Jürgen
BLUEZZ BASTARDZZ - "That lil' ol' ZZ Top cover band from Hamburg..."
INDIGO ROCKS - "Down home rockin' blues. Tasty as strudel."

User avatar
hans-jürgen
Blank Cone
Blank Cone
Posts: 85
Joined: 15 Jan 2004 11:50
VLC version: 3.0.18
Operating System: Windows 10 Home
Location: Hamburg, Germany
Contact:

Postby hans-jürgen » 03 Apr 2004 09:25

By the way, if you want to try that, please use the latest CVS version of FAAC v1.24 (or wait for the weekly snapshot on Sunday afternoon), because there has been a fix related to a dependancy with the ffmpeg library (the fft_init function was present in both libs, so now it has been renamed to fft_initialize in FAAC).

Other changes include new tagging switches for MP4 files, so you don't need an external MP4 tagger like tg.exe anymore when applying iTunes-compatible tags during encoding. And FAAC shows the VBR bitrate now on the console during encoding, too.

http://www.audiocoding.com/download.php
ZZee ya, Hans-Jürgen
BLUEZZ BASTARDZZ - "That lil' ol' ZZ Top cover band from Hamburg..."
INDIGO ROCKS - "Down home rockin' blues. Tasty as strudel."

cocentaina
New Cone
New Cone
Posts: 2
Joined: 09 Apr 2004 12:02

Postby cocentaina » 09 Apr 2004 16:52

i have the exact same problem as Frater Kork. However, I found out that the VLC GUI has the option of choosing the audio track. One of the three tracks is OK as voice can be heard (although it's not all channels mixed into stereo), but unfortunately i cannot find the command-line option to select the audio track. Is there such an option??

Guest

Postby Guest » 11 Apr 2004 19:58

Hi,

cocentina: isnt the option you are looking for the --audio-channel option <number> ?

I have the same problem like Frank, but I have to encode it to mp3 because my player decodes stereo only.

So same question as Frank: How can I convert the ac3 to normal stereo ?

Hans-Jürgen mentioned a downmixer plugin!
Where can I get it ? How can I use it ??

thanx in ad !

Ciao
Matze

User avatar
hans-jürgen
Blank Cone
Blank Cone
Posts: 85
Joined: 15 Jan 2004 11:50
VLC version: 3.0.18
Operating System: Windows 10 Home
Location: Hamburg, Germany
Contact:

Postby hans-jürgen » 12 Apr 2004 10:12

Hans-Jürgen mentioned a downmixer plugin!
Where can I get it ? How can I use it ??
As far as I know, there is no direct downmix option in VLC yet which would solve these problems*. I meant external plugins and/or DirectShow filters that can do this, e.g. AC3Filter which has many options for the channel setup or the Channel Downmixer by Trombettworks. But you would have to use them outside of VLC (e.g. in GraphEdit), because it does not support DS filters completely yet. Other tools for downmixing while transcoding from AC-3 to MP3 or other formats are foobar2000 or BeSweet, but you cannot use them while streaming (like Frater Kork already mentioned), only when creating files.

*See also this feature request:
viewtopic.php?t=2086
ZZee ya, Hans-Jürgen
BLUEZZ BASTARDZZ - "That lil' ol' ZZ Top cover band from Hamburg..."
INDIGO ROCKS - "Down home rockin' blues. Tasty as strudel."

barmeier
New Cone
New Cone
Posts: 3
Joined: 11 Apr 2004 13:56
Contact:

Postby barmeier » 12 Apr 2004 10:52

Hi,

unfortunately :wink: I am using linux not windows.

Does anyone has a hint for me how to downmix AC3 to Mpeg Stereo ?
I think Graphedit and the other are Windows tools.

I dont need live Streaming transcoding to a file and streaming the file is ok for me.

Any suggestions ?

Ciao
Matze

User avatar
hans-jürgen
Blank Cone
Blank Cone
Posts: 85
Joined: 15 Jan 2004 11:50
VLC version: 3.0.18
Operating System: Windows 10 Home
Location: Hamburg, Germany
Contact:

Postby hans-jürgen » 12 Apr 2004 14:45

Does anyone has a hint for me how to downmix AC3 to Mpeg Stereo ? I think Graphedit and the other are Windows tools.
That's right, Windows-only in this case (except if you would consider to use foobar2000 within Wine or something similar)...

I think the MPEG4IP project is developing direct AC-3 decoding, too, which means that you could also transcode to AAC or MP3 then, either with mp4live or simply by writing a MP4 file. I don't how far Bill May has come with this extension yet and if it's already available in their CVS, but he will probably also add a 5.1->2.0 downmixer for the input then.

Other Linux projects that come to my mind are Mplayer, mpd and Xine, but I don't know if they provide a downmixer solution for AC-3 input in their player applications.
ZZee ya, Hans-Jürgen
BLUEZZ BASTARDZZ - "That lil' ol' ZZ Top cover band from Hamburg..."
INDIGO ROCKS - "Down home rockin' blues. Tasty as strudel."

Guest

Postby Guest » 12 Apr 2004 17:18

I used the ugly downmix to headphone for my 5.1 AAC.

barmeier
New Cone
New Cone
Posts: 3
Joined: 11 Apr 2004 13:56
Contact:

Postby barmeier » 12 Apr 2004 19:47

Hi,

I will give Mplayer and Xine a try. Mplayer sounds good to me ! So many options one should fit for me :wink:

What makes me wonder is that wehen I replay a DVD with VLC it downmixes from 5.1 - 2.0.

I wonder why this is not available for transcoding ??

What does guest mean with headphone downmix ??

Ciao
Myatze

User avatar
hans-jürgen
Blank Cone
Blank Cone
Posts: 85
Joined: 15 Jan 2004 11:50
VLC version: 3.0.18
Operating System: Windows 10 Home
Location: Hamburg, Germany
Contact:

Postby hans-jürgen » 13 Apr 2004 08:56

I will give Mplayer and Xine a try. Mplayer sounds good to me ! So many options one should fit for me :wink:
I forgot to mention gmerlin which is being further developed to v0.3.0 in CVS, but there's no new release yet.
What makes me wonder is that wehen I replay a DVD with VLC it downmixes from 5.1 - 2.0. I wonder why this is not available for transcoding ??
Are you sure that VLC does the downmix, or maybe the audio output and/or soundcard mixer on your system?
What does guest mean with headphone downmix ??
I don't know, but maybe there is a module that emulates a specialized Dolby Surround 2ch mode for headphones that can produce this surround sound. I think such plugins exist for Winamp etc...
ZZee ya, Hans-Jürgen
BLUEZZ BASTARDZZ - "That lil' ol' ZZ Top cover band from Hamburg..."
INDIGO ROCKS - "Down home rockin' blues. Tasty as strudel."

barmeier
New Cone
New Cone
Posts: 3
Joined: 11 Apr 2004 13:56
Contact:

Postby barmeier » 13 Apr 2004 09:28

Hi,

I think yu are right Hans-Jürgen it is probably the soundcoard that does the mixing. :(

I will wait for the next release of VLC. The Feature request is already posted. Lets hope the Devs will hear us.

Ciao
Matze


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 8 guests