I want to separate the channels from a stereo audio to individual mono audio, but the outputs aren't mono files, still stereo audio. Apparently, FFmpeg separates the channels, but instead of getting mono audio, it duplicates the separated channel and generates a stereo audio for each output. I have checked the files in MediaInfo and when I imported it into software as Audition.
Code:FOR %%I in (%idir%\*.%extai%) DO "%ffmpeg%" ^ -i "%%I" ^ -filter_complex "[0:a]channelsplit=channel_layout=stereo[left][right]" ^ -map "[left]" ^ "%odir%\%%~nI_front_left.%extai%" ^ -map "[right]" ^ "%odir%\%%~nI_front_right.%extai%"Code:FOR %%I in (%idir%\*.%extai%) DO "%ffmpeg%" ^ -i "%%I" ^ -filter_complex ^ "[0:0]pan=1|c0=c0[left];[0:0]pan=1|c0=c1[right]" ^ -map "[left]" ^ "%odir%\%%~nI_front_left.%extai%" ^ -map "[right]" ^ "%odir%\%%~nI_front_right.%extai%"I used these codes, but the result was the same.Code:FOR %%I in (%idir%\*.%extai%) DO "%ffmpeg%" ^ -i "%%I" ^ -filter_complex "channelsplit=channel_layout=stereo[FL][FR]" ^ -map "[FL]" "%odir%\%%~nI_front_left.%extai%" ^ -map "[FR]" "%odir%\%%~nI_front_right.%extai%"
+ Reply to Thread
Results 1 to 9 of 9
-
-
Use clever FFmpeg-GUI.
Load your video/audio, click main page, click encode audio stream.
Set channels to Split channels and click split.
Done. -
-
When I use the command referred to above,
Code:ffmpeg -i stereo.wav -map_channel 0.0.0 left.wav -map_channel 0.0.1 right.wav
[Attachment 86793 - Click to enlarge] -
-
Try to use https://ffmpeg.org/ffmpeg-filters.html#toc-aformat-1 for left and right output - perhaps ffmpeg automatically add audio format copied from source.
-
@ naoto89 ,
I do not know if i can do what you want.
I just want to make sure I know what you want.
Is it to take a stereo file with two channels & rip each channel to a mono channel creating two mono channels.
Then joining those two mono channels into one mono channel that has both the mono channels joined.
This will split a stereo .wav into left & right mono .wavs.
Code:ffmpeg -i stereo.wav -filter_complex "[0:a]channelsplit=channel_layout=stereo[left][right]" -map "[left]" left.wav -map "[right]" right.wav
I'm not good with batch script.Last edited by cholla; 1st May 2025 at 16:36.
Similar Threads
-
Split PCM stream with 4 channels to individual aac mono streams
By Opera59 in forum AudioReplies: 5Last Post: 18th Mar 2025, 03:25 -
Batch based merging of two mono audio tracks into a single stereo track?
By aramkolt in forum AudioReplies: 2Last Post: 13th Jun 2024, 21:42 -
FFmpeg audio channels
By khaled22 in forum Newbie / General discussionsReplies: 5Last Post: 12th Jun 2023, 14:32 -
FFMPEG Stereo/Dolby Surround 2.0 to Mono 2.0 and 5.1/6.1/7.1 to Stereo 2.0
By Gwar in forum AudioReplies: 9Last Post: 2nd May 2023, 12:43 -
Premiere CC 2019 and importing 5.1 audio as 6 mono channels
By Stile in forum EditingReplies: 0Last Post: 20th Apr 2021, 15:01