Converting 6 audio channels to 2 in ffmpeg
It is a known bug/limitation of current ffmpeg.
In my experience I concluded that it can't be done with ffmpeg alone.
You have to transcode audio/video separately.
1) extract .wav file from the source movie.
2) resample to 2ch stereo with audio editing tool such as Audacity.
3) encode audio stream
3) transcode video stream
4) mux audio/video to target format
Admin
Updated on June 27, 2022Comments
-
Admin about 2 years
Im doing a 2 pass encode on the uploads to my site.
Unfortunately when a user uploads a 6 audio channel .mkv files (5.1 surround), ffmpeg spits out the following error:
Resampling with input channels greater than 2 unsupported.
Im running the latest version of ffmpeg. Doing
-ac 6
instead of the usual- ac 2
proceeds with the encoding, but it just creates a larger file with useless data, as well as creates another step in the already long file processing script, and I'd rather avoid modifying the conversion command.Is there anything I can do to make
-ac 2
actually work? -
Admin over 13 yearsI found this patch, but its for an older version of ffmpeg lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080111/… If it can be modified for the current version...