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 > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd December 2011, 02:00   #21  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
Quote:
however one seems to be that it has problem with ' as part of srcfile.
Ah, yes, indeed. Thanks. I should be able to fix that ... there are a bunch of updates I have made and that I am working on and I will try to take care of that before the next release. For now, avoid apostrophes in the filename.
vampiredom is offline   Reply With Quote
Old 22nd December 2011, 05:04   #22  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
I just took a quick look and it will be harder than it seems to fix this: Apparently, CALL_25.dll (which is used here to call the .exe from AviSynth) automatically translates ' -> " ... I guess this was done to facilitate long quoted arguments. The CALL_25 plugin is really old and I can't imagine it will be updated any time soon. The solution, it seems, will be to add a layer of abstraction to launching the executable: So, I'll have to create an executable that un-translates " back to ', then passes those arguments on to the application. Grrr.

The short solution for now: Avoid filenames that contain single-quotes or other strange characters.
vampiredom is offline   Reply With Quote
Old 22nd December 2011, 15:17   #23  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 791
Quote:
Originally Posted by vampiredom View Post
The short solution for now: Avoid filenames that contain single-quotes or other strange characters.
Of course, I know, but I thought better to solve the root cause than repair the damage.
redfordxx is offline   Reply With Quote
Old 27th December 2011, 15:43   #24  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 791
Code:
srcfile="errorinsource.avi"
strSF1="MpegAutoIndexSource(filename=srcfile)"
try{Eval(strSF1)}
catch (err_msg) {
    Assert(false,strSF1)
}
Why this code results into error message "I dont know what strSF1 means", when it should be "MpegAutoIndexSource(filename=srcfile)"?
redfordxx is offline   Reply With Quote
Old 27th December 2011, 15:46   #25  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 791
Also seems that comma in filename makes problems too, please try on your computer.

You were asking about comparison of postprocessing of FF and DGAVC some time ago... well I didn't do any test but if I am not mistaken, there is only true/false on deblocking in DGAvc and you can choose more options in case of FF.

btw, is it necessary that DGAVCsource needs to demux full video track?

Last edited by redfordxx; 27th December 2011 at 15:52.
redfordxx is offline   Reply With Quote
Old 28th December 2011, 03:33   #26  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
Quote:
Originally Posted by redfordxx View Post
Code:
srcfile="errorinsource.avi"
strSF1="MpegAutoIndexSource(filename=srcfile)"
try{Eval(strSF1)}
catch (err_msg) {
    Assert(false,strSF1)
}
Why this code results into error message "I dont know what strSF1 means", when it should be "MpegAutoIndexSource(filename=srcfile)"?
On my machine, I get the 'correct' error when I try your script. I am not sure why you get the undefined string error. [Not related to your error, but you know that MpegAutoIndex does not work with .avi files anyway, I assume, right]

Quote:
Originally Posted by redfordxx View Post
Also seems that comma in filename makes problems too, please try on your computer.
No, no problem on my system with that either. I did not torture-test the comma issue, but a simple filename with one comma caused no problem. Can you give me the exact filename that caused a problem for you?

Quote:
Originally Posted by redfordxx View Post
btw, is it necessary that DGAVCsource needs to demux full video track?
Only in cases where a .mp4 or .mov H.264 container is used. This is not needed for .mts files, for example.
vampiredom is offline   Reply With Quote
Old 28th December 2011, 05:31   #27  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 791
do you maybe think there is any part of your script that would on certain circumstances reset foreign variables?

when there is valid source, it works fine
redfordxx is offline   Reply With Quote
Old 28th December 2011, 05:58   #28  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
Quote:
do you maybe think there is any part of your script that would on certain circumstances reset foreign variables?
I don't think so. As far as I know, there are no back-referenced variables possible in AviSynth. I wish there were! Maybe there is something odd going on that has since been resolved. I have made some small changes to my local version lately and I am getting ready to do an update as soon as I have some time and I have found a decent way around the single-quote filename issue with CALL_25.dll.

But I don't think that there is an issue in the script itself that could cause such a thing. When you try to load an AVI file, for example, MpegAutoIndexSource() will fail in the section labeled:
Code:
############################################################################################
# throw errors for incorrect parameters
############################################################################################
Up to that point, the function is mostly just a bunch of string modifications and sanity-checking assertions and stuff.

Last edited by vampiredom; 28th December 2011 at 06:02.
vampiredom is offline   Reply With Quote
Old 29th December 2011, 17:17   #29  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 791
Quote:
Originally Posted by vampiredom View Post
Only in cases where a .mp4 or .mov H.264 container is used. This is not needed for .mts files, for example.
Does the var isElementary something to do with that?

Quote:
Originally Posted by vampiredom View Post
I don't think so. As far as I know, there are no back-referenced variables possible in AviSynth. I wish there were!
What you mean by backreferences? Is that like getting more than one var out of function? I do it via string function followed by eval() if necessary
Quote:
When you try to load an AVI file.
Up to that point, the function is mostly just a bunch of string modifications and sanity-checking assertions and stuff.
But still, it should not clear my variables, right?




BTW: I happened to look at your SplitFilename and it might use some improvements. run this script for inspiration:
Code:
function ReplaceStr(string ss, string fnd, string rpl)
{pos=FindStr(ss,fnd)
(pos==0) ? ss : LeftStr(ss,pos-1)+rpl+ReplaceStr(MidStr(ss,pos+StrLen(fnd)),fnd,rpl)
}

BlankClip()
#srcfile="d:/ee\ff/Gggg.XxX"
#srcfile="Gggg.XxXxX"#0
#srcfile="h/h\h/h\Gggg.XxXxX"#2
srcfile="\h/h\h/h\Gggg.XxXxX"#1
#srcfile="d:\h/h\h/h\Gggg.XxXxX"
srcfiletmp=ReplaceStr(srcfile,"/","\")
bckslsh=FindStr(RevStr(srcfiletmp), "\") # bckslsh==1 means it's a dir which is not good, but won't check for this error now
filename=(bckslsh==0) ? srcfiletmp : RightStr(srcfiletmp,bckslsh-1)
ext=LCase(RightStr(filename,FindStr(RevStr(filename), ".")))
namebase=LeftStr(filename,StrLen(filename)-StrLen(ext))
basepath=LeftStr(srcfiletmp,StrLen(srcfiletmp)-StrLen(filename))
path  = (FindStr(srcfiletmp, ":")==2) ? basepath
    \ : (FindStr(srcfiletmp, "\")==1) ? LeftStr(GetWorkingDir(),2)+basepath
    \ :                              GetWorkingDir()+basepath
drive=LeftStr(path,2).UCase()
folder=MidStr(path,3)
Subtitle(srcfile+" = "+drive+"|"+folder+"|"+namebase+"|"+ext+"\n"+ srcfile+" = "+SplitFilename(srcfile,1)+"|"+SplitFilename(srcfile,2)+"|"+SplitFilename(srcfile,3)+"|"+SplitFilename(srcfile,4),lsp=1)
redfordxx is offline   Reply With Quote
Old 29th December 2011, 18:53   #30  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
Quote:
Does the var isElementary something to do with that?
isElementary is true when it is an elementary video-only file format, such .m2v or .m4v. When isElementary is true, it won't need demuxing because it is already demuxed.
Quote:
What you mean by backreferences?
In other programming languages, you can use referenced vars ... http://www.cprogramming.com/tutorial/references.html
AviSynth cannot do that, I don't think.
Quote:
But still, it should not clear my variables, right?
Um. No. It shouldn't and, when I ran your test on my machine, it didn't. I don't know how or why that happens to you.
Quote:
BTW: I happened to look at your SplitFilename and it might use some improvements.
That function has already changed quite a bit since the last release. I will try to get a new version of MpegAutoSource up this weekend.
vampiredom is offline   Reply With Quote
Old 30th December 2011, 22:14   #31  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
New version, link in top post. It should now allow ' in filenames, thanks to the "helper" I wrote for CALL_25.dll. Enjoy!
vampiredom is offline   Reply With Quote
Old 31st December 2011, 03:52   #32  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 791
Quote:
Originally Posted by vampiredom View Post
In other programming languages, you can use referenced vars ... http://www.cprogramming.com/tutorial/references.html
AviSynth cannot do that, I don't think.
As I wrote, I think it is possible with workaround.


Could you provide the easiest example of function which you consider impossible in avs? Just to let me be sure I understand what you want achieve precisely...
redfordxx is offline   Reply With Quote
Old 31st December 2011, 04:08   #33  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
Quote:
Originally Posted by redfordxx View Post
Could you provide the easiest example of function which you consider impossible in avs?
This will stray very much off-topic, so I started a new thread about referenced variables. Please feel free to comment there.
vampiredom is offline   Reply With Quote
Old 5th January 2012, 02:57   #34  |  Link
Pat357
Registered User
 
Join Date: Jun 2006
Posts: 400
Thanks for your nice tool, it saves me a lot of time.
I have a few question/remarks :
a) About the usage examples on the first page :
Code:
# Open an AVC stream using DGIndexNV and hardware double-rate deinterlacing
MpegAutoIndexSource("foo.mts", NV=true, args="deinterlacing=2")

# Open an AVC stream using DiAVC and hardware double-rate deinterlacing
MpegAutoIndexSource("foo.mts", DI=true, args="deinterlacing=2")
Both examples can't work, because DGDecodeNV has no option like "deinterlacing=2". It should be "deinterlace=2" instead.
The second example using Diavc.ax : there is no build-in option to deinterlace using "DGAVCDecodeDI.dll".. One would need to deinterlace with another tool....
Maybe it looks a bit tedious, but putting "non working" examples in the main post may scare new users away, thinking that the tool doesn't work.

b) Another thing : DGdecNV has had a silent update (version didn't change) : please download it again from neuron2 and replace the .dll / .exe.
The update was announced in the forum on neuron2. I've no idea why he didn't change the version number : it's at least very confusing this way.

c) I also noticed you included the latest DiAVC v1.26. According to Neuron2 & Diavc author, there are incompatibilities between the Neuron tools and the latest Diavc.
You can look at http://www.di-avc.com/download.html and you'll see a "special" version to use with with DG-tools (v1.2).
It's up to you of course, but in my experience this version is indeed more stable with DGAVCDecodeDI.
Could you include this version in your next updates ?
Pat357 is offline   Reply With Quote
Old 5th January 2012, 03:46   #35  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
Quote:
Originally Posted by Pat357 View Post
Thanks for your nice tool, it saves me a lot of time.
You're very welcome. I am glad it is useful to you.

Quote:
Originally Posted by Pat357 View Post
Both examples can't work, because DGDecodeNV has no option like "deinterlacing=2". It should be "deinterlace=2" instead. The second example using Diavc.ax : there is no build-in option to deinterlace using "DGAVCDecodeDI.dll"..
Ah, yes... fixed. I suspect this was just a copy/paste/haste error on my part while putting together the notes. Thanks.

Quote:
Another thing : DGdecNV has had a silent update (version didn't change) : please download it again from neuron2 and replace the .dll / .exe.
Excellent. That has been updated now.

Quote:
It's up to you of course, but in my experience this version is indeed more stable with DGAVCDecodeDI.
Certainly, but that will be in a future update. I apparently need to re-register my copy of DiAVC to get this working with v1.2.2 (annoying) and I don't have time to do that right now.

NOTE: You can always overwrite the stuff in the /plugins/MpegAutoIndex/DGAvcIndexDi folder with whatever version you want. Assuming that neuron2 hasn't changed any command line flags or decoder functions parameters, it should work fine.

Last edited by vampiredom; 5th January 2012 at 03:57. Reason: updated
vampiredom is offline   Reply With Quote
Old 6th January 2012, 05:33   #36  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
I fixed an issue that only occurred when using non-NV DGIndex (MPEG2) when there were absolute paths containing / instead of \. This was due to a fairly recent change and was not an issue in older versions of MpegAutoIndex.

Please download the updated package.
vampiredom is offline   Reply With Quote
Old 6th January 2012, 16:51   #37  |  Link
Pat357
Registered User
 
Join Date: Jun 2006
Posts: 400
Quote:
Originally Posted by vampiredom View Post
Certainly, but that will be in a future update. I apparently need to re-register my copy of DiAVC to get this working with v1.2.2 (annoying) and I don't have time to do that right now.
Re-registering should not be needed : I have only one "key" and it works for both v1.26 and 1.2.
I switch between those versions by "regsvr32 /u" followed by "regsvr32" for the other.
For playback I use the latest v1.26, while for DG-stuff I use v1.2 (special version).
Pat357 is offline   Reply With Quote
Old 29th January 2012, 05:51   #38  |  Link
bencahill
Registered User
 
Join Date: Oct 2009
Posts: 10
Thanks for this awesome plugin! (or should I say meta-plugin-collection? ) FFMPEGSource is faster for my videos, but has artifacts . This is working fine in the meantime.

Anyway, I couldn't get it to work at all at first...it gave me an unrelated error message. The actual problem (I found after digging through the source) is that mp4box didn't work because I didn't have msvcr100.dll. Once copied in, everything worked fine.

It would be nice if there was a way of warning of this (when running MpegAutoIndex manually, I got the relevant error message). Just thought I'd let you know. You should be able to reproduce by deleting/renaming/moving msvcr100.dll in %SYSTEMROOT%\system32, and opening a file that would use mp4box, like mp4 or mov (or that 3g* stuff).

Thanks!
bencahill is offline   Reply With Quote
Old 2nd February 2012, 23:07   #39  |  Link
vampiredom
Registered User
 
Join Date: Aug 2008
Posts: 233
Quote:
Originally Posted by bencahill View Post
Thanks for this awesome plugin! (or should I say meta-plugin-collection? ) FFMPEGSource is faster for my videos, but has artifacts . This is working fine in the meantime.
You are very welcome and thanks for the kind words about MpegAutoIndex. That's exactly why I made it: more reliable sourcing for many MPEG PS and TS files.

Quote:
Originally Posted by bencahill View Post
Anyway, I couldn't get it to work at all at first...it gave me an unrelated error message. The actual problem (I found after digging through the source) is that mp4box didn't work because I didn't have msvcr100.dll. Once copied in, everything worked fine.
Ah, yes. I have run into that once before, actually. I'll address this in a future release. Thanks for bringing this to my attention!
vampiredom is offline   Reply With Quote
Reply

Tags
dgavcindex, dgindex, dgindexnv, mpeg2, mpeg4

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 00:30.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.