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 Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 6th December 2011, 22:41   #41  |  Link
gyth
Registered User
 
Join Date: Sep 2011
Posts: 86
Quote:
Originally Posted by redfordxx View Post
So, in fact, with % it is usually possible to access changed variables, only in the case of IF block and maybe something else, the variable is assigned later.
Batch evaluates %variables% with their value at the time it enters a ( block ). Changes to the value within the block aren't reflected because they have already been "expanded". Using enabledelayedexpansion and !! can get you around that, but it is added complexity that is best avoided when not needed.
gyth is offline   Reply With Quote
Old 6th December 2011, 23:52   #42  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by redfordxx View Post
Now, as it is intended to process lot of files without first looking at them I added few types of warning. One of it should be warning for interlaced video.
So I am testing for ifb=IsFrameBased, and then log a message. However, I get always true, which does not help much.
Anyone with more insight can get me on the right path?
IsFrameBased doesn't tell you whether a clip is interlaced or progressive (which Avisynth doesn't know anyway). It just means that each frame is a complete frame rather than a field previously split by using SeparateFields(). So most clips are frame-based, even if interlaced.

See http://avisynth.org/mediawiki/Interlaced_fieldbased.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Old 9th December 2011, 08:01   #43  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
release;-)
redfordxx is offline   Reply With Quote
Old 10th December 2011, 13:29   #44  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
Hi anybody can see reason of following?
I have mp4 file where mediainfo says it is Quicktime AVC. FFVideo source cannot handle it and DIrectShowSource can. But why is first method working and second gets crash?
First:
Code:
DirectShowSource(srcfile)
Second:
Code:
try{FFVideoSource(srcfile, threads=1)} 
catch (err_msg) {DirectShowSource(srcfile)}
redfordxx is offline   Reply With Quote
Old 10th December 2011, 17:20   #45  |  Link
gyth
Registered User
 
Join Date: Sep 2011
Posts: 86
Looks like ffvideo isn't recognizing it as a file it can't process, so it doesn't throw an error and chokes on the data later.

Check for an update to ffvideo/ffmpeg/libav
gyth is offline   Reply With Quote
Old 10th December 2011, 21:00   #46  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
Quote:
Originally Posted by gyth View Post
Looks like ffvideo isn't recognizing
It is, because without try FFIndex reports System Exception - Access Violation

I believe MeGui takes care of updating of FFSource...?
redfordxx is offline   Reply With Quote
Old 10th December 2011, 23:20   #47  |  Link
gyth
Registered User
 
Join Date: Sep 2011
Posts: 86
Quote:
System Exception - Access Violation
Is it in a directory that you have write privileges?
Did you have the file open in another program?!?

Make sure ffvideo is erroring the way you are expecting
Code:
try{FFVideoSource(srcfile, threads=1)} 
catch(err_msg) {WriteFileStart(blankclip,"error.log","err_msg")}
Make sure it isn't something with try/catch
Code:
try{assert(false)}
catch(err_msg) {DirectShowSource(srcfile)}
gyth is offline   Reply With Quote
Old 12th December 2011, 18:37   #48  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
So, for the first of your tests I did something different already before: I put AviSource in the catch part. And I got Nice AviSource error message. That means, that the error handling took place.
However, for your second test (nice idea), it worked fine.
Besides this, I did another test:
Code:
try{FFVideoSource(srcfile, threads=1)} 
catch (err_msg) {}
DirectShowSource(srcfile)
...CRASH!
I don't see ant obvious conclusion here...so, if not anyone else does, let's not waste more time on that.

I would better have (I hope) easier and more useful question which would lead to improving some bad habits of my batch file:
How the batch file can learn it's own location (path). I would like to pass the path to the avs.

Thank you.
redfordxx is offline   Reply With Quote
Old 12th December 2011, 18:51   #49  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Hi redfordxx, dont know if this helps but CD displays current directory or CD > Dir.txt to a file.
EDIT: sorry, CD is a dos command and that is what I thought you were asking about,
dont know if there is an equivalent in AVS script.
If your question was about AVS script then I think I recently saw a thread/post that,
that enquiry would involve a try/catch thing also.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 14th December 2011 at 00:40.
StainlessS is offline   Reply With Quote
Old 14th December 2011, 01:51   #50  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
Quote:
Originally Posted by StainlessS View Post
Hi redfordxx, dont know if this helps but CD displays current directory or CD > Dir.txt to a file.
EDIT: sorry, CD is a dos command and that is what I thought you were asking about,
dont know if there is an equivalent in AVS script.
If your question was about AVS script then I think I recently saw a thread/post that,
that enquiry would involve a try/catch thing also.
No, it's OK. Now, after your post I am thinking that CD is currently what I need and not *.bat location. Because all these echo x > tmp.avs commands are directed to current directory I guess.
redfordxx is offline   Reply With Quote
Old 14th December 2011, 01:57   #51  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
I got it...this is sick;-)
Code:
:getpath
::%1-variable
SET %~1=%~dp1
goto:eof
redfordxx is offline   Reply With Quote
Old 14th December 2011, 14:53   #52  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Just for you info, I've just found these functions in the Avisynth docs
ScriptName, ScriptFile, ScriptDir, (EDIT: Since v2.6.)
which I was not previously aware of.
They are easiest to find in the Avisynth2.6 Help CHM via MediaFire
in my sig (it is a searchable version of the Docs).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 14th December 2011 at 18:16.
StainlessS is offline   Reply With Quote
Old 14th December 2011, 19:07   #53  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
Yeah, that really must be new, because I remember somewhere seeing the ScriptName doing via try/catch error message.
Thanx but not for my purpose because ScriptDir is exactly what I don't want;-)
[OT] By the way StainlessS, you were mentioning some time ago, that you were interested int RedAverage...did you try already? Did it work for you?[/OT]
redfordxx is offline   Reply With Quote
Old 14th December 2011, 23:03   #54  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Not tried as yet, I have it in the queue of things I have to do, (downloaded it some time ago and think I have the
most recent version also). Gonna try your batcher too when I get around to it. Thankyou.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 17th December 2011, 17:53   #55  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
Update.
Damn avs template has 10kB already.
redfordxx is offline   Reply With Quote
Old 19th December 2011, 16:45   #56  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
wow, when I open the process list in FAR manager, I can see current values of my variables in batch file. It's nice for debugging the batch script. *FAR is best* ;-)
redfordxx is offline   Reply With Quote
Old 20th December 2011, 06:54   #57  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
Hi, guys, muxing stopped to work after I upgraded mkvmerge. Just letting you know, before I figure it out and publish update. Probably some change in CLI syntax, which is really not what I would expect.

EDIT: seems to me, that the track numbering was starting with 1 and now it is 0. Isn't that weird?
Did anyone notice this change? or it is maybe change in x264? I don't know where the track numbers come from...

Last edited by redfordxx; 20th December 2011 at 08:06.
redfordxx is offline   Reply With Quote
Old 6th January 2012, 12:21   #58  |  Link
redfordxx
Registered User
 
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
I have partially figured out the aspect ratio issue, at least for MPEG2. And also denoising. As soon as I will cleanup it, I will put new version online.
And I know already also that the 16:9 ratio in MPEG2 does not mean the picture is 16:9. So this I have covered. However, I don't know about MPEG1 yet. Is it also that the display aspect ratio reported by DGIndex is not the real ration or in case of MPEG1 I can take the numbers I see in log file? Thank you
redfordxx is offline   Reply With Quote
Old 26th January 2013, 00:59   #59  |  Link
magsoud
Registered User
 
magsoud's Avatar
 
Join Date: Jan 2012
Location: Tabriz
Posts: 48
Deleted File...
magsoud 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 00:36.


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