PDA

View Full Version : How do I demux an MP3 from a DiVX file?


dvdyke
11th December 2001, 04:59
Do not suggest VirtualDub or Nandub etc. Although you can save as a wave file on the file menu and rename it to .MP3 It saves it with it's wave file header. I need to save it back as an original MPEG1 Layer III file so I can apply MP3AMP on it (MP3AMP amplifys the volume without recompressing the MP3). But at present MP3AMP reports any files I saved in VirtualDub/Nandub as non-valid layer III MP3 files. Also if played in Winamp then viewing the file information it thinks it's MPEG1 layer 1.

I tried to hex edit the wave riff header out but it still doesn't seem to work.

Any ideas?

Corrado
11th December 2001, 13:35
Quite strange.

I just made a "save WAV" from Nandub from an AVI with VBR MP3 audio.

The output is a MPEG-1 Layer-3 file (though the wav extension, it has no WAV header, it's recognised as MPEG from Winamp - both with WAV and MP3 extension). In fact, I couldn't strip any wav header with WAVMP3 program.

If I rename it as *.MP3, it just shows as a normal MP3 file (Winamp file info, but also you can mux it with NanDub into other AVI movies).

Corrado

Nic
11th December 2001, 15:28
U could try graphedit....

i.e.
File Source (ASync) -> AVI Splitter -> Dump Filter

(if you download graphedit from Doom9 it comes with the dump filter)

Im not sure if it'll work but its worth a try.

-Nic

DSPguru
11th December 2001, 15:56
Originally posted by Corrado
The output is a MPEG-1 Layer-3 file (though the wav extension, it has no WAV header, it's recognised as MPEG from Winamp - both with WAV and MP3 extension). In fact, I couldn't strip any wav header with WAVMP3 program.

the fact WinAmp plays the wav file, doesn't mean it doesn't have wav header.
in fact, if you pay attention to "Header found" at "MPEG info" on WinAmp, you'll probably see that its' value is bigger than 0, while in "regular" MP3 file, this could be equal to zero

dvdyke
11th December 2001, 21:35
The Graphedit dump filter approach worked perfectly thanks! Damn fast too.

ChristianHJW
13th December 2001, 11:38
... if you use Vdubs 'save WAV' function and set 'audio' to 'Direct Stream Copy' it will be saved with a .WAV extendion but not with a WAV header ... after renaming it should still be a normal MP3 file ... i never heard of any problems when using this function ...

Corrado
13th December 2001, 17:09
Hi,

I made some test that might be interesting:

Starting file: DIvX4 avi with VBR MP3 sound (encoded with Lame 3.89)

Saved CONTACTWAV.WAV from Nandub (tried saving WAV with .wav extension or with .mp3 extension, they're EXACTLY the same file, of course: you can rename the .wav into .mp3 later and have the same result. This seems obviuos but was questioned in another forum).

Length of clip in Nandub: 120000ms (2 minutes).

Then:
-I couldn't strip any WAV header from the WAV file (WaveMp3 says it's "not a valid MPEG Layer III Wav file")
-I created a copy and renamed "CONTACTMP3.MP3"
-I added a riff/wave header with WaveMp3 to "CONTACTMP3.MP3" and renamed it "CONTACTMP3 WAVED.WAV" (this time it worked)
-I stripped the wav header again from the last file and the output file was named "CONTACTMP3 WAVED AND STRIPPED.MP3"

Then I opened all the files in WinAmp and:

-all files played well and for the correct 2 minutes duration, but:
-the original WAV shows a length of 1'43" in the playlist
-the renamed MP3, the "waved" and the "waved-stripped" show 6'55"

-the files have different figures in the INFO box, (I'm attaching the screenshot of the 4 headers, in the right order)

Looking at detail:
-Original Wav: 1662178 bytes, 15997Bytes/sec, Block Align 1152
-Renamed Mp3: 1662178 bytes, Header found at 58bytes
-Waved: 1662262 bytes, 4000Bytes/sec, Block Align 1
-Striped: 1662248 bytes, Header found at 0bytes

Conclusions:

1) The second file (.WAV renamed to .MP3, or file saved as .MP3 from Nandub) has some sort of (WAV?) header, as dvdyke wrote, although it's can't be stripped with WaveMp3 (who's out of WAVE standards? Nandub or WaveMp3....?)

2) The last file (after renaming to MP3, adding Wave header and stripping it) should be a "regular" MP3 file, a part from the fact that WinAmp doesn't recognize the right duration (but this happens often with VBR MP3 files and WinAmp playlist, doesn't it?)

Hope this may help, although doesn't clarify a lot of doubts, like the difference in the two wave headers...

Corrado

Corrado
13th December 2001, 17:10
OOOps, here the attachment:

(why can't I see it?)

ProfDrMorph
13th December 2001, 17:28
OOOps, here the attachment:
(why can't I see it?)
You won't see any attachments unless an admin or moderator permits it. I think next time one of them logs in or sees this thread he'll get a notice.