When I've needed to mutiplex similar files before, I've always found TMPGEnc to be useful, but as you say you were not getting acceptable results with it in this case. Are the audio and video streams of the same length? It is possible that TMPGEnc will only accept audio streams with specific bit rate and frequency attributes for a corresponding video stream, i.e. MPEG-1 352x240 29.97fps CBR 1150kbps, Layer-2 44100Hz 192kbps and if the audio stream does not conform to those requirements TMPGEnc will not proceed.
Wedge009 said:
Okay, I downloaded VirtualDubMod which can open the MPEG-2 M2V video stream. I then added the WAV file using the Streams->Stream List menu option. But after that, I don't know what to do. Also, when I try to play back the two streams, the video plays way too fast. When I tried adjusting the frame rate to match the audio, the video comes out choppy and is still ahead of the corresponding audio.
AFAIK with Virtualdub(Mod) you will need to process (e.g. compress into XviD/DivX) the two streams into an .avi or .mkv (Matroska) container and cannot simply multiplex into MPEG-1/2 format, which the .m2v file would natively support without further compression.
Once, you've opened the M2V stream and the WAV file within the Streams->Stream List menu - you could try (assuming the frame rates don't match up) setting the
frame rate to change so audio and video durations match --> VIDEO Menu --> Frame Rate and then within the STREAMS-->Stream List Menu, right-click on the audio stream and click
Interleaving, then unselect
offset audio to maintain a/v sync.
To encode the file using XviD (1.0.3) for example, follow these steps:
1. Video Menu--> Compression--> Select Codec (XviD MPEG4 Codec) --> Configure
2. Within config dialog box select Encoding Type - Two pass - 1st pass --> press OK --> OK
3. File Menu --> Save As --> Select Don't run this job now... --> name file (e.g. test-encode-xvid-pass1.avi) and select save directory --> OK
4. Again, Video Menu--> Compression--> Select Codec (XviD MPEG4 Codec) --> Configure
5. Within config dialog box select Encoding Type - Two pass - 2nd pass --> Within
Target Bitrate insert 2000 (kbps - variable depending on content -- should be more than sufficient for SD resolution content) press OK --> OK
6. Again, File Menu --> Save As --> Select Don't run this job now... --> name file (e.g. test-encode-xvid-pass2.avi -- this file must be different to the first pass file name) and select save directory --> OK
7. File Menu --> Job Control (Or Press F4) --> Select Job1 (should be first pass encode) --> Press Start
8. Wait until encoding complete -- pass2 will be the complete file.
If neccessary, you could also compress the audio steam by right-clicking the stream and setting it to Full Processing instead of Direct Stream Copy and then set compression attributes as required. You would need to do this for each pass before saving the settings for that pass to disk (Save As...). However, you could alway encode the audio at a later time once the final encode is complete. I have also omitted a number of configuration settings from the XviD config, but with default settings you can produce very acceptable results -- depending on the video content (interlaced/progressive, cartoon, SD/HD, etc) one can fine tune the encoding config quite a bit with custom matrixes and other tweaks.
Hope this helps!
Cheers,
BrynS