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 11th December 2019, 00:42   #1101  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,682
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   #1102  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 969
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   #1103  |  Link
videoh
Registered User
 
Join Date: Jul 2014
Posts: 1,062
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   #1104  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,033
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   #1105  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,371
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 online now   Reply With Quote
Old 11th December 2019, 12:44   #1106  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,033
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   #1107  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,324
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 online now   Reply With Quote
Old 11th December 2019, 16:08   #1108  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,033
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   #1109  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,324
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 online now   Reply With Quote
Old 11th December 2019, 21:00   #1110  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,033
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   #1111  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 293
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, 04:21   #1112  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 686
I don't know why or what you are insisting upon. 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? 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.

Last edited by HolyWu; 12th December 2019 at 04:47.
HolyWu is offline   Reply With Quote
Old 12th December 2019, 08:32   #1113  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,033
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, 05:46   #1114  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 686
Quote:
Originally Posted by hello_hello View Post
I'm just waiting for someone to answer a single question I've asked or to explain what problems were fixed by the change.
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.


Quote:
Originally Posted by hello_hello View Post
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.
Because the author of lsmash never formally documented it in the readme to tell the users to open the index file directly. Note that the index file has to be created first before it could be opened. So a non-MeGUI user would write something like LWLibavVideoSource("D:\foo\bar.mkv") and then preview the script by programs like AvsPmod or VirtualDub2 to make sure it looks right and to trigger the creation of the index file at the same time. Now the index file is created and the script could be sent to the encoder. 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. You kept yelling how useful that ability was for everyone 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.
HolyWu is offline   Reply With Quote
Old 13th December 2019, 11:13   #1115  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,033
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   #1116  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 293
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   #1117  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,983
I'm not fond of religious wars in technical forums.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 13th December 2019, 18:19   #1118  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,033
Quote:
Originally Posted by Are_ View Post
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.
FFS, that'll teach me to post about something that doesn't effect me at the moment simply to help someone else understand a problem they were having. I do use the plugin, but I don't use the current version and I made the reason for that clear. I'm sorry you didn't understand... and all... but in case I need to state the obvious, I'd prefer to eventually use a more recent version, only I'd rather it retained the ability to open index files.

For the record, it's not the 1990's and the only trolls in forums are the ones who troll by insulting others with accusations of trolling. Did you forget to discuss the topic or were you just bored?

Last edited by hello_hello; 13th December 2019 at 18:28.
hello_hello is offline   Reply With Quote
Old 13th December 2019, 19:46   #1119  |  Link
videoh
Registered User
 
Join Date: Jul 2014
Posts: 1,062
Suppose you want to load a series of M2TS files which are scattered in a directory and not in sort order (just about any bluray/UHD disk). Another case is multiple VOBs from a DVD. Loading a DGIndex(NV) project file will conveniently and automatically load them all in order, because the file list is stored in the index file. Without that you'd have to navigate to and tediously select all the files again every time you want to work on the project again. Is this something applicable here? If smash whatever can only load one source file then it would be irrelevant. I don't know enough about the smash stuff to know if this is relevant, but it sure is a big advantage for DGIndex(NV) to have that capability.

Last edited by videoh; 13th December 2019 at 19:55.
videoh is offline   Reply With Quote
Old 13th December 2019, 19:52   #1120  |  Link
videoh
Registered User
 
Join Date: Jul 2014
Posts: 1,062
Quote:
Originally Posted by LigH View Post
I'm not fond of religious wars in technical forums.
LigH arrogantly thinks that what he is fond of is an important consideration. Newsflash, nobody cares what you are fond of.
videoh 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 19:57.


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