Question

I am using FFMPEG to transcode a large file to a smaller file. Usually the files will have 2 audio channels (though not always). I am trying to center all audio channels.

I asked over at the ffmpeg-users for examples of how to do this: http://ffmpeg-users.933282.n4.nabble.com/Panning-audio-channels-example-td4417939.html

What I got from the replies is that FFMPEG has yet to implement audio filters. Somehow I should be able to set up a libav filter (?) to pan all channels center... something to the effect of: pan="c0=0.5*FL+0.5*FR" though when I do this, I get the error: No such filter: 'pan'. Those guys are great but I can't figure this out by reading the docs.

I have not disabled filters, here is my build info configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libopenjpeg --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/opt/local/bin/gcc-apple-4.2 --arch=x86_64 --enable-yasm --enable-nonfree --enable-libfaac

Here is an example of one of my built command lines: ffmpeg -i inMovie.mov -acodec libfaac -ab 64k -vcodec libx264 -vpre medium -b 320k -pass 1 -s 374x210 -threads 0 outMov.mp4

I've got the rest of my FFMPEG command line working great... Essentially what I am looking for is to have left/right audio channels both have the same audio in the output file. If there is an easier way to do this (convert to 2 mixed mono channels?) I am all ears!!

Thank you for your help!

Était-ce utile?

La solution

The audio filters have a different sintax on FFMPEG. You can pan audio channels without create a mixdown.

Using your example:

ffmpeg -f lavfi -i "amovie=inMovie.mov,pan=stereo: c0=c0+c1: c1=c0+c1" -i inMovie.mov -map 0:0 -map 1:0 -vcodec libx264 -vpre medium -b 320k -pass 1 -s 374x210 -threads 0 -acodec libfaac -ab 64k outMov.mp4

Autres conseils

I don't have a command reference handy at the moment, but I would use FFMPEG to mixdown to mono, and then convert back to stereo. This should give you the results you need.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top