Jump to content

Converting 2 channel DivX avi file to 5.1 DVDs?


Relic2K
 Share

Recommended Posts

Happy New Year;

I have been doing this for some time via Bloatware, but now I want to start doing it in Mandriva. Is there any software that can convert 2 channel audio divx movies into 5.1 channel DVDs ? Can this even be done ? Thanks in advance.

Link to comment
Share on other sites

You can't really go from 2 channels to 5.1 - you can, but all you'd get is 2 channels coming out 5.1 speakers (that is, it wouldn't be surround sound - front and back would be playing the same thing).

Link to comment
Share on other sites

I think what he is aiming for is convert a avi file that used divX for the sound to a mpeg (?), with the sound intact, rather than boost 2-channel audio to 5:1.

Thanks guys, Tyme had it right ... and that is pretty much what I thought to, but just wanted confimation :) The movies that are being downloaded or converted have to be true AC5.1 and can't be convert from AC2 to AC5.1.

Link to comment
Share on other sites

You can covert a 2 channnel audio track to surround audio. You'll need the following tools:

 

Latest sox -> http://sox.sourceforge.net

Latest multimux -> http://panteltje.com/panteltje/dvd/

Latest ffmpeg -> http://ffmpeg.sourceforge.net/

 

If your original audio track is ac3 2 channels

ffmpeg -i movie.ac3 movie.wav

Then extract left and right channels

sox -V movie.wav -r 48000 -c1 left.wav avg -l
sox -V movie.wav -r 48000 -c1 right.wav avg -r

Create the centre channel by mixing both left/right channels into one:

soxmix -V left.wav right.wav -r 48000 -c1 centre.wav

Create the LFE(Low Frequency Effect) or Sub/Bass channel:

sox -V -v 0.5 centre.wav lfe.wav lowp 150

Mix the channels together

multimux left.wav centre.wav right.wav left.wav right.wav lfe.wav -o movie_final.wav

and finally convert to ac3

ffmpeg -f s16le -ar 48000 -ac 6 -i movie_final.wav -ab 384 movie_final.ac3

 

You can use the following script to automate the process

#!/bin/sh

if [ -z "$1" ]; then
	echo "Usage -> $0 audio_file"
	exit
fi
ffmpeg -i $1 -f wav $1.wav
echo
sox -V $1.wav -r 48000 -c1 left.wav avg -l
sox -V $1.wav -r 48000 -c1 right.wav avg -r
soxmix -V left.wav right.wav -r 48000 -c1 centre.wav
sox -V -v 0.5 centre.wav lfe.wav lowp 150

mkfifo $1_final.wav
multimux left.wav centre.wav right.wav left.wav right.wav lfe.wav -o $1_final.wav &> /dev/null &
ffmpeg -y -f s16le -ar 48000 -ac 6 -i $1_final.wav -ab 384 $1.ac3

echo -n "Cleaning up..."
rm left.wav centre.wav right.wav lfe.wav $1.wav $1_final.wav
echo "Done!"

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...