[FFmpeg-user] Need help splitting stereo FLAC into two separate files

Mark Filipak markfilipak.windows+ffmpeg at gmail.com
Mon Apr 6 02:58:36 EEST 2020


On 04/05/2020 01:46 PM, Reino Wijnsma wrote:
> On 2020-04-05T18:45:27+0200, Net Net <dastiegen at gmail.com> wrote:
>> [...] I tried map_channel and it worked great for a single file:
>>
>> *ffmpeg -i 1.flac -map_channel 0.0.0 1left.flac -map_channel 0.0.1 1right.flac*
>>
>> Now, I have several hundred of these flacs to split, named 001.flac,
>> 002.flac, 003.flac etc.  I want them to be split into eg. 001left.flac,
>> 001right.flac etc.  A few attempts with Windows wildcards didn't work.
>> Can anyone tell me how, or point me to the right documentation pack for
>> figuring this out?
> Use a for-loop:
> 
> FOR %A IN (*.flac) DO @ffmpeg -i %A -map_channel 0.0.0 %~nAleft%~xA -map_channel 0.0.1 %~nAright%~xA
> 
> This will process all flac-files sorted by filename. If you want to process them sorted by date for instance, then you can do:
> 
> FOR /F "delims=" %A IN ('DIR /B /O:D *.flac') DO @ffmpeg -i %A -map_channel 0.0.0 %~nAleft%~xA -map_channel 0.0.1 %~nAright%~xA
> 
> -- Reino

Reino,

I'm sure my feelings are shared by many. Thank you for helping in such an open, giving way.

Success is the best teacher. You help to bring success. If there's any way that I can help you, I 
hope you will not hesitate to ask.

Warmest Regards,
Mark.


More information about the ffmpeg-user mailing list