Taperssection.com

Gear / Technical Help => Post-Processing, Computer / Streaming / Internet Devices & Related Activity => Topic started by: voltronic on March 08, 2024, 07:51:43 PM

Title: Split PolyWAV to Stereo Tracks with FFMPEG
Post by: voltronic on March 08, 2024, 07:51:43 PM
I have finally found an easy solution to splitting polyphonic WAV files to stereo tracks without having to split to mono files and then recombine those to stereo.

EDIT: This is most useful for 32-bit float PolyWAV files. For 16/24-bit fixed, WaveAgent is the easier choice (see here (https://taperssection.com/index.php?topic=204546.msg2410355#msg2410355)).

1. Install FFMPEG (https://ffmpeg.org/download.html).

2. Copy/move the WAV to the directory containing ffmpeg.exe, or copy ffmpeg.exe to the directory containing the WAV file.

3. Open a command prompt and navigate to the directory containing your WAV and FFMPEG.

4. Enter the appropriate command based on how many channels your PolyWAV contains, replacing [inputfilename] with the name of your WAV:


Code: [Select]
*FOR 8 CHANNELS*

ffmpeg -i inputfilename.wav -filter_complex "[0]pan=stereo|c0=c0|c1=c1[a]; [0]pan=stereo|c0=c2|c1=c3[b]; [0]pan=stereo|c0=c4|c1=c5[c]; [0]pan=stereo|c0=c6|c1=c7[d]" -map "[a]" 1_2.wav -map "[b]" 3_4.wav -map "[c]" 5_6.wav -map "[d]" 7_8.wav


*FOR 6 CHANNELS*

ffmpeg -i inputfilename.wav -filter_complex "[0]pan=stereo|c0=c0|c1=c1[a]; [0]pan=stereo|c0=c2|c1=c3[b]; [0]pan=stereo|c0=c4|c1=c5[c]" -map "[a]" 1_2.wav -map "[b]" 3_4.wav -map "[c]" 5_6.wav


*FOR 4 CHANNELS*

ffmpeg -i inputfilename.wav -filter_complex "[0]pan=stereo|c0=c0|c1=c1[a]; [0]pan=stereo|c0=c2|c1=c3[b]" -map "[a]" 1_2.wav -map "[b]" 3_4.wav


You can run the 8-channel command on a file containing fewer channels without problems. Just be aware you'll be left with silent stereo files for the channels that were not recorded.

I adapted this from one of the solutions found here (https://superuser.com/questions/1241474/ffmpeg-splitting-an-8-channels-wav-into-4-stereo-wav-files). The other solutions listed there all returned errors, as did the syntax found in the official documentation (https://trac.ffmpeg.org/wiki/AudioChannelManipulation#Arbitrarychannelreductionmapping).
Title: Re: Split PolyWAV to Stereo Tracks with FFMPEG
Post by: voltronic on March 08, 2024, 07:54:09 PM
Next task is to verify that this works for 32-bit float files.
Title: Re: Split PolyWAV to Stereo Tracks with FFMPEG
Post by: aaronji on March 09, 2024, 01:03:52 PM
Why not use WaveAgent for 24-bit files?
Title: Re: Split PolyWAV to Stereo Tracks with FFMPEG
Post by: voltronic on March 09, 2024, 01:44:52 PM
Why not use WaveAgent for 24-bit files?

I was not able to get WaveAgent to export directly to stereo tracks. Fortunately a user on GS Remote just showed me what I was doing wrong. I will likely go back to using WaveAgent now... :facepalm:
Title: Re: Split PolyWAV to Stereo Tracks with FFMPEG
Post by: aaronji on March 09, 2024, 01:50:51 PM
Ha, ha! It is really simple, but not clearly documented. Another nice feature is that you can drop multiple files into WaveAgent (if there were auto-splits or different sets/bands or whatever) and do the same split on all simultaneously.
Title: Re: Split PolyWAV to Stereo Tracks with FFMPEG
Post by: goodcooker on March 09, 2024, 02:08:48 PM


Reaper will also explode Poly files. I started with Wave Agent but kinda got used to Reaper already so I'll probably stick with it.
Title: Re: Split PolyWAV to Stereo Tracks with FFMPEG
Post by: Gordon on March 09, 2024, 03:03:29 PM
iZotope RX makes it real easy as well!
Title: Re: Split PolyWAV to Stereo Tracks with FFMPEG
Post by: voltronic on March 09, 2024, 03:26:05 PM
iZotope RX makes it real easy as well!

Only if you have Advanced. I have standard, and it only supports mono or stereo files.
Title: Re: Split PolyWAV to Stereo Tracks with FFMPEG
Post by: live2496 on April 01, 2024, 02:36:29 PM
ffmpeg is awesome for lots of stuff. I primarily use it to cut/extract snippets from original (long run) mp4 video files.

Really quick for repeated tasks once you get the syntax figured out.

Gordon
Title: Re: Split PolyWAV to Stereo Tracks with FFMPEG
Post by: kliked on April 02, 2024, 11:08:07 AM
Why not use WaveAgent for 24-bit files?

I was not able to get WaveAgent to export directly to stereo tracks. Fortunately a user on GS Remote just showed me what I was doing wrong. I will likely go back to using WaveAgent now... :facepalm:

Care to share?
Title: Re: Split PolyWAV to Stereo Tracks with FFMPEG
Post by: voltronic on April 02, 2024, 12:13:17 PM
In the split / combine window, clear the default selections. Then select the first two tracks in column 1, the next two tracks in column 2, etc.
Title: Re: Split PolyWAV to Stereo Tracks with FFMPEG
Post by: C.Clark on June 03, 2024, 11:43:02 AM
If you're willing to pay, Adobe Audition makes it very easy to directly export stereo wave files from polywav, but really appreciate the alternate applications that can do this Voltronic!