You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
VLC Video Source Surround Audio Channels are Swapped #12579
5.1 surround channels should play in the proper, individual speakers.
Current Behavior
When playing a file with OBS's built-in VLC Video Source, the Front-Center channel is swapped with the Rear-Left and the Subwoofer/LFE is swapped with the Rear-Right.
Put another way, the sound for the Front-Center channel plays in the Rear-Left speaker, and the sound for the Subwoofer/LFE channel plays in the Rear-Right speaker, and vice-versa; the channels are swapped.
EDIT: To be clear, this behavior exists with ANY 5.1 layout, including Rear-Surround or Mid-Surround.
Steps to Reproduce
Start OBS and add a built-in source from the list called "VLC Video Source".
Go to "Advanced Audio Properties" and turn on the Monitor for that source.
Observe that the channels are swapped as described.
Anything else we should know?
It may be important to note that this only happens with the "VLC Video Source" source and all of the others seem to work fine.
I was instructed to create this issue by a smart person in the Discord windows-support channel, and I'm nerdily thrilled that I may have actually found an actual bug. I hope this helps!
Hello
Thanks for your report.
There are various 5.1 speaker layouts.
What we support in obs is:
SPEAKERS_5POINT1, /**< Channels: FL, FR, FC, LFE, RL, RR */
But there is also a 5.1 with SL SR instead of RL RR.
So FFmpeg will distinguish 5.1 from 5.1 back.
What the vlc plugin is doing is that it is naively counting the number of channels and then affecting a speaker layout.
This is indeed too naive.
I will check if vlc api allows a retrieval of the speaker layout. Not sure about that.
But on your side , is your source a 5.1 back audio ?
Run ffmpeg -i file and report back what FFmpeg says.
In the mean time, if you want a better speaker management, use Media source instead of VLC.
After checking libvlc, it seems vlc does not expose the speaker layout ...
So we can't do anything if your source is not 5.1 back.
If your source is indeed 5.1 back, check that with Media Source all is fine.
Are you sure the speakers are well set on os side ?
I want to be sure it is an issue on our side or not. I will try to confirm on my side.
Hello Thanks for your report. There are various 5.1 speaker layouts. What we support in obs is: SPEAKERS_5POINT1, /**< Channels: FL, FR, FC, LFE, RL, RR */
But there is also a 5.1 with SL SR instead of RL RR. So FFmpeg will distinguish 5.1 from 5.1 back. What the vlc plugin is doing is that it is naively counting the number of channels and then affecting a speaker layout. This is indeed too naive. I will check if vlc api allows a retrieval of the speaker layout. Not sure about that. But on your side , is your source a 5.1 back audio ? Run ffmpeg -i file and report back what FFmpeg says. In the mean time, if you want a better speaker management, use Media source instead of VLC.
Thanks for your attention!
I'm aware of the various 5.1 (and 7.1, etc.) layouts and this behavior happens with all of them, but only in OBS's "VLC Video Source" and not in VLC itself. I've tried different speaker layouts in Windoze as well, and even different audio devices. I've tried videos with various surround layouts. If you play them with the wrong layout, the surround channels may be less defined or even missing, but never swapped with the Center or Sub. Regardless of Middle vs. Rear, the behavior is the same all around.
EDIT: Clarified that it's OBS's "VLC Video Source" that is the only problem.
The fact that this happens only in OBS (always) and not in VLC itself (never) makes my gut think it's OBS, not VLC. In fact, I cannot duplicate this behavior in anything other than OBS. I bet you a raspberry jelly donut it's OBS. O.o
I appreciate the suggestion to use Media Source and that seems to work well, but I like the features of the VLC Video Source (e.g. subtitles), and I was hoping to help the community with what I've learned as I found very little info on OBS surround sound out there. I'd like to work this out if possible.
Here's my ffmpeg command output for the file I attached that has Rear Surround ("3F2R/LFE"), as requested, and I've also run that command on a movie file with Mid Surround ("3F2M/LFE"). Both movies play perfectly in VLC itself, but both have the same exact problem in OBS.
With vlc source, i see indeed with the fraunhoffer file an ordering issue with:
SL == ch3 instead of FC
SR == ch4 instead of LFE
FC == ch5 instead of BL
LFE == ch6 instead of BR
It seems to stem from a difference between SMPTE which orders 5.1 back as: FL FR FC LFE BL BR
while AAC spec has: FC FL FR BL BR LFE
I have no such issue with Media Source.
This is indeed a bug, but not easy to fix. VLC (the app) must do some rematrixing in between the audio receiving and the audio decoding. But it is not exposed in libvlc. I will have to dig more.
The proper fix would be to reorder the channels as i did with the Decklink source but this is a lot of code; not sure i want to follow that recipe. It would be much better if the decoding received from libvlc was correct.
So as things stand, the issue is imo on libvlc side (not vlc app, since it seems to work according to your tests). We give libvlc a proper 5.1 back file; it doesn't decode in correct order. While FFmpeg does. (since Media Source works).
sidenote: the project goal is eventually to remove VLC Source in favor of Media Source when parity is reached. So, not sure i want to invest time in fixing this bug. This will have to be discussed internally with the other devs in the team.
Thanks for humoring me. I appreciate your time and I can see how putting energy into VLC Video Source is a waste of it, so of course don't worry about fixing it on my account. I'll switch to Media Source, (or use the VLC app in a Window Capture) and patiently look forward to any more features that may be in the works.
I don't know my way around GitHub very well, but I think I have the right download, and that seems to work perfectly - the Fraunhofer surround test video plays as expected. Well done indeed.
Thanks for the quick fix! I'll let you close this if you wish.
This PR hasn't been merged yet, so it would not have been included in any release. It would first need to be merged, which would mean it would be included in the next release. You can monitor when that is as the change will be listed in that next release's patch notes.
sidenote: the project goal is eventually to remove VLC Source in favor of Media Source when parity is reached. So, not sure i want to invest time in fixing this bug. This will have to be discussed internally with the other devs in the team.
I notice the VLC Source option is already been removed from the stable release, but I had assumed "parity" meant that the Media source would do everything the VLC Source did, and it doesn't. For instance, the subtitles option isn't there, which is what I was using it for, and others.
Am I misunderstanding something? Yes, yes I am. I had the 32 bit VLC for some raisin.
The VLC Source has not been removed. If you are not seeing it, then OBS did not find a matching copy of VLC installed. Currently we support VLC 3.x with the same bitness (64bit) as the main application.
The VLC Source has not been removed. If you are not seeing it, then OBS did not find a matching copy of VLC installed. Currently we support VLC 3.x with the same bitness (64bit) as the main application.
You are correct! I had the 32 bit version which is strange - I always prefer 64 bit for most things and certainly VLC. Also, VLC doesn't seem to report its bitness in the Help>About.
Activity
pkviet commentedon Sep 3, 2025
Hello
Thanks for your report.
There are various 5.1 speaker layouts.
What we support in obs is:
SPEAKERS_5POINT1, /**< Channels: FL, FR, FC, LFE, RL, RR */
But there is also a 5.1 with SL SR instead of RL RR.
So FFmpeg will distinguish 5.1 from 5.1 back.
What the vlc plugin is doing is that it is naively counting the number of channels and then affecting a speaker layout.
This is indeed too naive.
I will check if vlc api allows a retrieval of the speaker layout. Not sure about that.
But on your side , is your source a 5.1 back audio ?
Run ffmpeg -i file and report back what FFmpeg says.
In the mean time, if you want a better speaker management, use Media source instead of VLC.
pkviet commentedon Sep 3, 2025
After checking libvlc, it seems vlc does not expose the speaker layout ...
So we can't do anything if your source is not 5.1 back.
If your source is indeed 5.1 back, check that with Media Source all is fine.
Are you sure the speakers are well set on os side ?
I want to be sure it is an issue on our side or not. I will try to confirm on my side.
Ezriilc commentedon Sep 3, 2025
Thanks for your attention!
I'm aware of the various 5.1 (and 7.1, etc.) layouts and this behavior happens with all of them, but only in OBS's "VLC Video Source" and not in VLC itself. I've tried different speaker layouts in Windoze as well, and even different audio devices. I've tried videos with various surround layouts. If you play them with the wrong layout, the surround channels may be less defined or even missing, but never swapped with the Center or Sub. Regardless of Middle vs. Rear, the behavior is the same all around.
EDIT: Clarified that it's OBS's "VLC Video Source" that is the only problem.
The fact that this happens only in OBS (always) and not in VLC itself (never) makes my gut think it's OBS, not VLC. In fact, I cannot duplicate this behavior in anything other than OBS. I bet you a raspberry jelly donut it's OBS. O.o
I appreciate the suggestion to use Media Source and that seems to work well, but I like the features of the VLC Video Source (e.g. subtitles), and I was hoping to help the community with what I've learned as I found very little info on OBS surround sound out there. I'd like to work this out if possible.
Here's my ffmpeg command output for the file I attached that has Rear Surround ("3F2R/LFE"), as requested, and I've also run that command on a movie file with Mid Surround ("3F2M/LFE"). Both movies play perfectly in VLC itself, but both have the same exact problem in OBS.
File 1 with Rear Surround ("3F2R/LFE")
File 2 with Middle Surround ("3F2M/LFE"):
pkviet commentedon Sep 5, 2025
With vlc source, i see indeed with the fraunhoffer file an ordering issue with:
It seems to stem from a difference between SMPTE which orders 5.1 back as: FL FR FC LFE BL BR
while AAC spec has: FC FL FR BL BR LFE
I have no such issue with Media Source.
This is indeed a bug, but not easy to fix. VLC (the app) must do some rematrixing in between the audio receiving and the audio decoding. But it is not exposed in libvlc. I will have to dig more.
The proper fix would be to reorder the channels as i did with the Decklink source but this is a lot of code; not sure i want to follow that recipe. It would be much better if the decoding received from libvlc was correct.
So as things stand, the issue is imo on libvlc side (not vlc app, since it seems to work according to your tests). We give libvlc a proper 5.1 back file; it doesn't decode in correct order. While FFmpeg does. (since Media Source works).
pkviet commentedon Sep 5, 2025
sidenote: the project goal is eventually to remove VLC Source in favor of Media Source when parity is reached. So, not sure i want to invest time in fixing this bug. This will have to be discussed internally with the other devs in the team.
Ezriilc commentedon Sep 5, 2025
Woohoo! Nailed it.
Thanks for humoring me. I appreciate your time and I can see how putting energy into VLC Video Source is a waste of it, so of course don't worry about fixing it on my account. I'll switch to Media Source, (or use the VLC app in a Window Capture) and patiently look forward to any more features that may be in the works.
Y'all rock!
vlc-video: Fix 5.1(back) audio channel order
pkviet commentedon Sep 7, 2025
@Ezriilc fixed here: #12601
You can try a test build by going to the artefacts: https://github.com/obsproject/obs-studio/pull/12601/checks
(once CI is finished).
Last artifacts (test builds): https://github.com/obsproject/obs-studio/actions/runs/17531560647
Ezriilc commentedon Sep 7, 2025
I don't know my way around GitHub very well, but I think I have the right download, and that seems to work perfectly - the Fraunhofer surround test video plays as expected. Well done indeed.
Thanks for the quick fix! I'll let you close this if you wish.
pkviet commentedon Sep 7, 2025
I will make some more changes tomorrow to the fix to make it more general.
As it stands now it requires libobs changes which are too narrow.
vlc-video: Fix 5.1(back) audio channel order
vlc-video: Fix 5.1(back) audio channel order
vlc-video: Fix 5.1(back) audio channel order
9 remaining items
Ezriilc commentedon Sep 25, 2025
That's correct. I use the ffmpeg output to "stream" (record) to Icecast.
vlc-video: Fix 5.1(back) and 7.1 audio channel order
vlc-video: Fix 5.1(back) and 7.1 audio channel order
Ezriilc commentedon Oct 7, 2025
Is there a way for me to know if/when this fix will be incorporated into a release? I've updated to v32.0.1 and this bug still remains in it.
Fenrirthviti commentedon Oct 7, 2025
This PR hasn't been merged yet, so it would not have been included in any release. It would first need to be merged, which would mean it would be included in the next release. You can monitor when that is as the change will be listed in that next release's patch notes.
vlc-video: Fix 5.1(back) and 7.1 audio channel order
theking2 commentedon Apr 3, 2026
ChID-BLITS-EBU.mp4
Test file
Ezriilc commentedon Apr 3, 2026
I notice the VLC Source option is already been removed from the stable release, but I had assumed "parity" meant that the Media source would do everything the VLC Source did, and it doesn't. For instance, the subtitles option isn't there, which is what I was using it for, and others.Am I misunderstanding something? Yes, yes I am. I had the 32 bit VLC for some raisin.
WizardCM commentedon Apr 3, 2026
The VLC Source has not been removed. If you are not seeing it, then OBS did not find a matching copy of VLC installed. Currently we support VLC 3.x with the same bitness (64bit) as the main application.
Ezriilc commentedon Apr 4, 2026
You are correct! I had the 32 bit version which is strange - I always prefer 64 bit for most things and certainly VLC. Also, VLC doesn't seem to report its bitness in the Help>About.
vlc-video: Fix 5.1(back) and 7.1 audio channel order
vlc-video: Fix 5.1(back) and 7.1 audio channel order
vlc-video: Fix 5.1(back) and 7.1 audio channel order
vlc-video: Fix 5.1(back) and 7.1 audio channel order