|
|
| S_O |
| Posted: Nov 30 2002, 01:06 PM |
 |
|
Vdubmod Alpha Testing Team
  
Group: Vdubmod Alpha Testing Team
Posts: 102
Member No.: 57
Joined: 25-July 02

|
Long time ago had an small (5MB) MPEG-file, but because it was still too big to sent it per email I thought transcode it to DivX (XviD didnīt exsisted) with VirtualDub. I opened the file in VirtualDub, the file could be transcoded without any problems, but the sound was terrible (too load with lotīs of noise in it). I thought problem with the radium mp3-codec, but when I played the file in VirtualDub I had the same problem. In WMP the file played perfect. Some time ago I got the same problem again I lookd for the problem: VirtualDub does not support Layer 1 audio correctly. But I thought, how uses layer 1? demuxed the mpa and decoded by another tool and used wav-source. But know I had again a problem with MPEG, I got sync errors while playing: VirtualDub does not support VBR-Audio in MPEG! And again, in WMP it works perfect. The only audio in MPEG supported by VirtualDub is MP2-CBR and MP3-CBR. So I guess itīs better to replace NekoAmp with another MPEG-Audio decoder: MAD (GPL): http://www.mars.org/home/rob/proj/mpeg/ or MPG123 (LGPL): http://www.mpg123.de/ |
 |
| fccHandler |
| Posted: Nov 30 2002, 05:13 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
Why not just fix NekoAmp's Layer I code? (Layer I is quite simple.) Anyhow, replacing NekoAmp will not fix the VBR problem. For that you'll need to rework the MPEG audio parser in Mpeg.cpp.
-------------------- May the FOURCC be with you... |
 |
| phaeron |
| Posted: Nov 30 2002, 10:16 PM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
The parser shouldn't have a problem with VBR, because it simply steps the audio stream, recording the position and size of each frame it finds. The decoder similarly only processes frames passed to it. I should note, however, that the MPEG-1 standard does not require layer I/II decoders to handle bitrate switching in a stream -- only layer III decoders do. |
 |
| fccHandler |
| Posted: Nov 30 2002, 11:55 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
Thanks, phaeron, I stand corrected. VirtualDub's MPEG audio parser should be able to correctly parse VBR audio.
But for testing purposes I used LAME and TMPGEnc to make my own MPEG-1 video with VBR (actually, ABR) MP3 audio, and when I tried to view it in VirtualDub I got "MPEG audio decode error: not enough data to decode frame." IIRC that's from NekoAmp. As usual, the video plays fine in WMP. I can even seek through the video without sync problems (which surprised me)!
I also verified that NekoAmp definitely doesn't like Layer I audio, it comes out sounding really ugly.
Maybe replacing ol' NekoAmp isn't such a bad idea after all...
-------------------- May the FOURCC be with you... |
 |
| S_O |
| Posted: Dec 1 2002, 12:29 AM |
 |
|
Vdubmod Alpha Testing Team
  
Group: Vdubmod Alpha Testing Team
Posts: 102
Member No.: 57
Joined: 25-July 02

|
| QUOTE | But for testing purposes I used LAME and TMPGEnc to make my own MPEG-1 video with VBR (actually, ABR) MP3 audio, and when I tried to view it in VirtualDub I got "MPEG audio decode error: not enough data to decode frame." IIRC that's from NekoAmp. ... I also verified that NekoAmp definitely doesn't like Layer I audio, it comes out sounding really ugly.
| Exactly what I said, and itīs a problem with NekoAmp, see the readme-file: "NekoAmp doesn't decode Layer I, VBR, or MPEG-2 files." MAD decodes Layer I, II and III with VBR or even freeformat and itīs GPL. They latest beta of MPG123 can do that, too. But I donīt know which is faster, better error handling etc.
| QUOTE | As usual, the video plays fine in WMP. I can even seek through the video without sync problems (which surprised me)!
| MPEG-1 support in windows is very good, even Layer III VBR works without any problems.
| QUOTE | | MPEG-1 standard does not require layer I/II decoders to handle bitrate switching in a stream -- only layer III decoders do. | NekoAmp is an Layer II and III Decoder, so it should VBR to be a decoder within the standards. |
 |
| fccHandler |
| Posted: Dec 1 2002, 06:25 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
| QUOTE (S_O @ Nov 30 2002, 08:29 PM) | ... itīs a problem with NekoAmp, see the readme-file: "NekoAmp doesn't decode Layer I, VBR, or MPEG-2 files."
|
The readme file is outdated compared to the source; NekoAmp certainly does attempt to decode Layer I and (to some extent) MPEG-2.
After spending all day on this I figured out why Layer I decoding is faulty, and it has to do with the dequantizing of the sample values. It wasn't too difficult to fix. (If you really want the gory details, send me a PM.)
The problem with Layer III VBR audio is a bit more complex, and I'm not sure why it fails.
It should work, but doesn't.
Any ideas, anyone?
-------------------- May the FOURCC be with you... |
 |
| phaeron |
| Posted: Dec 1 2002, 07:23 AM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
I am not going to link in another third-party library for MPEG audio decoding, end of story. I am going to rewrite all third-party code currently in the application and do not intend to backpedal on that in any way. If you think it is trivial to drop in libraries into an application and have them work, you need more experience in software development.
As for the layer I VBR issue, the exact wording in the standard is "the decoder is not required to support a continuously variable bitrate when in Layer I or II." That NekoAmp can decode layer II or III is irrelevant when dealing with layer I audio.
As for the layer III VBR problems, it could be due to the code in mpeg.cpp that backs up in order to ensure the bit reservoir is full enough for the target frame to be decoded. That code, IIRC, assumes CBR. |
 |
| fccHandler |
| Posted: Dec 1 2002, 08:02 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
| QUOTE (phaeron @ Dec 1 2002, 03:23 AM) | I am not going to link in another third-party library for MPEG audio decoding, end of story.
|
Well, in that case let's really fix NekoAmp and Mpeg.cpp (as I originally suggested )!
I got Layer I working great; I just don't understand why Layer III VBR fails.
If I come up with anything sensible I'll post it here.
-------------------- May the FOURCC be with you... |
 |
| S_O |
| Posted: Dec 1 2002, 11:30 AM |
 |
|
Vdubmod Alpha Testing Team
  
Group: Vdubmod Alpha Testing Team
Posts: 102
Member No.: 57
Joined: 25-July 02

|
| QUOTE | | If you think it is trivial to drop in libraries into an application and have them work, you need more experience in software development. | Iīm learing c++ at the moment, I know how difficult it is even to create something very basic that works and wonīt crash. VirtualDub is very complex and very stable, you did a great job!
| QUOTE | | As for the layer I VBR issue, the exact wording in the standard is "the decoder is not required to support a continuously variable bitrate when in Layer I or II." That NekoAmp can decode layer II or III is irrelevant when dealing with layer I audio. | Layer I VBR? I only tested layer II VBR and layer III VBR. Never seen a layer I VBR Encoder. There is a general VBR issue and a general layer I issue.
| QUOTE | | I got Layer I working great; I just don't understand why Layer III VBR fails. | Great! Did you got Layer II VBR working, too? Could you post the files you corrected? (and could soemone tell me how to compile VirtualDub?? I canīt get it working, the command verinc cannot be found, I downloaded the buildtools-src and extracted the files in the same directory, but it doesnīt work) I tested what happens with a VBR-mp3 without bit reservoir, the same error. There are even problems to detect the audio format, in the info dialog the audio-format: "44KHz mixed stereo, 128Kbps layer". Just layer, no number behind it. Also it says there are 926 audio frames in it and the size is 378K, but the mp3 has 1248 frames and is 570KB. Does nekoamp or virtualdub detect that? |
 |
| fccHandler |
| Posted: Dec 2 2002, 01:35 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
| QUOTE (S_O @ Dec 1 2002, 07:30 AM) | Great! Did you got Layer II VBR working, too? Could you post the files you corrected? (and could soemone tell me how to compile VirtualDub?? |
At the moment VBR is still broken AFAIK. But I know that Avery Lee is working on a new version of NekoAmp, and has already fixed Layer I decoding. (I guess that saves me from having to post my sloppy C++ code!)
Why exactly does your VirtualDub code fail to compile? Look for anything listed as an "error" in the output window, and concentrate on that. Also, read the "hello.txt" in the project. "verinc" and "mapconv" aren't strictly necessary to compile VirtualDub, and you are safe to delete the pre-link and post-build steps (which call these tools).
Make sure you have installed the latest C++ service pack(s).
-------------------- May the FOURCC be with you... |
 |
| S_O |
| Posted: Dec 2 2002, 04:53 PM |
 |
|
Vdubmod Alpha Testing Team
  
Group: Vdubmod Alpha Testing Team
Posts: 102
Member No.: 57
Joined: 25-July 02

|
| QUOTE | At the moment VBR is still broken AFAIK. But I know that Avery Lee is working on a new version of NekoAmp, and has already fixed Layer I decoding. (I guess that saves me from having to post my sloppy C++ code!)
| Great! Is he the author of NekoAmp? I couldnīt find anything about it, only toghether with VirtualDub.
| QUOTE | Why exactly does your VirtualDub code fail to compile? Look for anything listed as an "error" in the output window, and concentrate on that. Also, read the "hello.txt" in the project. "verinc" and "mapconv" aren't strictly necessary to compile VirtualDub, and you are safe to delete the pre-link and post-build steps (which call these tools).
Make sure you have installed the latest C++ service pack(s). |
Iīve read the file, unfortunately I donīt know how to remove them, anyway I would more like to let them in the project, what do I need to do with the files? I got VC++ 6 Ent-Version and the ICL6 compiler. Also SP5 and the processor pack are installed. |
 |
| S_O |
| Posted: Dec 2 2002, 09:24 PM |
 |
|
Vdubmod Alpha Testing Team
  
Group: Vdubmod Alpha Testing Team
Posts: 102
Member No.: 57
Joined: 25-July 02

|
Found another problem with MPEG: -More than one audio stream causes sync errors, video is ok -More than one video stream causes a completly scrambled/mixed picture of both streams, also the length of the video wonīt get displayed correctly. Of course both toghether causes both. And, in WMP it works perfect, Iīm even able to change the stream without any problems. If the mpeg-parser already get reworked this could be fixed, too. Because VDub cannot handle both video/audio streams a little selector when video is loaded would be nice. Also a little addition that if the mpeg doesnīt end correctly you have open it agin and enable accept partial streams, just warning dialog, like with partial avis.
Edit: I would like know what happens when I open an MPEG with two video streams and two vbr layer I audio streams...
|
 |
| fccHandler |
| Posted: Dec 2 2002, 10:12 PM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
@S_O:
AFAIK VirtualDub doesn't support multiple A/V streams for MPEG-1 or AVI. One video, one audio, that's all you get! Also I suspect that implementing such support would be more trouble than it's worth. Maybe something to think about for the VirtualDubMod team, though...
BTW, yes Avery Lee is the author of NekoAmp and VirtualDub.
BTW, you never said why your VirtualDub won't compile.
-------------------- May the FOURCC be with you... |
 |
| fccHandler |
| Posted: Dec 3 2002, 05:40 AM |
 |
|
Administrator n00b
  
Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02

|
| QUOTE (fccHandler @ Dec 1 2002, 04:02 AM) | If I come up with anything sensible I'll post it here.  |
I finally got MPEG VBR audio working; the problem is the MPEG audio parser, not NekoAmp. Sadly, this means you'll have to wait for yet another release of VirtualDub (assuming that Avery is inclined to fix it, of course).
-------------------- May the FOURCC be with you... |
 |
| S_O |
| Posted: Dec 3 2002, 01:39 PM |
 |
|
Vdubmod Alpha Testing Team
  
Group: Vdubmod Alpha Testing Team
Posts: 102
Member No.: 57
Joined: 25-July 02

|
| QUOTE | | AFAIK VirtualDub doesn't support multiple A/V streams for MPEG-1 or AVI. One video, one audio, that's all you get! Also I suspect that implementing such support would be more trouble than it's worth. Maybe something to think about for the VirtualDubMod team, though... |
But VirtualDub can handle avi with more tha one audio stream, it will only see first, but it works. Because reworking VirtulDub completly to handle more than one audio/video stream you need to select audio/video when the mpeg is loaded (a dialog would pop-up), to change the stream you need to open it again. So it only handles only one video/audio stream at the time.
| QUOTE | | I finally got MPEG VBR audio working; the problem is the MPEG audio parser, not NekoAmp. Sadly, this means you'll have to wait for yet another release of VirtualDub (assuming that Avery is inclined to fix it, of course). |
another release? Is 1.4.14 already finished? Couldnīt be both (layer 1 and VBR) fixed in 1.4.14?
| QUOTE | | BTW, yes Avery Lee is the author of NekoAmp and VirtualDub. | Althought the MPEG-Video Decoder? wow, I never realized that Avery spent so much work/time in VirtualDub, thank you very much!
| QUOTE | | BTW, you never said why your VirtualDub won't compile. |
Itīs german: Der Befehl "verinc" ist entweder falsch geschrieben oder konnte nicht gefunden werden. Translated: The command "verinc" is maybe not spelled correctly or could not be found. |
 |