Log in

View Full Version : DG NV tools


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 [49] 50 51 52 53 54 55 56 57 58 59 60 61 62 63

Guest
18th August 2010, 02:42
So try it and report your results!

krosswindz
18th August 2010, 02:52
So try it and report your results!

I was just trying to play around with it in my schools work station. I am able to see my SATA controller but not the Nvidia GPU. Which is extremely weird :confused:

alexcel
18th August 2010, 12:21
Dear Neuron

I am having trouble processing a Blu-ray rip. I have indexed the m2ts file and encoding to x264 using megui latest build.

The file index runs fine and then I create the avs script and begin enconding. Everything is running fine, but when enconding reaches around 1:47:00 in the timeline (the movie is 2:13:28 long) the cuvidDecodePicture() error appears.

Is it an error caused by the rip or is it a DG NV tools error?

The mediainfo stream data is:

Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : VC-1
Format profile : AP@L3
Duration : 2h 13mn
Bit rate : 25.1 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.505
Stream size : 23.4 GiB (94%)

Thnks for your support

Guest
18th August 2010, 12:44
Is it an error caused by the rip or is it a DG NV tools error? Hard to say. Please tell me the name and region of the BluRay so that I can buy it for testing. Alternatively, trim the M2TS (using the TS trim function) to isolate the problem part and post a link to it.

What is the error number given with the error popup?

alexcel
18th August 2010, 15:29
Hard to say. Please tell me the name and region of the BluRay so that I can buy it for testing. Alternatively, trim the M2TS (using the TS trim function) to isolate the problem part and post a link to it.

The disc is the spanish Invictus BR.

I'll trim the m2ts and post results

What is the error number given with the error popup?

It showed no error, only a popup with that message. The popup had a accept button, and pressing it the enconding continued until next error, which apperared every 3-5 frames until I aborted.

I forgot tomention that it indicated DGMultisource in the title part of the popup.

Thanks again

Zathor
18th August 2010, 17:13
I am having trouble processing a Blu-ray rip. I have indexed the m2ts file and encoding to x264 using megui latest build.

Which MeGUI build are you using? The latest stable (0.3.5.0) or development build (0.3.5.8)? I'm asking because there is a huge difference in the DGIndexNV builds (2013 <--> 2024).

alexcel
19th August 2010, 00:26
Which MeGUI build are you using? The latest stable (0.3.5.0) or development build (0.3.5.8)? I'm asking because there is a huge difference in the DGIndexNV builds (2013 <--> 2024).

I am using 0.3.5.8

I have demuxed vc1 stream to vc1 raw file using megui HD stream extractor (eac3to 3.24).

The file now encodes nicely, not a single error

So it must be caused by some m2ts info or structure that crashed DG NV Tools...:helpful:

Thanks neuron for suggesting the possible workaround, and zathor for your interest:thanks:

Guest
19th August 2010, 04:00
Thanks neuron for suggesting the possible workaround I didn't suggest a workaround. I asked for a trimmed stream, which you said you would provide. May I have that please?

hydra3333
19th August 2010, 12:36
I receive an error crash from x264 using the latest NV when I place this .bat file in a folder with one or more mpeg2 .mpg files and run it. Not sure why. It works with an equivalent non-NV dgindex version of the .bat file. Suggestions on how to prevent the crash are welcomed.

Some of the paths may need changing to suit you machine.

Yes I know it's awful .bat coding, but a quick cut'n'paste from here and there is easy.

@echo on
REM
REM convert all SD .MPG into .MP4, one at a time
REM
SET sourcePath=.\
SET DonePath=.\done\
MD "%DonePath%"

for %%f in ("%sourcePath%*.mpg") do (
CALL :dgindexNV "%%f"
)

for %%f in ("%sourcePath%*.dgi") do (
CALL :NV "%%f"
MOVE "%%f" "%DonePath%"
)
pause
exit

:dgindexNV
@echo on
REM SETLOCAL ENABLEDELAYEDEXPANSION
set PARF1=%~f1%
set PARF2=%~dpn1%
set parpath=%~dp1%
set pard2v=%~dpn1%.d2v
set pardgi=%~dpn1%.dgi
set PARtemp=%~1%-temp.MP4
set PARmp4=%~dpn1%.MP4
set PARAC3mp4=%~dpn1%.AC3.MP4
set PARMP2mp4=%~dpn1%.MP2.MP4
set parAC3=%~dpn1%.ac3
set parMP2=%~dpn1%.mp2
"C:\software\DGindex\DGIndexNV.exe" -i "%PARF1%" -a -o "%pardgi%" -e
@echo off
goto :EOF


:NV
@ECHO Start -----------------------------------------------------------------------------------------
@echo on
REM SETLOCAL ENABLEDELAYEDEXPANSION
set PARF1=%~f1%
set PARF2=%~dpn1%
set parpath=%~dp1%
set pard2v=%~dpn1%.d2v
set pardgi=%~dpn1%.dgi
set PARtemp=%~1%-temp.MP4
set PARmp4=%~dpn1%.MP4
set PARAC3mp4=%~dpn1%.AC3.MP4
set PARMP2mp4=%~dpn1%.MP2.MP4
set parAC3=%~dpn1%.ac3
set parMP2=%~dpn1%.mp2

SET theBitrate=2000

REM "C:\software\DGindex\DGIndexNV.exe" -i "%PARF1%" -a -o "%pardgi%" -e

IF EXIST "%parAC3%" DEL "%parAC3%"
FOR %%A in ("%~dpn1*ms.ac3") DO (
ECHO ------------------
ECHO Deleting "%parAC3%"
DEL "%parAC3%"
ECHO Renamnig "%%~A" to "%parAC3%"
MOVE "%%~A" "%parAC3%"
ECHO ------------------
)

IF EXIST "%parMP2%" DEL "%parMP2%"
FOR %%A in ("%~dpn1*ms.mp2") DO (
ECHO ------------------
ECHO Deleting "%parMP2%"
DEL "%parMP2%"
ECHO Renamnig "%%~A" to "%parMP2%"
MOVE "%%~A" "%parMP2%"
ECHO ------------------
)

SET avs1=%PARF2%.avs
echo SetMTmode(mode=5,threads=1) # start with mode=5 forAVIsource http://forum.doom9.org/showthread.php?p=1067216#post1067216 > "%avs1%"
echo SetMemoryMax(128) >> "%avs1%"
echo LoadPlugin("C:\SOFTWARE\DGindex\DGDecodeNV.dll") >> "%avs1%"
echo LoadPlugin("C:\SOFTWARE\DGindex\DGDecode.dll") >> "%avs1%"
echo LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\mt_masktools.dll") >> "%avs1%"
echo LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\mvtools2.dll") >> "%avs1%"
echo LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\unfilter.dll") >> "%avs1%"
echo #LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\RemoveGrain.dll") >> "%avs1%"
echo LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\RemoveGrainSSE2.dll") >> "%avs1%"
echo #LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\Repair.dll") >> "%avs1%"
echo LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\RepairSSE2.dll") >> "%avs1%"
echo #LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\RemoveDirt.dll") >> "%avs1%"
echo LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\RemoveDirtSSE2.dll") >> "%avs1%"
echo Import("C:\Program Files\AviSynth 2.5\LimitedSharpenFaster.avs") >> "%avs1%"
echo ##MPEG2Source("%pard2v%",info=0,ipp=true,cpu=6) >> "%avs1%"
echo ##MPEG2Source("%pard2v%",info=0,ipp=true,cpu=4) >> "%avs1%"
echo ##MPEG2Source("%pard2v%",info=0,ipp=true,cpu=0) >> "%avs1%"
echo DGMultiSource("%pardgi%",deinterlace=0) >> "%avs1%"
echo #DGMultiSource("%pardgi%",deinterlace=2,resize_w=%Width%,resize_h=%Height%) #deinterlace=2 means double rate deinterlacing >> "%avs1%"
echo #trim(1,-999999) # fix a double-framerate bug in NV per http://forum.doom9.org/showthread.php?p=1391556#post1391556 >> "%avs1%"
echo AssumeTFF() >> "%avs1%"
echo Assumefps(25) >> "%avs1%"
echo #LAST.HEIGHT==1088 ? cropbottom(8) : LAST >> "%avs1%"
echo #Separatefields() >> "%avs1%"
echo #LimitedSharpenFaster(smode=4,strength=100) >> "%avs1%"
echo #http://www.aquilinestudios.org/avsfilters/sharpeners.html#unfilter >> "%avs1%"
echo # HSharp and VSharp (-100 to 100) determine the amount of sharpening/smoothing to be >> "%avs1%"
echo # done in the horizontal and vertical directions respectively. >> "%avs1%"
echo #-100 gives the smoothest result, 100 the sharpest; 0 does nothing. >> "%avs1%"
echo #UnFilter(10,10) >> "%avs1%"
echo #Weave() >> "%avs1%"
echo #TRIM(0,1000) >> "%avs1%"

"C:\software\X264\x264.exe" --thread-input --threads 3 --profile high --level 4.1 --preset fast --interlaced --tff --no-cabac --bitrate %theBitrate% --sar 16:11 -o "%PARtemp%" "%AVS1%"

IF NOT EXIST "%parMP2%" "C:\software\ffmpeg\0-LATEST-BETA\bin\ffmpeg.exe" -i "%PARF1%" -y -ar 44100 -ac 2 -ab 256k -acodec mp2 -vol 1024 "%parMP2%"

IF EXIST "%parAC3%" "C:\SOFTWARE\MP4box\MP4Box.exe" -add "%PARtemp%" -add "%parAC3%":lang=eng -new "%PARAC3mp4%"
IF EXIST "%parMP2%" "C:\SOFTWARE\MP4box\MP4Box.exe" -add "%PARtemp%" -add "%parMP2%":lang=eng -new "%PARMP2mp4%"

DEL "%PARtemp%"
DEL "%parAC3%"
DEL "%parMP2%"
DEL "%avs1%"
DEL "%pard2v%"

REM SAR = DAR / PAR
REM for 16:9 720x576i use --sar=16:11 (most 4:3 are in 16:9 shell frame nowadays, so use this)
REM for 16:9 1440x1080i use --sar=4:3
REM for 16:9 1920x1080i use --sar=1:1
@echo off
@ECHO End -----------------------------------------------------------------------------------------
GOTO :EOF

Guest
19th August 2010, 13:13
I need the crash details, such as a DrWatson dump.

LeXXuz
19th August 2010, 19:58
neuron2,
I have a question about the use of Remote Desktop.

I realised that DGIndexNV does not work in a RD session, probably because the video driver can't be adressed directly. Like mentioned in the FAQ.
But what about a job already "in progress"?

Yesterday I accidently logged onto my workstation while a frameserving job to x264 was still in progress. The encode did not interrupt and ran to the end. I roughly checked the file afterwards and it seems that frameserving still worked, even while in a RD session.

Was I just lucky or does RD only "affect" acessing the video driver and will not interfere with an already running process?

Would be nice to know if I could use RD while frameserving is in progress, just like I used to with "normal" DGindex.

Sharktooth
19th August 2010, 20:20
RD only "affect" acessing the video driver and will not interfere with an already running process
that's it. you can use RD while frameserving but you cant start frameserving within a remote desktop session.

cweb
19th August 2010, 20:53
that's it. you can use RD while frameserving but you cant start frameserving within a remote desktop session.
Otherwise to start frameserving remotely you can use vnc. I used tightvnc successfully to do that myself.

alexcel
20th August 2010, 00:05
I didn't suggest a workaround. I asked for a trimmed stream, which you said you would provide. May I have that please?

I am not so fluent in English, but your answer sounds like "upset". Why :confused:? I just said thanks. You also said you would buy the disc...In any case, I am very grateful for your program, your work and dedicated support. I didn't want to make you angry. Sorry if I did.

I'll try to trim the problem part, But I do not know how-to...Can you provide me some guidance on how to trim m2ts files without re-encoding? Where can I find the TS trim function? I will try to provide you the trimmed stream. :)

Thanks again

alexcel
20th August 2010, 00:15
Hi:

I've just found and reviewed eac3to logfile and I have found these errors logged

eac3to v3.24

M2TS, 1 video track, 1 audio track, 1 subtitle track, 2:13:38, 24p /1.001
1: Chapters, 27 chapters
2: VC-1, 1080p24 /1.001 (16:9)
3: AC3, Spanish, 5.1 channels, 640kbps, 48kHz, dialnorm: -27dB
4: Subtitle (PGS), Spanish
[v02] Extracting video track number 2...
[v02] Creating file "E:\Ultimas\MainMovie\INVICTUS\F1_T2_Video - .vc1"...
[v02] [0:54:16] The source file seems to be damaged (discontinuity). <WARNING>
[v02] [1:38:44] The source file seems to be damaged (discontinuity). <WARNING>
[v02] [1:45:41] The source file seems to be damaged (discontinuity). <WARNING>
[v02] [1:45:41] The source file is encrypted. <WARNING>
[v02] [1:45:41] The source file seems to be damaged (discontinuity). <WARNING>
[v02] [1:45:41] The source file seems to be damaged (discontinuity). <WARNING>
[v02] [1:45:41] The source file seems to be damaged (adaptation field too big). <WARNING>
[v02] [1:45:41] The source file seems to be damaged (discontinuity). <WARNING>
[v02] [1:45:42] Skipping dirty PES bytes... <WARNING>
[v02] [1:45:42] The source file seems to be damaged (discontinuity). <WARNING>
[v02] [1:45:42] The source file seems to be damaged (discontinuity). <WARNING>
[v02] Video has a gap of 7 frames at playtime 0:54:16. <WARNING>
Video track 2 contains 192240 frames.
eac3to processing took 13 minutes, 33 seconds.
Done.

I guess it was a bad rip after all Sorry for the inconvenience.

Do you still want the trimmed stream?

DonDan
20th August 2010, 08:03
I am not so fluent in English, but your answer sounds like "upset". Why :confused:? I just said thanks. You also said you would buy the disc...In any case, I am very grateful for your program, your work and dedicated support. I didn't want to make you angry. Sorry if I did.

I'll try to trim the problem part, But I do not know how-to...Can you provide me some guidance on how to trim m2ts files without re-encoding? Where can I find the TS trim function? I will try to provide you the trimmed stream. :)

Thanks again

You can use DGsplit (yes, yet another tool provided by our master:) ) to trim the file for example.


Edit: Looks like I overlooked the tiny little post right above...

jpsdr
20th August 2010, 08:30
I've, by accident, discovered a reproductible way to make DGDecNV crash in VDub. The idea is to queue 2 successive jobs wich will fail because of an error, and the second will generate a crash. One way to reproduce is the following : Create an avisynth script with only the DG command (with any m2ts file). Configure VDub with YV12 color depth in both input and ouput, and use huffyuv for compression output (this will in fact trig an error saying that codec can't handle the color format). Create 2 queue jobs with 'save avi' and start them. First job will be halted by the error (everything goes normaly), but second will generate a crash.

hydra3333
20th August 2010, 09:44
I need the crash details, such as a DrWatson dump.OK, I'll google how to grab it and get back to you :)

edit: drwatson log attached.

Guest
20th August 2010, 12:34
Can you produce the crash with a small file and just a script processed by x264, i.e., without the batch file? If so, please post a link to the source file, and give me your script. Also give me the x264 and Avisynth versions numbers as well as the x264 command line.

hydra3333
20th August 2010, 13:40
Sure. x264 v1688, TSP's MT avisynth 2.5.7, NV v2024, XP-sp3, nvidia 8800GT, nvidia driver 258.96, intel Q9450.
Source 4Mb http://www.mediafire.com/?w1jqd2c76n2ku9o or http://download972.mediafire.com/n7j397xp58tg/w1jqd2c76n2ku9o/cut2.mpg
cut2.bat
@echo on
del cut2.mp4
"C:\software\DGindex\DGIndexNV.exe" -i "cut2.mpg" -a -o "cut2.dgi" -e
"C:\software\X264\x264.exe" --thread-input --threads 3 --profile high --level 4.1 --preset fast --interlaced --tff --no-cabac --bitrate 2000 --sar 16:11 -o "cut2.mp4" "cut2.avs"
pause
cut2.avs
SetMTmode(mode=5,threads=1) # start with mode=5 forAVIsource http://forum.doom9.org/showthread.php?p=1067216#post1067216
SetMemoryMax(128)
LoadPlugin("C:\SOFTWARE\DGindex\DGDecodeNV.dll")
LoadPlugin("C:\SOFTWARE\DGindex\DGDecode.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\unfilter.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\RemoveGrainSSE2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\RepairSSE2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins-zzz\RemoveDirtSSE2.dll")
Import("C:\Program Files\AviSynth 2.5\LimitedSharpenFaster.avs")
DGMultiSource("cut2.dgi",deinterlace=0)
AssumeTFF()
Assumefps(25)

krosswindz
20th August 2010, 15:59
Out of curiosity does any one have a Parallels Workstation Extreme and can try DGNV tools in the parallels VM. AFAIK Parallels Workstation Extreme should be able to see Nvidia GPU and should support CUDA as well. I dont have a copy of it, it would be interesting to see if some one could try to use DGNV tools in it.

LeXXuz
20th August 2010, 22:34
that's it. you can use RD while frameserving but you cant start frameserving within a remote desktop session.

Makes sense. I will use a VNC session for starting frameserving jobs. Thanks Sharktooth.

I have another problem with DAR of source files. I don't know if it is a problem of DGDecNV or Megui. But since it never occured with DGindex, FFMSindex nor DGAVCdec I guess it might be a problem with DGDecNV.

I'm transcoding a couple of older mpeg2 DVB captures and it seems that Megui does not recognize the correct DAR when DGdecNV is used. F.e. a source mpeg2 file (just the video stream as mpv, no program stream) PAL 720x576, correct DAR is ITU 4:3 (1:1.367521) for this file, but when serving it with DGdecNV instead of DGindex the DAR is simply set to 1,25 (720/576).

Also opening the .dgi file in Meguis Avisynth script creator takes VERY long with mpeg2 source files. Looking at hdd activity it seems that the whole source file is scanned somehow before the preview window is shown and the script generator can be used.
If this is a megui issue, I apologize and will post it in the megui-thread.

Guest
20th August 2010, 22:45
I have another problem with PAR of source files. I don't know if it is a problem of DGDecNV or Megui. But since it never occured with DGindex, FFMSindex nor DGAVCdec I guess it might be a problem with DGDecNV. Can you please post a link to a sample that does this?

Also opening the .dgi file in Meguis Avisynth script creator takes VERY long with mpeg2 source files. Looking at hdd activity it seems that the whole source file is scanned somehow before the preview window is shown and the script generator can be used.
If this is a megui issue, I apologize and will post it in the megui-thread. Does it open quickly in bare DGIndexNV?

LeXXuz
20th August 2010, 23:53
Can you please post a link to a sample that does this?

Here it is. (http://ul.to/t2frg8)

Sequence header look fine to me, DGIndexNV also seems to get correct ar:
http://img3.imagebanana.com/img/0myrsw5z/thumb/dgindexnv.png (http://www.imagebanana.com/view/0myrsw5z/dgindexnv.png)
MeGui's Avisynth script creator shows DAR 1:1,2222 (704/576) with DGIndexNV and ITU 4:3 PAL with DGIndex as it should.


Does it open quickly in bare DGIndexNV?

When I drag&drop the .dgi file to DGIndexNV the related .m2v loads almost instantly. So yes.

Sharc
21st August 2010, 09:05
Here it is. (http://ul.to/t2frg8)

Sequence header look fine to me, DGIndexNV also seems to get correct ar:
http://img3.imagebanana.com/img/0myrsw5z/thumb/dgindexnv.png (http://www.imagebanana.com/view/0myrsw5z/dgindexnv.png)
MeGui's Avisynth script creator shows 1:1,2222 (704/576) with DGIndexNV and ITU 4:3 PAL with DGIndex as it should.


PAR of your 704x576 picture is 12:11 (1.0909) as one can estimate from the circle distortion of the ARD logo. DAR (display aspect ratio) is 4:3. So when you playback the file at 4:3 it will be resized correctly (undistorted). So everything is fine I would say.

LeXXuz
21st August 2010, 10:01
I think it's not. MeGUI sets the wrong SAR to x264. The aspect ratio of the output is slightly too small and the picture looks slightly narrowed in width. With DGIndex everything is fine.

EDIT: It is the DAR Megui is having trouble with. Sorry for any confusion.

Just opened a 16:9 anamorphic encode and MeGUI sets DAR to 1,25 instead of ITU 16:9 PAL. As a result, x264 encoder is fed with SAR setting of 5:4 instead of 31:17 as it should.

Sharc
21st August 2010, 11:05
I think it's not. MeGUI sets the wrong SAR to x264. The aspect ratio of the output is slightly too small and the picture looks slightly narrowed in width. With DGIndex everything is fine.
Your sample is mpeg2, not AVC. The PAR is not explicitely signalled in the stream. So you might have to add --sar 12:11 in the x264 CLI when you re-encode it with x264.
Nevertheless your sample should display undistorted (here it does) when you play it back at forced 4:3, e.g. with VLC.
When I play it back with DGindex the ARD logo looks slightly squeezed (narrowed) as expected for a 12:11 or 128:117 PAR (ITU).
Possibly your playback device assumes a par of 16:15 (generic PAR for PAL 4:3), means it will stretch your picture by 6.7% rather than about 9%. Hence a slight (but almost unnoticeable) distortion may persist.

Just a note: In case you intend to author the clip to blu-ray format at some later stage you would have to add 8 pixels black borders to the right and left each, such that the picture width becomes 720.

LeXXuz
21st August 2010, 11:35
Your sample is mpeg2, not AVC. The PAR is not explicitely signalled in the stream.

But DAR should. The question is why does MeGUI set the correct DAR with DGIndex (I guess it gets this information from the sequence headers of the mpeg stream) while it simply sets hight/width as DAR when using DGIndexNV, which is not correct.

In short, I think MeGui should get the same results (and for some reason it does not), no matter what indexing method is used, no?

Sharc
21st August 2010, 11:40
^^^^
I can't comment on MeGui as I am not very familiar with it.
Maybe someone else .....

stax76
21st August 2010, 11:49
This is clearly a MeGUI and not a DGDecNV problem. Detecting the correct PAR for every possible source and source filter is very difficult, remember there are countless possible source formats and numerous possible source filters. I've changed and tweaked my detection probably more then 100 times in the last 8 years.

Guest
21st August 2010, 11:51
I could pass hints if it's thought to be a significant enough issue.

Groucho2004
21st August 2010, 12:11
The question is why does MeGUI set the correct DAR with DGIndex (I guess it gets this information from the sequence headers of the mpeg stream) while it simply sets hight/width as DAR when using DGIndexNV, which is not correct.

I just looked at megui's source code - it reads the d2v file that DGIndex creates and gets the value from the entry "Aspect_Ratio".

DGI files (from DGDecNV) do not provide this property.

Guest
21st August 2010, 12:17
Sure. Please remove the SetMTMode() and report results.

stax76
21st August 2010, 12:17
@Groucho2004

That's not robust anyway because 16:9 is sometimes defined in IFO only but not in VOB.

If Filepath.GetExt(p.SourceFile) = ".d2v" Then
Dim content = File.ReadAllText(p.SourceFile)

If content.Contains("Aspect_Ratio=16:9") Then
p.SourceAnamorphic = True
Else
Dim ifoFile = GetIfoFile()

If File.Exists(ifoFile) Then
Dim dar2 = MediaInfo.GetVideo(ifoFile, "DisplayAspectRatio")

If dar2 = "1.778" Then
p.SourceAnamorphic = True
End If
End If
End If

Groucho2004
21st August 2010, 12:22
@Groucho2004

That's not robust anyway because 16:9 is sometimes defined in IFO only but not in VOB.

I know, I just answered a question.

Groucho2004
21st August 2010, 12:30
I could pass hints if it's thought to be a significant enough issue.

Actually, that would be a nice feature.

Guest
21st August 2010, 12:39
Thinking more about it...

Hints are needed only for things that can change on a per-frame basis. I should just add the aspect ratio information to the DGI file.

hydra3333
21st August 2010, 13:21
Please remove the SetMTMode() and report results.

Commented it out like this
#SetMTmode(mode=5,threads=1) # start with mode=5 forAVIsource http://forum.doom9.org/showthread.php?p=1067216#post1067216
and it works fine now. :thanks:
I'd thought mode=5 was supposed to be the most "compatible" however leaving it off seems to be even more so :) Hurrah !

Out of interest, is that the end solution or a workaround ?

Guest
21st August 2010, 14:52
You can't multithread the NV-based DGSource(). I don't know for sure the technical reason or if there would be some way to allow it. I believe that the CUDA context must be associated with a single thread. Whether floating contexts changes anything I simply don't know at this time and haven't had time to look into it. So for now, just don't multithread DGSource.

It's probably a bad idea in general to multithread any source filter.

hydra3333
22nd August 2010, 01:47
ok yes, someone recommended mode=5 for source filters however looks like not this one.

if multi-threading is "out" when using NV then multi-core boxes like my 4-core effectively become single-core boxes inside avisynth... hence it must be swings and roundabouts for overall speed.

in this specific case there is no problem, since not much is being done and x264 multi-threads anyway - however if there's a lot of processing to be done inside avisynth then NV's single-threading requirement may end being a "chokepoint" for overall performance.

unless there's a way around it I don't know of (i'd thought to use MT, the 1st line of a script had to contain a setMTmode).

oh well, at least we know. thanks.

Guest
22nd August 2010, 01:55
You can MT everything but the source filter. I don't use it but I have seen scripts like that.

crl2007
22nd August 2010, 09:04
The licensing page does not work. The program says that my license is invalid and I can't get a new one.

Guest
22nd August 2010, 12:43
Send me an email repeating that and including your user ID.

Didée
22nd August 2010, 13:07
You can MT everything but the source filter. I don't use it but I have seen scripts like that.
Partial multithreading of an Avisynth script is only possible with the (spatial) MT() filter. Partial multithreading is not possible with the (temporal) SetMTmode(). With this one, the number of threads is initiated and fixed upon script loading. The only possible way for not multithreading-friendly filters is SetMTmode(5), which will use only one thread actively, while all other threads are "parked".

Basically, MT() is the more poor filter - it's bad for filters with big spatial context (e.g.: all MVTools applications, or e.g. TNLMeans), and some scripts can *only* use SetMTmode, because MT is plain impossible (e.g. Srestore).

This is a pity. The main point of GPU decoding is to free up CPU time. But you don't need to offload from CPU to GPU in easy scenarios where you've plenty of CPU time to spare anyway. The case where freeing CPU really counts is in heavy scenarions when CPU is loaded to the brim.


... testing ...


*edit* : false alarm, the crashes were because I had a silly typo in my script. :rolleyes:

For now, it seems to work when no SetMTmode at all is set in the beginning, but only after the DGDecodeNV call.

Don't know what to say, this behaviour of SetMTmode seems to be in contradiction to the description of it's functionality. But it seems to work, sorry for the buzzing.

Guest
22nd August 2010, 13:14
I'm confused. Are you saying that DGDecNV should work with SetMTMode(5), that it does work for you, both of those?

If it is thought that it should work, I'll be happy to investigate it.

cweb
22nd August 2010, 13:25
I'm confused. Are you saying that DGDecNV should work with SetMTMode(5), that it does work for you, both of those?

If it is thought that it should work, I'll be happy to investigate it.

I successfully use it with SetMtMode(2,2) on my source dg filter call. Perhaps I'm just lucky then.... :)

Didée
22nd August 2010, 13:32
You see me confused as well.

Documentation for SetMTmode says that you need to put it at the start of the script, because the number of threads is set and fixed only one time, when the script is initiated.
For source filters that don't play well with using multiple threads, the docu recommends to use mode 5 for the sourcefilter.

Hence, the generally-recommended structure for not-MT'able sourcefilters is

SetMTmode(5, threads)
SourceFilter()

SetMTmode(2)
other_filters

This generally works, e.g. with good old dgdecode_mpeg2source. But it seems to not work with DGDecodeNV. I got Vdub either crash, or go not responding anymore.

The following, however, seems to work:
DGMultiSource()

SetMTmode(2)
other_filters
That is running right now, and it's actually using all threads as specified. (And surprise, that's exactly what you told to try.);)

My confusion is because this structure is not correct as per the documentation ... which is saying that one SetMTmode call must be present at the very start of the script.

cweb
22nd August 2010, 13:35
This is what I put in my scripts usually:

SetMtMode(2,2)

video=dgmultisource("x.dgi")

It works for me on my dual core.

Guest
22nd August 2010, 13:35
Thank you for the clarification, Didée. Can you try cweb's script?

cweb
22nd August 2010, 13:43
This is what I put in my scripts usually:

SetMtMode(2,2)

video=dgmultisource("x.dgi")

It works for me on my dual core.

My full script (for MTS files) is quite complicated :)


#avisynth

SetMemoryMax(384)


LoadPlugin("c:\apps\avisynth2\plugins\nonautoload\agc.dll")
Import("c:\apps\avisynth2\plugins\avsi\dv.avsi") # for newundot()
Import("c:\apps\avisynth2\plugins\avsi\lremovedust.avsi")

Import("c:\apps\avisynth2\plugins\avsi\jdl-effects.avsi")
Import("c:\apps\avisynth2\plugins\avsi\jdl-range.avsi")
Import("c:\apps\avisynth2\plugins\avsi\limitedsharpenfaster.avsi")
Import("c:\apps\avisynth2\plugins\avsi\subtitleshadow.avsi")

LoadPlugin("c:\apps\avisynth2\plugins\transall\TransAll.dll") # transitions

SetMtMode(2,2)

video=dgmultisource("00010.dgi")

#zooming text stuff deleted



audio=nicac3source("00010 PID 1100 2_0ch 48KHz 192Kbps DELAY 0ms.ac3")




video=audiodub(video,audio)

video=video.SelectEven()


#transitions are done here



#resize for youtube goes here

video=video.LRemoveDust_YV12(4,1)


video