Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

Pages: (6) 1 2 [3] 4 5 ... Last » ( Go to first unread post )
VirtualDub-MPEG2 1.6.19
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
pintcat
Posted: Sep 16 2007, 08:41 PM


Advanced Member


Group: Members
Posts: 142
Member No.: 18182
Joined: 19-February 06



The new build of VirtualDub-MPEG2 1.6.19 eats a lot of memory! I used it on an elementary mpeg2 stream ripped from a DVD and after parsing was finished VDub broke by telling me "Out of memory". Impossible!
So here is what I did: Fist I demuxed the elementary streams from a simple video DVD by using the good old SmartRipper. Then I tried to import the .m2v stream (720 x 576; 16:9; running time: about 100 min; size: about 4 GB) into VitualDub-MPEG2 like I used to do 100 times before. And all I got was this stupid error message. I have 1,5 GB RAM which should be enough actually, but just to be sure I tested the same video with 2 older versions (VDub-MPEG2 1.6.15 and VDub-Mod 1.5.xx) and they worked fine! Is this some kind of bug in the latest release or just some weird changes I do not understand?
 
     Top
fccHandler
Posted: Sep 16 2007, 10:26 PM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



Yes, memory usage increased as I explained in the changelog. To be exact, 8 bytes per video frame, 8 bytes per audio frame, and 8 bytes per PES packet. Currently, the changes are necessary to ensure a correct audio skew report in "File Information."

If the accurate skew report is unimportant to you, then you can just stick with this previous build. There weren't any other major changes between the two builds.

Alternatively, you could use DGMPGDec to process your DVD movie, and that is what I always recommend.

BTW, even for a 100 min. 4 GB m2v, I can't imagine the increase in memory use would be more than a couple of megabytes at most. I don't have any 4 GB m2v files lying around right now, but I'm curious how much additional memory is actually used, so I'll definitely check into this later.


EDIT: I just realized that an m2v file doesn't have PES packets or time stamps, so there may indeed be a bug happening here... I'll investigate.

This post has been edited by fccHandler on Sep 16 2007, 10:33 PM

--------------------
May the FOURCC be with you...
 
     Top
fccHandler
Posted: Sep 17 2007, 12:07 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



@pintcat:
You were right, it was a bug. You aren't actually running out of memory. Instead, you got that error because there isn't an error handler for the real problem (MPEG has zero frames), and the fact that it thought your .m2v had zero frames was the bug. This new build should fix it:

http://fcchandler.home.comcast.net/stable

--------------------
May the FOURCC be with you...
 
     Top
pintcat
Posted: Sep 17 2007, 05:57 PM


Advanced Member


Group: Members
Posts: 142
Member No.: 18182
Joined: 19-February 06



Yay, great support! I tested the new build and it did the job - thank you very much, fccHandler. And also thanx for advising DGMPGDec. I've already realized that SmartRipper does not always produce clean mpeg streams. So I did my 1st steps with this nice little proggy some time ago, but right now I'm pretty new to it and need more practice.
Now that we talking... I remember another problem I had regarding your wonderful AC3-ACM. Every time I use this codec to compress an audio track, there seem to be some kind of timing problem. Video and audio become asynchronous in a strange manner. I just noticed the same effect when accidentally used a variable bitrate on an audio track and try to re-open video and audio in any video editor. Can you imagine what I mean? I'm sure I've use a constant bitrate. Besides there is no option in VDub's audio encoding for using variable bitrates. Is there a trick how to cofigure this codec right? Or do you have any idea how to solve this?
 
     Top
fccHandler
Posted: Sep 17 2007, 06:58 PM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



I don't know. But if the streams are not clean, as you said, that could cause the audio and video to lose sync.

I wonder why you want to recompress the audio as AC-3. NTSC DVDs have AC-3 audio already, and you can just copy it over directly. If you must recompress, I would choose MP3 myself. Is there a reason you use AC-3?

The only other thing I can think of that might cause desync is changing the sample rate to 44100 Hz. Avoid using 44100 for AC-3 in AVI, because I think it produces variable sized blocks.

--------------------
May the FOURCC be with you...
 
     Top
pintcat
Posted: Sep 17 2007, 09:16 PM


Advanced Member


Group: Members
Posts: 142
Member No.: 18182
Joined: 19-February 06



No, this doesn't only happen with the video mentioned above, it happens with just EVERY video! I tried several formats like MPEG1 & 2, WMV/ASF and of course AVI. In most cases the input streams were correct and played fine in every player or editor. The problem appeared after encoding the audio with AC3-ACM.
Also, I never changed the sample rate, but I think the most videos I've tested used 44100 Hz in original so I used it for encoding. If this rate produces variable sized blocks, as you said, then maybe I should change it to 48000 Hz before or during the process. Would this avoid the problem? I think I have to check it a few more times.
Anyway thank you for your great help. You guys did a good and hard work and simply provide the best software around this planet! So I'll stop nagging around now. The reason I prefer AC3: My old DVD player (and some others too) likes it more than MP3 as audio tracks for videos.
 
     Top
fccHandler
Posted: Sep 18 2007, 05:53 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



I just tried loading a 5 minute VCD music video into VirtualDub-MPEG2, then I converted it to an AVI with AC-3 audio, using AC3ACM to compress the audio to 256 kBit/s 44100 Hz stereo AC-3. I didn't notice any sync problems in this case, but maybe 5 minutes isn't long enough for the desync to become apparent?

If you're still interested in pursuing this, I'll need to get a video from you that demonstrates the problem, including some step-by-step instructions so I can accurately reproduce what you are seeing.

--------------------
May the FOURCC be with you...
 
     Top
pintcat
Posted: Sep 19 2007, 07:51 PM


Advanced Member


Group: Members
Posts: 142
Member No.: 18182
Joined: 19-February 06



Yes, 5 minutes are quite short. You have to look very close to spot some delay. By the way, you don't have to convert the whole video. Just take some good working AVI and then only convert the audio to AC3 -> same effect.
I will see if I can arrange some test video in the next days to show you my problem (hopefully I'm not the only one being annoyed with this).
 
     Top
fccHandler
Posted: Sep 20 2007, 02:54 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



Nevermind the test video; I have reproduced a sync problem also. However, so far it only happens when I encode at 44100 Hz. If you know of a case using 32000 or 48000 Hz audio, I would be interested to see it.

I'm pretty sure it's because the 44100 Hz AC-3 audio blocks vary in size, so my previous warning still applies. Even so, the behavior is mighty peculiar, because the selected bitrate affects it significantly too...

For the music video I tested yesterday, I chose 256 kBit/s arbitrarily. But today I re-encoded the same video choosing 192 kBit/s, and the result drifted quite visibly out of sync within two minutes. Upon further investigation, using 256 kBit/s does produce desync, but it doesn't become obvious until after about six minutes.

It may be possible for me to fix the problem with 44100 Hz blocks, perhaps using the same trick Fraunhofer used in their MP3 codec. I don't know though, because I didn't write the AC-3 encoder myself; it was borrowed from the ffmpeg source code.

For now, my advice is to resample 44100 Hz to 48000 Hz when you encode your AC-3 AVIs.

--------------------
May the FOURCC be with you...
 
     Top
fccHandler
Posted: Sep 22 2007, 07:34 AM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



@pintcat:
I've released a new version of AC3ACM, and I think it will fix your sync problem. Let me know if it doesn't:

http://fcchandler.home.comcast.net/AC3ACM

--------------------
May the FOURCC be with you...
 
     Top
pintcat
Posted: Sep 23 2007, 03:34 AM


Advanced Member


Group: Members
Posts: 142
Member No.: 18182
Joined: 19-February 06



@ fccHandler: thank you for the effort. I will check this immediately. By now I have made some first serious tests with the old version and you were right: There's no sync problem with 48000 Hz. It seems I never tried that sampling rate with your codec before.
 
     Top
heustess
Posted: Sep 23 2007, 05:52 PM


Advanced Member


Group: Members
Posts: 67
Member No.: 21872
Joined: 5-August 07



Do you plan to upgrade the core to 1.7.4?

--------------------
http://heustess.com/
 
      Top
fccHandler
Posted: Sep 23 2007, 06:59 PM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



QUOTE (heustess @ Sep 23 2007, 01:52 PM)
Do you plan to upgrade the core to 1.7.4?

I had planned to, but now I'm hesitant. I found out last night that Avery's new 1.7.4 source code is a Visual Studio 2005 project, and I don't have VS2005 installed right now (nor do I want it).

Personally, I hated VS2005 the one time I tried it. On the other hand, I can understand (and even agree with) Avery Lee's switch to VS2005. Because VS2005 Express is free, now anyone can build their own VirtualDub, and that's very cool.

Avery says I can insert the code into a Visual Studio 6 project, but it may not be entirely safe. So for right now, I haven't decided what I'll do yet.

--------------------
May the FOURCC be with you...
 
     Top
phaeron
Posted: Sep 23 2007, 07:43 PM


Virtualdub Developer


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



While it is cool that VC++ Express 2005 is free, that's not actually the reason I migrated to VS2005.

I upgraded to VS2005 mainly because:

  • Better intellisense -- it sees macros and doesn't require you to build browse info.
  • Improved debugger -- visualizer support and symbol server support. You used to be able to use system symbols in VC6, but you had to download them manually, and it made VC6 leak enormous amounts of memory (~40MB per debugging session).
  • The compiler is vastly improved. Function templates actually work and a bunch of new intrinsics were added (including the fairly important BSWAP for Huffman decoding).
  • The standard library is improved. It has hash_map and hash_set, and doesn't have that _Charalloc() B.S. in std::allocator.
  • Many of the hugely annoying problems introduced in VS2002 were finally fixed.
  • It is required to work with many newer Microsoft SDKs, most notably DirectX and Platform SDK.


It does take a while to get used to VS2005, however, and there are some things that suck in VS2005 relative to VC6, particularly the dialog editor and the help. The IDE is noticeably slower as well.

I can work with you to either resolve issues with the back port to VC6 or to learn how to use VS2005 with a VC6 mindset. With regard to the former, the one thing that comes to mind is that there may be some uses of "%lld" that won't work. For the most part basic functionality does seem to work fine in the port, so there don't seem to be any major problems.

But yeah, to everyone else: this ain't a minor upgrade. In addition to the compiler switch, there's also about a year's worth of changes between 1.6.19 and 1.7.4. Please don't ask if he's going to sync to 1.7.x or when it would happen.
 
    Top
fccHandler
Posted: Sep 23 2007, 08:04 PM


Administrator n00b


Group: Moderators
Posts: 3961
Member No.: 280
Joined: 13-September 02



QUOTE (phaeron @ Sep 23 2007, 03:43 PM)
I can work with you to either resolve issues with the back port to VC6 or to learn how to use VS2005 with a VC6 mindset.

Thanks. I'll probably just bite the bullet and install VS2005.

I've read that VS6 and VS2005 will coexist peaceably. Has that been your experience also? I have a few hundred VB6 and VC6 projects, so that's my greatest concern about installing VS2005. I don't want to break my VS6.

--------------------
May the FOURCC be with you...
 
     Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
83 replies since Aug 4 2007, 02:51 AM Track this topic | Email this topic | Print this topic
Pages: (6) 1 2 [3] 4 5 ... Last »
<< Back to News / Announcements