Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > DVD2AVI / DGIndex

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th April 2010, 10:46   #1381  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
Oops, not getting too far, HCenc23 & 24beta all throw an error when using NV per the script below. Vdub opens the script and can scroll OK. May I seek suggestions on how to do away with the error and consequential exiting of HCenc ?

XP-SP3, fully patched. Latest Nvidia drivers. Latest NV download. Intel Q9450, 4Gb, 8800GT card.
Source mpeg2:
Quote:
File Name: G:\HDTV\AFL\q2.mpg
File Size: 2640592896 ( 2.46 GB )
Program Duration: 00:29:13.00
File Type: PS - MPEG2
Encoding: MPEG2
Video stream Id: xE0
Encoding Dimensions: 1440 x 1080
Display Size: 1440 x 1080
Aspect Ratio: 16:9
Frame Rate: 25.00 FPS
Bit Rate: 9.416 Mbps
VBV_Buffer: 888 KB
Profile: Main/High
Progressive: Prog or Int
Chroma: 4:2:0
Audio Format: 5.1
Audio Stream Id: AC3: 0 (x80)
Audio Bit Rate: 384 Kbps
Audio Sampling Rate: 48000 Hz
TS Mux Rate (bps): -1
Est. video bit rate: 11.200 (Mbps)
Code:
SetMTmode(mode=5,threads=4) # start with mode=5 forAVIsource http://forum.doom9.org/showthread.php?p=1067216#post1067216 
SetMemoryMax(256)                    
LoadPlugin("C:\SOFTWARE\DGindex\DGMultiDecodeNV.dll")  
LoadPlugin("C:\SOFTWARE\DGindex\DGDecode.dll")  
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\NNEDI2.dll")  
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\Yadifmod.dll")  
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\WarpSharp.dll")  
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\aWarpSharp.dll")  
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\mt_masktools.dll")  
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\mvtools2.dll")  
#LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\RemoveGrain.dll")  
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\RemoveGrainSSE2.dll")  
#LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\Repair.dll")  
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\RepairSSE2.dll")  
#LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\RemoveDirt.dll")  
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\RemoveDirtSSE2.dll")  
Import("C:\Program Files\AviSynth 2.5\LimitedSharpenFaster.avs") 
Import("C:\Program Files\AviSynth 2.5\Deblock_QED_MT2.avs") 

DGMultiSource("G:\HDTV\AFL\HD-sharpen\q2.dgm",deinterlace=0) 
#DGMultiSource("G:\HDTV\AFL\HD-sharpen\q2.dgm",deinterlace=2,resize_w=720,resize_h=576) #deinterlace=2 means double rate deinterlacing 
AssumeFPS(25) 
AssumeTFF()  
#SetMTmode(mode=2,threads=4) # mode=2 for temporal multi-threading (interleaved frames) 
AssumeTFF() 
yadifmod(mode=1, edeint=nnedi2(field=-2)) #mode=1 means double framerate,field=-2 means double rate (alternates each frame) 
Lanczos4Resize(720,576) 
LimitedSharpenFaster(smode=4,strength=100) 
AssumeTFF() #choose the SAME field order like before deinterlacing 
SeparateFields().SelectEvery(4,0,3).Weave() #reinterlace. 
AssumeTFF() #choose the SAME field order like before deinterlacing 
SetPlanarLegacyAlignment(True) 
Distributor() # use this when using HC and SetMTmode, per http://forum.doom9.org/showthread.php?p=1063622#post1063622
edit: Well, that's strange, Vdub worked with it yesterday. First time after reboot and after trying HCenc, I opened it in Vdub and it threw this error

Ran Vdub again and it worked fine if a bit slow. Any help appreciated.

edit2: changed setmtmode to threads=1 ... no change

Last edited by hydra3333; 9th April 2010 at 10:58.
hydra3333 is offline   Reply With Quote
Old 9th April 2010, 13:18   #1382  |  Link
JoeH
Registered User
 
Join Date: Jan 2009
Posts: 251
I use DGIndexNV + AVFS to edit H264 AVS files in Sony Vegas. For rendering it is fantastic, and goes over 25% faster than if I use an intermediate codec.

But, Sony Vegas Pro draws the thumbnails on the timeline quite slowly - it takes about 10 seconds to draw the timeline. If I need to move around the timeline a lot, this is a serious problem. If I use an intermediate codec it basically paints the thumbnails on the timeline instantaneously, but of course requires serious disk space.

So, this is a question / feature request about DGIndexNV. I don't know if the cause of the slowness is that DGIndexNV is not optimized for the type of quick "seeking" throughout an entire file that timeline thumbnails require, or if my GT 9500 is simply too slow for this type of application, or if AVFS is causing a bottleneck.

But, I wanted to throw this problem out here to see if you, neuron2, or anyone else had any ideas if there is anything I can do to improve the performance, or if this is something DGIndexNV could be improved on ("quick seeking", I guess), to suggest it as a feature request.
JoeH is offline   Reply With Quote
Old 9th April 2010, 14:10   #1383  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Seeking speed is determined by the keyframe interval, so you should encode with smaller GOPs. How big are your GOPs (how many frames between keyframes)? I've seen people using very large numbers here. That's better for compression but worse for seeking.
Guest is offline   Reply With Quote
Old 10th April 2010, 00:43   #1384  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
Oh. It works only with ALL of the MT code removed, even Distributor().
Fair enough, however I'd thought "threads=1" might be OK.
I must have misinterpreted the manual "2) multiple instances of the filter can be created" and thought using MT0.7 multithreading would be OK.

In my case, opening and doing things inside DGMultiSource I'd expect to be comparatively quick, however anything in code after that, eg deblocking and limitedsharpenfaster and re-interlacing, would not benefit from multithreading.

Do you think it's a NV type bug or a HC type bug (Vdub playing up seems to suggest NV) or even a bug at all ? Happy to report it elsewhere, just let me know.
hydra3333 is offline   Reply With Quote
Old 10th April 2010, 00:46   #1385  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Sorry I have no idea as I have never even touched any of that MT stuff.

(I hope to have more time for DG tools stuff when I wrap up the current physics paper I am writing.)
Guest is offline   Reply With Quote
Old 10th April 2010, 01:12   #1386  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
OK, hope the paper works out nicely for you !

For later: surprisingly, it crashes consistently with the MT stuff in BUT then ...
I remove all the MT code except Distributor() from the script and ran HCenc and it just did nothing literally -
and then when I killed that process and un-commented all of the MT code (threads=1, not 4) and ran it, the whole thing suddenly works fine.
But that only works if I've just previously done the only-Distributor()-line-and-kill-the-process 1st !
Replicated the behaviour.
Tried the same thing with threads=4 but it still crashes no matter what.

Seems suggestive of an initialization type bug somewhere or other
hydra3333 is offline   Reply With Quote
Old 10th April 2010, 02:40   #1387  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
Well, I'm happy with NVtools (even without multithreading available via MT0.7).

My really old PentiumD2 2.8Ghz/220GT-1gb achieves about 1/2 the processing rate for mpeg2 GPU deinterlacing/resizing and non-GPU deblocking/re-interlacing as does my Q9450/8800GT, with the exact same script. It should be a larger gap, but I think Trend anti-virus is sucking the life out of the q9450.

With comparing with equivalent scripts not using NV (although taking advantage of MT) the q9450 earns its money (likely the extra cores), in that it's about 3 to 7 times faster than the old D2 depending on the script.

Comparing reasonably equivalent scripts (obviously the deinterlacing will be different) on the old D2
GPU deinterlacing/resizing and non-GPU deblocking/re-interlacing = 4.3 fps
non GPU deinterlacing/resizing and non-GPU deblocking/re-interlacing = .8 fps

NV's GPU offloading gives older boxes a life after retirement.

Now, all I need is a GPU based deblocker

Last edited by hydra3333; 10th April 2010 at 02:48.
hydra3333 is offline   Reply With Quote
Old 10th April 2010, 17:36   #1388  |  Link
JeffBDVS
Registered User
 
Join Date: Jul 2009
Posts: 45
Quote:
Originally Posted by neuron2 View Post
@kebulek

Investigating...
Some AVCHD files I have will cause the same "Cannot find audio" error, and others from the same camera won't.

I'll PM soon you with a link to a sample clip.

-Jeff
JeffBDVS is offline   Reply With Quote
Old 10th April 2010, 21:53   #1389  |  Link
blazer003
Registered User
 
Join Date: Oct 2009
Posts: 15
So what are the steps to open files in Premiere CS3?

I have:
Installed DGNVIndex.
I index the mts file and save the project.
I have a template avs file that mixes the video and audio.
Code:
Source = DGSource("00023.dgi")
audio=NicAC3Source("00023 PID 1100 2_0ch 48KHz 192Kbps DELAY 0ms.ac3").ConvertAudioto16bit()
AudioDub (Source, audio)
I start CUVidServer.exe

But here's the problem. I can import one of my DGDecode avs scripts into Premiere just fine. The video plays wonderfully. Way better than just playing an AVCHD file in Premiere CS4.

However, I try to import a second DGDecode AVS file and Premiere hangs. If I just let it sit there a second it starts trying to conform the audio and hangs. If I click on the file it tries to load it and Premiere hangs. I have to end task to close it out.

Does this happen to anyone else? Do I need another program? Is there something I'm doing wrong that you can see? If you need more nifo just let me know.

Last edited by blazer003; 10th April 2010 at 22:03.
blazer003 is offline   Reply With Quote
Old 10th April 2010, 22:02   #1390  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Try using DGMultiDecodeNV() instead of DGDecodeNV(). Kill the CUVID server and try that.
Guest is offline   Reply With Quote
Old 10th April 2010, 22:30   #1391  |  Link
blazer003
Registered User
 
Join Date: Oct 2009
Posts: 15
Quote:
Originally Posted by neuron2 View Post
Try using DGMultiDecodeNV() instead of DGDecodeNV(). Kill the CUVID server and try that.
Perfect, thanks man for your lightning fast response. I appreciate everything you've done with these tools and for your help.

I realized once I read your post, I think I already knew this at one point, but somehow had forgotten along the way.

It works like a charm now. Thanks.
blazer003 is offline   Reply With Quote
Old 10th April 2010, 23:34   #1392  |  Link
blazer003
Registered User
 
Join Date: Oct 2009
Posts: 15
Ah crap, I have to take that last post back (not the part about appreciating the quick response work and help though...) Everything isn't working great. I imported 6 scripts into Premiere. Everything's find. I edit on one clip all I want, everything's fine. I can edit two clips and everything's fine. But now, if I click on a 3rd clip, I get this error.


I can repeat this error by getting back into premiere and clicking on 3 avs scripts in the bin. As soon as I click that 3rd script I get the error. I tried clicking one script, then clicking an AVI I have loaded, then clicking another script, and then another AVI and then the third script and this error pops up instantly. I was taking my time between clicks too, it wasn't like I was just rapidly clicking on after the other.

Any time I select a third script it seems it throws out the error.

Last edited by blazer003; 10th April 2010 at 23:38.
blazer003 is offline   Reply With Quote
Old 11th April 2010, 01:41   #1393  |  Link
linyx
Un-Registered User
 
linyx's Avatar
 
Join Date: Mar 2008
Location: Audio Stream - 0x80
Posts: 341
@blazer003
I'm fairly certain that means your card cannot handle decoding 3 clips at once. I could be wrong, but DGSource with CUVIDServer might fix it.
linyx is offline   Reply With Quote
Old 11th April 2010, 01:57   #1394  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
You're limited by the memory on your Nvidia card. That's why I recommend people to get the big memory versions, 1 or 2GB.
Guest is offline   Reply With Quote
Old 11th April 2010, 02:04   #1395  |  Link
blazer003
Registered User
 
Join Date: Oct 2009
Posts: 15
I see, do any Premiere users know a way to flush those previous clips out of the memory? In my case I'm working on right now, I'm really only editing one at a time. (Long clips of a talk that I'm editing in with HDV footage.)
blazer003 is offline   Reply With Quote
Old 11th April 2010, 02:45   #1396  |  Link
JeffBDVS
Registered User
 
Join Date: Jul 2009
Posts: 45
Quote:
Originally Posted by blazer003 View Post
I see, do any Premiere users know a way to flush those previous clips out of the memory? In my case I'm working on right now, I'm really only editing one at a time. (Long clips of a talk that I'm editing in with HDV footage.)
You could try making the unused script files offline (File | Make Offline). Then use File | Link Media when you need to edit them again. If that doesn't help, keep the unused ones offline and then save your project, close and re-open Premiere.

It'd be nice if Premiere had a Purge command like After Effects.

-Jeff
JeffBDVS is offline   Reply With Quote
Old 12th April 2010, 12:21   #1397  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
I'm doing something wrong or misunderstanding something, unless DGindex and DGIndexNV are doing different things ...

I'd expected the same frame number in each clip to be almost exactly the same. But after the 1st frame, they look to be out of sync by at least 1 frame for some reason I don't as yet fathom (it's easier to tell single-stepping frames in Vdub when a fade-in/out is happening).
Code:
dgi=DGMultiSource("G:\HDTV\AFL\compare\R3-HD-Q2.dgi",deinterlace=2,resize_w=720,resize_h=576)
dgi= dgi.HEIGHT==1088 ? dgi.cropbottom(8) : dgi
dgi=dgi.ScriptClip("""subtitle("dgi " + string(current_frame),size=25)""") 

D2V=MPEG2Source("G:\HDTV\AFL\compare\R3-HD-Q2.d2v",info=0,ipp=true,cpu=0).AssumeFPS(25).AssumeTFF() 
d2V= d2v.HEIGHT==1088 ? d2v.cropbottom(8) : d2v
D2V=D2v.yadifmod(mode=1, edeint=D2V.nnedi2(field=-2)) 
D2V=D2v.Lanczos4Resize(720,576) 
D2V=D2V.ScriptClip("""subtitle("D2V " + string(current_frame),size=25)""") 

INTERLEAVE(D2V,dgi)
SetPlanarLegacyAlignment(True)

Same source mpeg2 1440x1080i25 TFF.

Clarification welcomed.

Last edited by hydra3333; 12th April 2010 at 12:24.
hydra3333 is offline   Reply With Quote
Old 12th April 2010, 14:20   #1398  |  Link
JoeH
Registered User
 
Join Date: Jan 2009
Posts: 251
Quote:
Originally Posted by neuron2 View Post
Seeking speed is determined by the keyframe interval, so you should encode with smaller GOPs. How big are your GOPs (how many frames between keyframes)? I've seen people using very large numbers here. That's better for compression but worse for seeking.
That makes sense. I'm not quite sure about how to determine the GOP of already existing files, but I see that at least MeGUI defaults to very high GOP numbers, and I imagine the files I am editing are pretty similar. I'll run some tests recoding with low GOP numbers, but my hope is to use original videos, and thus avoid recoding all together.

Do you think getting a faster video card (I have a 9500 GT) would make much difference? If so, what would be more important - processor MHz or number of "stream processors" it can handle?
JoeH is offline   Reply With Quote
Old 12th April 2010, 15:46   #1399  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by hydra3333 View Post
I'm doing something wrong or misunderstanding something, unless DGindex and DGIndexNV are doing different things ...
Get rid of all the filtering other than the source filters and then advise if you still see an issue. If so, post the script and provide a sample stream I can use to duplicate the issue.
Guest is offline   Reply With Quote
Old 12th April 2010, 15:48   #1400  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by JoeH View Post
Do you think getting a faster video card (I have a 9500 GT) would make much difference? If so, what would be more important - processor MHz or number of "stream processors" it can handle?
Neither will make a big difference. It's the VP engine speed that is important and that is not that different from card to card now (leaving out the ancient cards).
Guest is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:11.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.