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 7th December 2019, 08:26   #1061  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by MeteorRain View Post
I don't use MeGUI and I never thought this was even a problem. During my life I never tried putting lwi in the source position, hence I had the wrong assumption.

So how does it index the source then. Usually I put the media in the source position, you know, lwlibavvideosource(media), load it in some sort of GUI and the indexing is done. You say that MeGUI creates index first and then creates the script? I'm very confused now.
I don't use MeGUI's OneClick encoder as a previous poster does, but doing it the "manual" way you can either open a file with MeGUI's File Indexer and create an indexing job (the File Indexer lets you choose the indexer and also extracts the audio or creates a script to re-encode it as required), or you can open the source file directly with MeGUI's Script Creator, in which case MeGUI will open the File Indexer to index it first anyway. In the case of LSmash, once the indexing job has run it moves the index file to the working directory (if one is specified in it's options) and then opens the Script Creator using the index file as the source. There's also the option to run a batch of indexing jobs without opening the Script Creator each time, in which case the index files can be used as the source for the Script Creator later on.
I don't know exactly how MeGUI's File Indexer tells Lsmash to index a source, as it does that "behind the scenes", but the log file indicates it creates a script to open the source file which it runs, causing Lsmash to index.

The initial script created by MeGUI's Script Creator after indexing would look like this:
LWLibavVideoSource("D:\Episode 4.mkv.lwi")

It's always worked much the same way as indexing with DGIndex, where the index file becomes the source.
DGDecode_mpeg2source("D:\Episode 4.d2v")
For ffms2, I assume MeGUI uses the cachefile argument to create the index file in the working directory.

I checked and if you open a source file directly using the script creator and an lwi index file exists in the same directory, MeGUI appears to verify it's valid and uses the source file as the source in the script, rather than the index file. At least for MKVs. I haven't checked other file types, but for file types where it'd normally index with a different indexer by default, it'd probably insist on indexing again, so being able to open an index file directly would prevent that. There's no way to bypass the File Indexer completely if MeGUI thinks a source needs indexing though.

A way around the problem when using a newer version of Lsmash would be to manually create a script to open the source file, and to use that script as the source for MeGUI. When it's opened, Lsmash would automatically index the source file and MeGUI will patiently wait for the indexing to finish. Scripts can also be used as source files for the One Click encoder and batch encoding, but because MeGUI isn't seeing the source directly it can't know if it's anamorphic, and bypassing the File Indexer that way would mean the user would have to extract the audio themselves if they don't wish to re-encode it.

Not including the path to the source in the index file probably isn't the end of the world, but MeGUI will have to be changed for Lsmash so it doesn't use the index file as the source, and I assume the index file is always going to have to live in the source directory.

Last edited by hello_hello; 8th December 2019 at 18:57.
hello_hello is offline   Reply With Quote
Old 9th December 2019, 20:14   #1062  |  Link
dREV
Registered User
 
dREV's Avatar
 
Join Date: Jan 2019
Location: Antarctica
Posts: 74
Quote:
Originally Posted by MeteorRain View Post
I don't use MeGUI and I never thought this was even a problem. During my life I never tried putting lwi in the source position, hence I had the wrong assumption.
Why does your compiled version r935+2 still worked in MeGUI but updated iterations from r935+26-20190811 compiled by HolyWu to the latest don't?

Was this .lwi taken out of the code or something? Is it possible to put whatever got it working to the latest lsmash? Perhaps then would the MeGUI author be willing to finally update.
dREV is offline   Reply With Quote
Old 9th December 2019, 21:59   #1063  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by dREV View Post
Why does your compiled version r935+2 still worked in MeGUI but updated iterations from r935+26-20190811 compiled by HolyWu to the latest don't?

Was this .lwi taken out of the code or something? Is it possible to put whatever got it working to the latest lsmash? Perhaps then would the MeGUI author be willing to finally update.
The release info says it happened with version r935+31-20190820
http://avisynth.nl/index.php/LSMASHS...ived_Downloads
Remove InputFilePath field from the index file. It's unnecessary and troublesome when users rename or move the source file.

Given it doesn't seem to be common practice to use the index file as the source in scripts, I'm not sure how including the source path could be much of a problem. If you moved or renamed the source file and opened it in a script, wouldn't lsmash just index it again anyway? And if you are using the index file as the source... don't move or rename the source file.

The ffms2-like cachefile argument is a welcome addition, although I've still found it a bit of an annoyance because you can't re-open the index file directly (with MeGUI) unless it's in the same directory as the source.

DGIndex has worked that way forever. The path to the source is stored in the index file and it becomes the source for DGDecode. Maybe a new argument to make including the source path optional might be a compromise? Obviously LWLibavVideoSource has the ability to open an index file, so it seems a pity to lose that completely when it'd often be useful.

Last edited by hello_hello; 9th December 2019 at 22:25.
hello_hello is offline   Reply With Quote
Old 10th December 2019, 05:49   #1064  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by HolyWu View Post
Use a more maintained GUI other than MeGUI. End of the story.
So that's why not writing the source path to the index file is an improvement rather than a step backwards... because MeGUI isn't always updated quickly. I'd not seen the obvious connection until now.
hello_hello is offline   Reply With Quote
Old 10th December 2019, 23:37   #1065  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,806
Quote:
Originally Posted by hello_hello View Post
So that's why not writing the source path to the index file is an improvement rather than a step backwards... because MeGUI isn't always updated quickly. I'd not seen the obvious connection until now.
Index file should not contain hardcoded Path to a file. End of the story.
Atak_Snajpera is offline   Reply With Quote
Old 11th December 2019, 00:42   #1066  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Quote:
Originally Posted by Atak_Snajpera View Post
Index file should not contain hardcoded Path to a file. End of the story.
Says who? Are there any coding guidelines which tell this?

LSmash is just following the good old DGIndex example, and I never heard any complaints about the d2v file format. I just rechecked with the latest DGIndex version:
Quote:
DGIndexProjectFile16
1
F:\Download\DVD_test.mpg
manolito is offline   Reply With Quote
Old 11th December 2019, 02:37   #1067  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
Quote:
Originally Posted by manolito View Post
Says who? Are there any coding guidelines which tell this?

LSmash is just following the good old DGIndex example, and I never heard any complaints about the d2v file format. I just rechecked with the latest DGIndex version:

DGIndexProjectFile16
1
F:\Download\DVD_test.mpg
Atak has a point; an index file that does not hardcode the path to the source-file implies ~portability~. By the way, a .GRF file generated by GraphEdit or GraphStudio is not an index of course but it also breaks the portability of the source-file(s) because of the hardcoded paths.

Last edited by filler56789; 11th December 2019 at 02:39. Reason: disambiguation
filler56789 is offline   Reply With Quote
Old 11th December 2019, 02:59   #1068  |  Link
videoh
Useful n00b
 
Join Date: Jul 2014
Posts: 1,667
You can omit full paths too with DGIndex, leaving just the bare filename, which makes things relative to the current directory, and such that the files can be moved together to a new location without needing re-indexing.
videoh is offline   Reply With Quote
Old 11th December 2019, 08:13   #1069  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by manolito View Post
Says who? Are there any coding guidelines which tell this?

LSmash is just following the good old DGIndex example, and I never heard any complaints about the d2v file format. I just rechecked with the latest DGIndex version:
That's why I've mentioned DGIndex/DGDecode in a few posts, thinking from there it'd be natural to question why it's a problem for LSMash but not DGIndex. Instead there's been two posts claiming "end of story" status without explaining why it's a bad thing, or why an option to enable/disable it wouldn't keep everyone happy (and it'd allow Lsmash to keep playing nice with GUIs).

The cachefile argument is nice to have, but from the perspective of someone who uses a GUI, the ability to specify it's location isn't as useful when the index file doesn't know where the source is, as it can't be opened directly later on unless it's in the source folder. Could we have a show of hands from those who often use the cachefile argument without specifying a location other than the source folder? Does anyone regularly give index files fun names while still writing them to the same folders as the source?

What about something like this? If the cachefile argument isn't used, or of the index file is written to the source folder, by default LSmash would not save the full path to the index file. If the index file is not written to the same folder as the source, then by default LSmash would write the full path. A FilePath argument would allow the user to over-ride those defaults. Just a thought...

Last edited by hello_hello; 11th December 2019 at 08:53.
hello_hello is offline   Reply With Quote
Old 11th December 2019, 10:09   #1070  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Embedding the filename in the index may or may not have been a good idea to begin with, but breaking things without good reason is also not a good idea.

EDIT: Is/was also a lousy (and lazy) idea for MeGUI to use embedded filename to load source, I was a bit shocked to discover that it did that.
__________________
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; 11th December 2019 at 10:14.
StainlessS is offline   Reply With Quote
Old 11th December 2019, 12:44   #1071  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by StainlessS View Post
EDIT: Is/was also a lousy (and lazy) idea for MeGUI to use embedded filename to load source, I was a bit shocked to discover that it did that.
I don't know if I'd call it lazy, because the path is saved to the index file, and LWLibavVideoSource can obviously open index files, and I suspect that's by design rather than accident. but if the index file wasn't located in the source folder there was no way to tell LWLibavVideoSource where to find it, until recently. Lsmash has only had a cachefile argument for roughly 15 minutes. Why is it considered normal for DGDecode to load d2v files but evil for everyone else?

While I'm defending MeGUI....
If I remember correctly adding Lsmash as an indexer wasn't completely straightforward. I don't think older versions report the indexing progress because I recall Zathor saying he had to find a way to let MeGUI know when it finished, and MeGUI had to be taught to move the index files to the working directory so lsmash wouldn't be embarrassed in the company of cachefile enabled indexers.

So.... the index files are in the working directory and it's time to create a new script from scratch. MeGUI can open d2v index files and until recently it worked the same way for lsmash, but not so much for ffms2 because the index file has no idea where the source file is. You can work around it by manually moving/copying the index file to the source directory and open it as the source in MeGUI's script creator. MeGUI will create a new script with the index file specified for the cachefile argument. I assume the index file must be named correctly for MeGUI to get the source name right.

Last edited by hello_hello; 11th December 2019 at 13:31.
hello_hello is offline   Reply With Quote
Old 11th December 2019, 13:33   #1072  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,806
Quote:
Originally Posted by manolito View Post
Says who? Are there any coding guidelines which tell this?
Mr. Common sense my friend... No guidelines needed.

Last edited by Atak_Snajpera; 11th December 2019 at 13:37.
Atak_Snajpera is offline   Reply With Quote
Old 11th December 2019, 16:08   #1073  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by Atak_Snajpera View Post
Mr. Common sense my friend... No guidelines needed.
Does the source path saved to the index file play any part in determining if the source and index file are a match? I assume not, given it's no longer written to the index file, so would it be logical to assume it only tells Lsmash where to find the source that's expected to match?

My questions are.... well they're not actually my questions, but Mr. Common Sense will hassle me relentlessly until I ask on his behalf.....

Mr. Common Sense is keen to understand why the source/path info in the index file couldn't be ignored when LWLibavVideoSource is opening a video file directly, and why it wouldn't function exactly as it does without it. He's quite adamant the freedom to rename or move files won't change whether the source/path info in the index file is ignored or it's not written-in the first place.

Mr. Common Sense is insisting if the source info written to the index file is only used when an index file becomes the source for LWLibavVideoSource it's so obviously common sense that the index file should include the video file's location, not including it becomes borderline mental. There's no cachefile-equivalent argument for specifying the video file's location when opening index files.

Mr. Common Sense wants me to emphasise his/my entire post is purely a common sense view of how the world should work, with possibly no basis in reality, due to common sense being so uncommon.

Last edited by hello_hello; 11th December 2019 at 16:28.
hello_hello is offline   Reply With Quote
Old 11th December 2019, 16:42   #1074  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,806
Quote:
Originally Posted by hello_hello View Post
Does the source path saved to the index file play any part in determining if the source and index file are a match? I assume not, given it's no longer written to the index file, so would it be logical to assume it only tells Lsmash where to find the source that's expected to match?

My questions are.... well they're not actually my questions, but Mr. Common Sense will hassle me relentlessly until I ask on his behalf.....

Mr. Common Sense is keen to understand why the source/path info in the index file couldn't be ignored when LWLibavVideoSource is opening a video file directly, and why it wouldn't function exactly as it does without it. He's quite adamant the freedom to rename or move files won't change whether the source/path info in the index file is ignored or it's not written-in the first place.

Mr. Common Sense is insisting if the source info written to the index file is only used when an index file becomes the source for LWLibavVideoSource it's so obviously common sense that the index file should include the video file's location, not including it becomes borderline mental. There's no cachefile-equivalent argument for specifying the video file's location when opening index files.

Mr. Common Sense wants me to emphasise his/my entire post is purely a common sense view of how the world should work, with possibly no basis in reality, due to common sense being so uncommon.
You are barking under wrong tree. You should bark under MeGUI tree...
Atak_Snajpera is offline   Reply With Quote
Old 11th December 2019, 21:00   #1075  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by Atak_Snajpera View Post
You are barking under wrong tree. You should bark under MeGUI tree...
It's not about MeGUI. It's about fixing something in lsmash that wasn't broken (in my opinion).
Mr. Common Sense is beginning to suspect if there's a good argument for never writing the source path to the index file, someone would've offered it by now, or maybe explained why I'm wrong for thinking it should at least be optional, or something....

On a completely different subject, the usual expression is "barking up the wrong tree", in case you weren't aware. Unless that's an alternative version I've not heard before.

Last edited by hello_hello; 11th December 2019 at 21:06.
hello_hello is offline   Reply With Quote
Old 11th December 2019, 21:40   #1076  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 321
Nothing is broken in lsmash, only something is broken in megui if you try to use an unsupported fork of that plugin on that gui. Is as simple as using another fork, or asking the megui author for an update.
Are_ is offline   Reply With Quote
Old 12th December 2019, 08:32   #1077  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by HolyWu View Post
I don't know why or what you are insisting upon.
There's no insisting taking place. I'm just waiting for someone to answer a single question I've asked or to explain what problems were fixed by the change. I'm starting to accept that's not realistic, as even beginning my last post with "it's not about MeGUI" didn't help.

Quote:
Originally Posted by HolyWu View Post
FFMS2 also doesn't write the source path to the index file. Does any of the FFMS2/MeGUI users (except you) complain or get annoyed because he/she couldn't directly use the index file as the source for whatever ridiculous reasons?
I've explained how MeGUI works around that shortcoming, but as long as the index file is in the same folder as the source you can "open it" to create a new script. A GUI can't add the cachefile argument to a script if the index file isn't in the source folder because it can't know it exists, and if it is in the source folder there's probably no need to use the cachefile argument anyway.

Quote:
Originally Posted by HolyWu View Post
It's simply that an user updated a plugin on his/her own but MeGUI hasn't been updated yet to keep up with the latest changes. Since MeGUI can use the media file as the source and make use of the cachefile argument for FFMS2, the developer of MeGUI can just do the same thing as well for lsmash.
Obviously.... and someone donating their time to update a program or plugin is something I appreciate even when they've changed something I'd prefer they hadn't, and even when the change forces someone else to donate their time to accommodate it. I mostly use a PC running XP and an old version of lsmash, so I only posted here because I stumbled across the lsmash/MeGUI question and the replies seemed to indicate it's not common knowledge lsmash could open index files directly. I still think removing that ability completely was the wrong choice, but for some reason everyone wants to talk about MeGUI instead.

Last edited by hello_hello; 12th December 2019 at 09:31.
hello_hello is offline   Reply With Quote
Old 13th December 2019, 11:13   #1078  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,823
Quote:
Originally Posted by HolyWu View Post
The index file is rebuilt needlessly due to InputFilePath field when the users move/rename the files or the folder containing the files to another folder/drive, or when open the media file on another computer via network path. It simply offers no real benefits at all.
Do you mean aside from allowing you to open the index file directly? Was it not possible to open the index file in notepad to change the InputFilePath field after renaming or moving files?

Quote:
Originally Posted by HolyWu View Post
Because the author of lsmash never formally documented it in the readme to tell the users to open the index file directly.
That does seem odd, but it explains how the change could've been made without knowing it'd break something.

Quote:
Originally Posted by HolyWu View Post
Please tell me under what circumstances would an user bother to take another unnecessary step to modify the script and append .lwi at the end of source path just for LWLibavVideoSource to specifically open the index file while it already could directly open the media file just fine.
In that scenario, I can't think of a reason to do so.

Quote:
Originally Posted by HolyWu View Post
You kept yelling how useful that ability was for everyone
Are you mistaking calmly answering questions for yelling or are you being childish?

Quote:
Originally Posted by HolyWu View Post
but actually the point was only meant to satisfy the bad design of MeGUI. Fortunately we have other more actively developed/maintained GUIs in the forum and the users can have better choices.
Which other GUI's are you referring to? I'd like to try them. I assume you're referring to GUI's that index a source but don't repeat the process if you open it a second time. Which one would you recommend and how does it work in that respect?

I use AVISynthesizer quite a bit for creating scripts. In case you're not aware of it, you create templates to use via Explorer's right click menu and AVISynthesizer adds the path/source details and creates the script. When the index file wasn't in the source folder you could previously use it instead of the source, or even create a new script manually without requiring any tedious typing for the cachefile argument, and even when doing so to open it in avspmod.
Admittedly, that sort of thing only qualifies as a minor annoyance, but we all do things differently. Not everyone creates a script to open and index a source in avspmod before moving or renaming the source file.

I honestly don't care that much if lsmash remains the way it is, but the refusal to acknowledge there might have been a better way to solve the source renaming/moving problem does baffle me a little, as does attempting to blame a GUI or label it as badly designed, especially if the change was made without knowing index files could be used as the source.

Last edited by hello_hello; 13th December 2019 at 18:20.
hello_hello is offline   Reply With Quote
Old 13th December 2019, 11:39   #1079  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 321
I know I already bit the bait but, shouldn't we ignore the obvious troll? He doesn't use the plugin but he's just wasting others time with ridiculous questions nobody cares just because he's probably bored and all. In the last post he even retorted to mild insulting, sad view.
Are_ is offline   Reply With Quote
Old 13th December 2019, 14:56   #1080  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
I'm not fond of religious wars in technical forums.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is online now   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 13:16.


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