This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I have hundreds of videos of karaoke in 5.1 aac. I posted before that I needed to remove the first channel (voice) but now it's 1st and 2nd. For some odd reason, the PC that plays the karaoke doesn't play 5.1 audio, so I would like to downmix to stereo.
I'm using the following batch script but would like to know if I can do both in one command:
FOR /F "usebackq delims=|" %%F IN (`dir /s /b /A:-D "*.mp4"`) DO ffmpeg -i "%%F" -af "pan=5.1|c2=c2|c3=c3|c4=c4|c5=c5" -c:v copy "output\%%~nF.mp4"
cd output
mkdir output
FOR /F "usebackq delims=|" %%F IN (`dir /s /b /A:-D "*.mp4"`) DO ffmpeg -i "%%F" -ac 2 -c:v copy "output\%%~nF.mp4"
shutdown /s /t 0
I found this wiki but it's for 8 channels audio:
Multiple channel layouts
This example combines two layouts (5.1 2.0) into a single arbitrary layout using the pan audio filter:
ffmpeg -i input -filter_complex "pan=5.1 downmix|FL=c0|FR=c1|FC=c2|LFE=c3|BL=c4|BR=c5|DL=c6|DR=c7[a]" -map "[a]" out.wav
The output in the example resulted in one audio stream with 8 channels.
I tried doing this but I got another 5.1 audio:
ffmpeg -i input -filter_complex "pan=5.1 downmix|c2=FL|c3=FR|c4<FL FR|c5<FL FR|[a]" -map "[a]" out.wav
Tried this but got an error: invalid output channel name "c2=FL"
ffmpeg -i input -af "pan=stereo|c2=FL|c3=FR|c4<FL FR|c5<FL FR" out.wav
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/ffmpeg/comm...