As far as AC3 encoding goes, you should stay away from any and all free solutions, because their quality blows. Hard.
You'd be best off looking into one of the commercial AC3 encoders. For some more info / inspiration, check out
this (old) thread on hydrogenaudio.org
No members have liked this post.