Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Pre-Release Discussion

Reply
 
Thread Tools Display Modes
Old 03-20-2020, 02:30 PM   #1
Bottledforest
Human being with feelings
 
Join Date: Jun 2018
Posts: 17
Default Embedded Multichannel Order for Surround

------------------------------------------------------------------
Request
------------------------------------------------------------------
To be able to optionally embed the channel configuration of SMPTE into the file allowing the configuration to be read by other software.


------------------------------------------------------------------


With a 6 channel WAV export from Reaper. We do not currently know which is Centre, Left, Right, etc.
Every other program exporting in surround formats embeds this data so once this file is used in a different program, the channel order will switch if the configuration is not SMPTE.

For example, Pro Tools uses Film which is L, C, R, RL, RR, LFE.

Here is the file from Reaper.

The content is text to speech saying the channel order. The file is mapped as expected.




L - > 1
R - > 2
C - > 3
LFE - > 4
RL - > 5
RR - > 6


------------------------------------------------------------------


If I was to create a surround sound ambience file and sell it online, the end-user dragging it into any software not using SMPTE would have the channels mixed up.

Here is the same file in a multi mono setup from Pro Tools. Look at the top of the clip name and how it has assigned the surround position of the file.





As you can see the order is incorrect.


------------------------------------------------------------------


When we drag this file into Audition, this is the information that is contained in the file.





Every channel is labeled 'Mono'.

Using Auditions own 'Convert to 5.1' favourite. We end up with exactly the same file, except the channel order has been embedded.




------------------------------------------------------------------


Now when we drag this file into Pro Tools, this is what we get.



Because of the embedded order, Pro tools has correctly identified the configuration so we get correct playback.


------------------------------------------------------------------


This will benefit the film and audio community hugely, anyone who exports surround sound formats from Reaper to be used in any other software will encounter this issue.

This also affects users who are creating sound libraries as the configuration will be incorrect if used in other software.

My suggestion is we are given the option to embed the data into multichannel files. We can keep everything clean as an 8 channel fully mono WAV for users that do not require the data.

This could be an option added in the newly created metadata tab in the render settings.

If you've encountered this issue in other software please include it in this post.



Thanks!
Bottledforest is offline   Reply With Quote
Old 07-22-2020, 03:17 AM   #2
Bottledforest
Human being with feelings
 
Join Date: Jun 2018
Posts: 17
Default

bumping
Bottledforest is offline   Reply With Quote
Old 07-27-2020, 12:10 AM   #3
tdc
Human being with feelings
 
Join Date: Oct 2019
Location: Sydney
Posts: 470
Default

I suspect this is a metadata feature, and would be interested to see how we can deliver files with the tags.
tdc is offline   Reply With Quote
Old 08-20-2020, 09:30 AM   #4
mrlimbic
Human being with feelings
 
mrlimbic's Avatar
 
Join Date: Nov 2009
Location: UK
Posts: 660
Default

Microsoft have a standard for WAV files called WAVEFORMATEXTENSIBLE which can include channel maps in WAVE files.

dwChannelMask - Bitmask specifying the assignment of channels in the stream to speaker positions.

Protools, Audition & many other audio apps recognise this metadata on import.

This would probably be easiest for cockos to add to render.

Add a drop down for a number of standard defined layout masks.

It could also default to one that makes sense for number of channels in render. i.e. if 6 then add 5.1 mask, if 3 then add LCR mask.

https://docs.microsoft.com/en-us/pre...ectedfrom=MSDN

There are some example WAV files with different channel layouts for testing here.

http://jensign.com/bdp95/7dot1voiced/index.html

Code:
The WAVEFORMATEXTENSIBLE structure can describe any format that can be described by the WAVEFORMATEX structure, but provides additional support for more than two channels, for greater precision in the number of bits per sample, and for new compression schemes.

The dwChannelMask member specifies which channels are present in the multichannel stream. The least significant bit corresponds with the front left speaker, the next least significant bit corresponds to the front right speaker, and so on. The bits, in order of significance, are defined in Ksmedia.h and Mmreg.h as follows.
Remarks
Speaker position 	Flag bit
SPEAKER_FRONT_LEFT 	0x1
SPEAKER_FRONT_RIGHT 	0x2
SPEAKER_FRONT_CENTER 	0x4
SPEAKER_LOW_FREQUENCY 	0x8
SPEAKER_BACK_LEFT 	0x10
SPEAKER_BACK_RIGHT 	0x20
SPEAKER_FRONT_LEFT_OF_CENTER 	0x40
SPEAKER_FRONT_RIGHT_OF_CENTER 	0x80
SPEAKER_BACK_CENTER 	0x100
SPEAKER_SIDE_LEFT 	0x200
SPEAKER_SIDE_RIGHT 	0x400
SPEAKER_TOP_CENTER 	0x800
SPEAKER_TOP_FRONT_LEFT 	0x1000
SPEAKER_TOP_FRONT_CENTER 	0x2000
SPEAKER_TOP_FRONT_RIGHT 	0x4000
SPEAKER_TOP_BACK_LEFT 	0x8000
SPEAKER_TOP_BACK_CENTER 	0x10000
SPEAKER_TOP_BACK_RIGHT 	0x20000

 

The following constants define some standard speaker configurations as bitwise ORs of the flags shown in the previous table.
Table 3
Value 	Description 	Speakers
KSAUDIO_SPEAKER_MONO 	Mono 	Front center (C)
KSAUDIO_SPEAKER_STEREO 	Stereo 	Front left (L), front right (R)
KSAUDIO_SPEAKER_QUAD 	Quadraphonic 	L, R, back left (Lb), back right (Rb)
KSAUDIO_SPEAKER_SURROUND 	Surround 	L, R, front center (C), back center (Cb)
KSAUDIO_SPEAKER_5POINT1 	5.1 channel 	L, R, C, Lb, Rb, low frequency (LFE)
KSAUDIO_SPEAKER_7POINT1 	7.1 channel 	L, R, C, Lb, Rb, front left-of-center, front right-of-center, LFE
KSAUDIO_SPEAKER_5POINT1_SURROUND 	5.1 channel surround 	L, R, C, side left (Ls), side right (Rs), LFE
KSAUDIO_SPEAKER_7POINT1_SURROUND 	7.1 channel surround 	L, R, C, Lb, Rb, Ls, Rs, LFE
__________________
Vordio - Post Production Toolkit
http://vordio.net

Last edited by mrlimbic; 08-21-2020 at 02:45 PM.
mrlimbic is offline   Reply With Quote
Old 08-20-2020, 09:19 PM   #5
sonictim
Human being with feelings
 
sonictim's Avatar
 
Join Date: Feb 2020
Location: Los Angeles
Posts: 456
Default Yes please!

This would be very beneficial! +1
sonictim is offline   Reply With Quote
Old 08-23-2020, 01:51 AM   #6
svijayrathinam
Human being with feelings
 
Join Date: May 2017
Posts: 955
Default

A big +1 from me pls
svijayrathinam is offline   Reply With Quote
Old 08-27-2020, 06:39 AM   #7
Bottledforest
Human being with feelings
 
Join Date: Jun 2018
Posts: 17
Default

Awesome mrlimbic! Thanks for investigating and finding a solution. Hopefully the right people will see this!
Bottledforest is offline   Reply With Quote
Old 08-29-2020, 04:13 AM   #8
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 8,696
Default Script test

Following mrlimbic doc, and other external sources,


I think I just succeed to make the core of a dwChannelMask injector pure Lua. It can detect regular wav (dont sure it will work with RF64) file channel count, see actual channel pattern if any (in human readable way) and automatically inject a corresponding mask. It should be able to be extended on more files (all selected items in a reaper project, or simpler, all files from a folder).


Still experimenting. Scripts which alter files needs to be done very carefully.


For sure, if it has to be integrated in reaper, it would require some customization option with channel order etc cause there is quite some different possibilities (not every 6 channels file is L, R, C, Lb, Rb, LFE) etc...
X-Raym is offline   Reply With Quote
Old 08-29-2020, 06:06 PM   #9
tdc
Human being with feelings
 
Join Date: Oct 2019
Location: Sydney
Posts: 470
Default

This is really exciting!

Would this be somehow related to the metadata of Take Markers in a WAV?
tdc is offline   Reply With Quote
Old 08-30-2020, 01:32 AM   #10
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 8,696
Default

@tdc
Nope, it is a metadata on the fmt chunks of the wav file (the part which says what is bit depth, bit rate, channel etc. So it is really core of the wav file definition so it can be decoded).
X-Raym is offline   Reply With Quote
Old 08-30-2020, 03:47 AM   #11
tdc
Human being with feelings
 
Join Date: Oct 2019
Location: Sydney
Posts: 470
Default

I have printed spoken word recordings "Left, Centre, Right... " etc on all delivered assets to ensure that no-one can mess it up. Will be nice to have one more step of accuracy in Reaper.
tdc is offline   Reply With Quote
Old 08-31-2020, 07:10 PM   #12
em.T
Human being with feelings
 
Join Date: May 2010
Posts: 36
Default

This is something I believe is quite important. Nice one bringing it up!
em.T is offline   Reply With Quote
Old 09-06-2020, 01:04 AM   #13
Bottledforest
Human being with feelings
 
Join Date: Jun 2018
Posts: 17
Default

Thanks X-Raym. Yeah I wonder if you set it at a project level or a render level. I would imagine a project level would make more sense.
Bottledforest is offline   Reply With Quote
Old 09-06-2020, 12:45 PM   #14
Lynx_TWO
Human being with feelings
 
Lynx_TWO's Avatar
 
Join Date: Dec 2019
Location: St Petersburg FL
Posts: 801
Default

This is a big +1 for me. It would also be amazing to automatically color the tracks based on the final channel they go to, and REALLY amazing to have the icon auto-generate based on the routing channel and input channel. I’ll whip something up in Illustrator and share the file since I already started generating custom track icons for exactly this purpose
Lynx_TWO is offline   Reply With Quote
Old 09-06-2020, 12:54 PM   #15
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 8,696
Default

I technically finished the core part of my script,
just need to take care of the in integration (I'll go for a simple process file in selected folder type of input) but no problem there.


I plan to make it a premium script in order to justify dev time, as the number of people interested seems to be extra low and only professional.


Note that I only check Wav file not RIFF64. Not sure if has different requirements.
X-Raym is offline   Reply With Quote
Old 09-10-2020, 05:22 AM   #16
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 8,696
Default Script Release

Hi Everyone !


So as I already had a quite advanced Lua wav parser, I experiment this concept, and I finally end up with a working solution.


To justify dev time and effort, I released the scripts in a premium pack.


Let me know if you have any questions, and thanks for your support !



Cheers !
X-Raym is offline   Reply With Quote
Old 08-20-2021, 08:16 AM   #17
paaltio
Human being with feelings
 
Join Date: Aug 2011
Location: Los Angeles, CA
Posts: 276
Default

I'd like to throw in my +1 on this feature as well. X-Raym has done a great job with the script, but I can't help but feel this is one of those features that should be built into the Render dialog.

I wonder if one reason this feature is not supported (in addition to being esoteric) is Reaper's open-ended nature with regards to channels? So you can't 100% know which channel is which.

Although it looks like Reaper is regardless mapping the metadata here, seeing for example interleaved 7.1 WAVs with the Pro Tools film order L-C-R-Lss-Rss-Lsr-Rsr-Lfe get imported into the Microsoft L-R-C-Lfe-Lsr-Rsr-Lss-Rss order in Reaper.

Ideally you could tell it to embed different orders (ITU etc.) right in the metadata options in the Render dialog, but at least it should be possible to embed the default order.

And to top it all off, would be amazing to have split mono export with user-defineable channel labels, so you could easily export Pro Tools compatible files with .L, .C and so on... then it would be perfect for seamless co-operation in the post world!
paaltio is online now   Reply With Quote
Old 10-13-2021, 08:15 AM   #18
horst_horstmann
Human being with feelings
 
Join Date: Jul 2018
Posts: 5
Default Channel order scrambled on video import

Reaper also seems to misinterpret the audio tracks in a video on import.

Example:
I have a 16 channel PCM audio file
muxed it to a ProRes mov using ffmpeg
Then imported that resulting mov into several DAWs.

Results (screenshot is too big for the forum... SMH):
Pro Tools, Nuendo, Audition und Premiere maintain the correct channel count and number of channels.

Reaper only shows the first 8 channels and the channel order is scrambled (1-2-7-8-4-5-6-3-rest is missing).

Seems like a huge problem, if you can't trust the imported audio. One of the great things about Reaper is that it usually doesn't re-map audio without asking.
Is there an import setting I can't find?

BTW, if I just import the original 16ch audio file into Reaper, everything is as expected (correct channel order and number of channels)

Last edited by horst_horstmann; 10-13-2021 at 08:24 AM.
horst_horstmann is offline   Reply With Quote
Old 10-19-2021, 05:08 AM   #19
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 13,708
Default

I moved this thread into the prerelease forum, because the 6.38+dev1018 build includes some WAVEFORMATEXTENSIBLE support.

The wavformat_extensible format requires channels to be in a specific order. This is kind of confusing, but as I understand it, using a 6-channel file as an example:

If a file does not contain wav_ext information, no channel order is specified. Importing into another app, channels will be ordered however that app expects them, Pro Tools for example will import as L C R BL BR LFE.

If a file does contains wav_ext information, the file can specify which channels are included, but the channel order is fixed. For example the file can specify L R C LFE BL BR, or L R C LFE SL SR, but not L C R LFE BL BR. Importing into another app, since the channels are identified, the app should order them correctly. For example a file with wav_ext data specifying L R C LFE BL BR will be imported into Pro Tools correctly, with the channels reordered into L C R BL BR LFE.

wav_ext is very widely supported, but there are various other metadata specifications for channel order that are no doubt more flexible.
schwa is offline   Reply With Quote
Old 10-19-2021, 05:25 AM   #20
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 13,708
Default

Quote:
Originally Posted by svijayrathinam View Post
I wonder how Nuendo does it . When I export a 7.1 file from Nuendo and reimport into protools the channels line up perfectly. For your info protools is using 7. 1 film format which is L,C,R LSS,RSS, LSR, RSR, LFE and Nuendo uses 7.1 SMPTE. So when I export a 7.1 file from Nuendo and import onto Protools ..it lines up as it should but I tried exporting a file in reaper with this dev version and imported in protools .. the surround channels appear swapped..so I guess Nuendo is doing something different to encode the channel order info . It would be very useful to have that feature
It should be the case that a file exported from REAPER as L R C LFE BL BR SL SR is imported to PT as L C R LSS RSS LSR RSR LFE. Is it easy for you to check that?

It's likely easy for us to add additional channel order/identification metadata short of full ADM support, if you have specific technical suggestions.

Last edited by schwa; 10-19-2021 at 05:31 AM.
schwa is offline   Reply With Quote
Old 10-19-2021, 04:20 PM   #21
svijayrathinam
Human being with feelings
 
Join Date: May 2017
Posts: 955
Default

Quote:
Originally Posted by schwa View Post
It should be the case that a file exported from REAPER as L R C LFE BL BR SL SR is imported to PT as L C R LSS RSS LSR RSR LFE. Is it easy for you to check that?
.
Yes. I tried this and a file exported from reaper as L R C LFE BL BR SL SR is imported in protools as L C R LSR RSR LSS RSS LFE
__________________
Vijay Rathinam MPSE,
www.theaudioville.com
IMDB Page : https://www.imdb.com/name/nm3221039/?ref_=fn_al_nm_1
svijayrathinam is offline   Reply With Quote
Old 10-19-2021, 10:47 PM   #22
airon
Human being with feelings
 
airon's Avatar
 
Join Date: Aug 2006
Location: Berlin
Posts: 11,647
Default

Very nice. Gives us a good chance of no longer needing to stick to single-channel files.
__________________
(Video)Using Latch Preview - Faderport16 for CSI v1.1 - Faderport8 for CSI 1.1
Website
"My ego comes pre-shrunk" - Randy Thom
airon is offline   Reply With Quote
Old 02-13-2022, 01:42 AM   #23
tingshuo
Human being with feelings
 
Join Date: Dec 2018
Posts: 23
Default

Quote:
Originally Posted by horst_horstmann View Post
Reaper also seems to misinterpret the audio tracks in a video on import.

Example:
I have a 16 channel PCM audio file
muxed it to a ProRes mov using ffmpeg
Then imported that resulting mov into several DAWs.

Results (screenshot is too big for the forum... SMH):
Pro Tools, Nuendo, Audition und Premiere maintain the correct channel count and number of channels.

Reaper only shows the first 8 channels and the channel order is scrambled (1-2-7-8-4-5-6-3-rest is missing).

Seems like a huge problem, if you can't trust the imported audio. One of the great things about Reaper is that it usually doesn't re-map audio without asking.
Is there an import setting I can't find?

BTW, if I just import the original 16ch audio file into Reaper, everything is as expected (correct channel order and number of channels)

Yes, I also just ran into this. Was sent a MOV packaged H.264 video file with 5.1 linear PCM audio. It is a test export for a film being prepped for a cinema DCP, so the channel order is L/C/R/Ls/Rs/LFE.

Using Quicktime Player on Mac OS, it plays back correctly. When I bring it in to Reaper, the Right channel is showing up on channel 5, instead of 3.

Using Vordio to extract audio from the MOV confirms the channel order is correctly presented on the original file. In the attached image, the top track shows the MOV imported directly into Reaper with the incorrect channel order, the bottom track is the WAV extracted by Vordio with correct channel order.(the Ls/Rs/LFE are all correctly silent in this file).
Attached Images
File Type: jpg MOV import VS Vordio extraction.jpg (55.8 KB, 76 views)
tingshuo is offline   Reply With Quote
Old 04-14-2022, 05:22 AM   #24
AZpercussion
Human being with feelings
 
Join Date: Oct 2019
Location: Moscow, Russia
Posts: 593
Default

I see there are troubles with multichannel order in Reaper.
If I made video render and import this video I get different channel order than should be.
In the render window there is right order meanwhile.

If i made WAV file with metadata it can't be opened the right way in protools. But in Audition it can.
So confusing.

Also I tried to render video with AAC codek, (hoped it allow to include metadata) but get this error:



For test I made WAV 5.1 in Audition with metadata.


So, this is render window in reaper with right channel order.


How it looks in Reaper:


This is how it looks in Audition: Metadata founded right way.


And how it looks in PT: (remember, that PT has L C R Ls Rs LFE order)


May be something wrong with PT, but obviously not all right in Reaper with channel ordering.
__________________
My smart contextual split script: https://forum.cockos.com/showthread.php?t=259751
AZpercussion is offline   Reply With Quote
Old 04-14-2022, 05:48 AM   #25
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 13,708
Default

I think there are known problems with multichannel video decoding and VLC. What video encoder and decoder are you using?
schwa is offline   Reply With Quote
Old 04-14-2022, 06:39 AM   #26
AZpercussion
Human being with feelings
 
Join Date: Oct 2019
Location: Moscow, Russia
Posts: 593
Default

Yes, VLC, but until I installed ffmpeg codecs there was no menu item AAC, which unfortunately doesn't work too.
I tried to remove vlc from the video decoder priority string, but there is no changes.

Hmm, it's really strange that something created by vlc can not be recognized back well by vlc itself.

And, please, take a look at how WAV with metadata shown in PT.
__________________
My smart contextual split script: https://forum.cockos.com/showthread.php?t=259751
AZpercussion is offline   Reply With Quote
Old 04-14-2022, 06:47 AM   #27
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 13,708
Default

FWIW if you're on Windows I am hopeful that the WMF encoding/decoding that is currently in the +dev builds will handle channel ordering better than VLC, and it supports AAC (and FLAC) too.

Can you link to the REAPER and audition wavs so I can see exactly what metadata audition is embedding?
schwa is offline   Reply With Quote
Old 04-14-2022, 07:03 AM   #28
AZpercussion
Human being with feelings
 
Join Date: Oct 2019
Location: Moscow, Russia
Posts: 593
Default

Good news!! Thanks!
Here are three wavs, Peaper, PT and Audition: https://drive.google.com/drive/folde...SV?usp=sharing
__________________
My smart contextual split script: https://forum.cockos.com/showthread.php?t=259751
AZpercussion is offline   Reply With Quote
Old 04-14-2022, 07:15 AM   #29
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 13,708
Default

Thanks, that's helpful. The difference is that Audition is embedding L R C LFE Ls Rs, while REAPER is embedding L R C LFE Lsd Rsd. It looks like PT is handling L R C LFE Lsd Rsd incorrectly, it should at least map the top 4 channels, but we can add L R C LFE Ls Rs as a channel layout tag option.

Last edited by schwa; 04-14-2022 at 07:24 AM.
schwa is offline   Reply With Quote
Old 04-14-2022, 07:22 AM   #30
AZpercussion
Human being with feelings
 
Join Date: Oct 2019
Location: Moscow, Russia
Posts: 593
Default

Thanks!
Also may be helpful this list of tags from AU:

__________________
My smart contextual split script: https://forum.cockos.com/showthread.php?t=259751
AZpercussion is offline   Reply With Quote
Old 04-14-2022, 02:53 PM   #31
AZpercussion
Human being with feelings
 
Join Date: Oct 2019
Location: Moscow, Russia
Posts: 593
Default

Quote:
Originally Posted by schwa View Post
FWIW if you're on Windows I am hopeful that the WMF encoding/decoding that is currently in the +dev builds will handle channel ordering better than VLC, and it supports AAC (and FLAC) too.
Hmm, will it WMF codec which can create MOV and MP4 file, or it will be only WMF file as output?
__________________
My smart contextual split script: https://forum.cockos.com/showthread.php?t=259751
AZpercussion is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:58 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.