I will tell you how I do this.
In avisynth there's a filter called Trim (you can read in Avisynth Documentation for better explanation), where you can select the frame 'from' you want to encode, and 'to' you want to encode:
Related to audio, it depends on your source audio. If already in wav, I usually load it in Audacity (
http://audacity.sourceforge.net/), under view change selection to Frames, and I select the audio based on the frames of video I already encoded. No syncing problems with this way.
If your source is not a wav, demux it, and you can load it in headac3he and convert to wav. After that, and depending on your destination, you will encode the trimmed audio to mp2 or ac3.
I believe that in avysinth there are also audio filters, but never used avisynth to trim the audio. Maybe anybody else...