Log in

View Full Version : How to mux Avi with mp2?


soujir0u
6th February 2002, 05:31
Can I mux a mp2 (vcd format) audio file into an avi file?

Chibi Jasmin
6th February 2002, 16:42
Now, if your mp2 file is CBR and if it plays in WMP, there's no reasons why it wouldn't work exactly the same way as for CBR mp3. The only problem is to first encapsulate the .mp2 file in a .wav one (i.e. just add correct WAV-headers).

A simple way to do it is to use GraphEdt (@Doom9 : following belongs to some How-To page on your site I think)

------------------------------------------------------------

- verify that the file plays in WMP.
- Start GraphEdt
- Insert the 'File Source (Async.)' filter and select your .mp2 file (let's assume it's toto.mp2)
- Insert the 'MPEG-I Stream Splitter' (and connect its input to the output of the previous one)
- Insert the 'WAV Dest' filter (and connect its input to the output of the previous one)
- Insert the 'File writer' and choose a target filename (I suggest toto.mp2.wav so that you don't confuse with uncompressed waves)
- Hit the play button

Now, you have a WAV file on your disk that you can use in VirtualDub (or Nandub of course), just like you can use WAV-encapsulated CBR mp3 files.

------------------------------------------------------------

Note : I tested it, it works, that is, I've got a video and a mp2 audio stream in an AVI file which played ok in WMP (both audio and video were smooth). But I couldn't check for other possible problems like gradual desynchs. Mirekpr, please tell us about your experiments, thanx.

---

Demultiplexing audio from MPEG Program Streams work the same way!

soujir0u
7th February 2002, 02:14
Wow, thanks. Is the resulting avi file able to play in non-directshow players? If I do this with CBR mp3s, I won't get that invalid header thing that Nandub does right?

soujir0u
7th February 2002, 02:30
Hey I found that I can use Avimux in Graphedit to directly mux the mp2 with the avi. But halfway through it'll give an error message "Graph could not change state. No time stamp has been set for this state.", but the resulting file is playable half-way, then the video stops but the audio continues... Anyone know how to fix this problem?