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 > Video Encoding > MPEG-4 Encoder GUIs
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd October 2017, 20:48   #2621  |  Link
Yanak
Registered User
 
Join Date: Oct 2011
Posts: 275
Thanks stax,
I'm in a hurry so i have not tested yet but will do later at night, did not thought about this, as always you are a savior, thanks a lot, this is brilliant.

I use Mp_Pipeline for a remove logo plugin, and quite some other things, here it was just an example, i load source in manual mode when i need something specific done and select one of the mp_pipeline custom source filters for the task.

MP_Pipeline needs to have the source loaded and the loadplugin for it in the same part of the script, like here :
Quote:
MP_Pipeline("""
### platform: win64
LoadPlugin("%startup_dir%Apps\Plugins\avs\L-SMASH-Works\LSMASHSource.dll") LSMASHVideoSource("%source_file%", format = "YUV420P8")
### ###

### platform: win32
x86 filters here
### ###
""")
It can't use the auto loaded plugins at the very start of the script nor get a source file passed there with a variable ( did not tried srcFile= method but will also give it a try, who knows it might work used this way. )

Not sure yet how i will do this but will explore the links and do by trial and error as always. Probably possible to combine the loadplugin and source in the same line of code or at worst i will make 2 lines, probably like this :

Quote:
(ext == "mp4") ? LoadPlugin("%startup_dir%Apps\Plugins\avs\L-SMASH-Works\LSMASHSource.dll") : LoadPlugin("%startup_dir%Apps\Plugins\avs\DSS2mod\DSS2.dll")

(ext == "mp4") ? LSMASHVideoSource(srcFile, format = "YUV420P8") : DSS2(srcFile)
And so on for a few more type of source files and plugins needed, or not bother and just load all plugins in this part of the script so it will be done, as long as the rest works and select the right plugin it should be good enough.

Again thanks a lot for the help, you opened a lot of new possibilities for me, now i will probably be busy for a few days working on this ^^

Last edited by Yanak; 3rd October 2017 at 20:52.
Yanak is offline   Reply With Quote
Old 3rd October 2017, 22:57   #2622  |  Link
mparade
Registered User
 
Join Date: Nov 2013
Posts: 577
Quote:
Originally Posted by stax76 View Post
StaxRip is much older (since 2002) then makemkv, before vob file input was used, this workflow is still supported but some DVD structures cause issues due to tools in this workflow cannot handle such structures well, in particularly when processing subtitles. Many US users prefer the old workflow to deal with field processing and many US users don't process subtitles, for PAL users makemkv is much better. You would open vob in staxrip using the 'Merge Files' source opening method.

3D BD I don't know, certainly not without user customization.
Thanks again for the answer and great software. I will check your software on my DVD-collection soon (They are PAL and mostly only the main feature will be processed). So, the more "problematic" will be recognizing the 3D BDs correctly using StaxRip. Even if I converted them using makemkv the result would be a very large 3D mvc format inside a container. I know generally how to build up an avs script for a mvc-sbs conversion using FrimSource but not exactly know what "user customization" should exactly mean in that regard. In my experience with BD-RB a lot of bandwidth can be saved (even with a low crf value, like 16 or so) with an sbs/tab method compared to the original mvc encoded source.
mparade is offline   Reply With Quote
Old 3rd October 2017, 23:11   #2623  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
You can add custom filters like FrimSource at:

Filters > Profiles

Before opening a 3D source you would select FrimSource or you can use the 'Manual Workflow' template, staxrip would show a dialog then where you can select FrimSource.
stax76 is offline   Reply With Quote
Old 4th October 2017, 00:47   #2624  |  Link
Magik Mark
Registered User
 
Join Date: Dec 2014
Posts: 666
Stax,

Can't find the download links anymore
__________________
Asus ProArt Z790 - 13th Gen Intel i9 - RTX 3080 - DDR5 64GB Predator - LG OLED C9 - Yamaha A3030 - Windows 11 x64 - PotPlayerr - Lav - MadVR
Magik Mark is offline   Reply With Quote
Old 4th October 2017, 00:57   #2625  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
The new location is here:

http://staxrip.readthedocs.io/intro.html#download

The google drive app had a high CPU usage bug so I replaced it with dropbox.
stax76 is offline   Reply With Quote
Old 4th October 2017, 01:17   #2626  |  Link
Magik Mark
Registered User
 
Join Date: Dec 2014
Posts: 666
Thanks!
__________________
Asus ProArt Z790 - 13th Gen Intel i9 - RTX 3080 - DDR5 64GB Predator - LG OLED C9 - Yamaha A3030 - Windows 11 x64 - PotPlayerr - Lav - MadVR
Magik Mark is offline   Reply With Quote
Old 4th October 2017, 15:57   #2627  |  Link
Yanak
Registered User
 
Join Date: Oct 2011
Posts: 275
Hi Stax i ended up with this :
Quote:
MP_Pipeline =
SetFilterMtMode("MP_Pipeline",MT_SPECIAL_MT)
MP_Pipeline("""
### platform: win64
srcFile = "%source_file%"
ext = LCase(RightStr(srcFile, 4))

(ext == ".mov") || (ext == ".mp4") || (ext == ".m4v") || (ext == ".264") || (ext == "h264") || (ext == ".avc") || (ext == ".265") || (ext == "h265") || (ext == "hevc") || (ext == ".hvc") ? LoadPlugin("%startup_dir%Apps\Plugins\avs\L-SMASH-Works\LSMASHSource.dll") : \
(ext == ".d2v") ? LoadPlugin("%startup_dir%Apps\Plugins\avs\MPEG2DecPlus\MPEG2DecPlus64.dll") : \
LoadPlugin("%startup_dir%Apps\Plugins\avs\DSS2mod\DSS2.dll")

(ext == ".mov") || (ext == ".mp4") || (ext == ".m4v") ? LSMASHVideoSource(srcFile, format = "YUV420P8") : \
(ext == ".264") || (ext == "h264") || (ext == ".avc") || (ext == ".265") || (ext == "h265") || (ext == "hevc") || (ext == ".hvc") ? LWLibavVideoSource(srcFile, format = "YUV420P8") : \
(ext == ".avi") || (ext == ".vdr") ? AviSource(srcFile, Audio = False) : \
(ext == ".d2v") ? MPEG2Source(srcFile) : \
DSS2(srcFile)

### ###
### platform: win32
X86 Filters Here
### ###
""")
Not the most elegant stuff but it does the job nicely, thanks again for the help on this.

Now if i can bother you a bit again I have another question ( it will be my last one for a while i promise ) : Can i call and insert in my scripts a filter with a simple macro ? Something like :
%Add_filter:name_of_the_filter%

That will insert itself inside the script at the line where it is called ( not like the CLI switch that gets added at the end of the script )

Goal is to then make all my x86 custom filters inside a user created filter category and then in the source script above list and call them in a blink with a prompt
$select:msg:Select x86 filter;filter1|%Add_filter:Logo_Remover%;filter2|%Add_filter:VirtualDubx86Plugins% $

### ###
### platform: win32
$select:msg:Select x86 filter;filter1|%Add_filter:Logo_Remover%;filter2|%Add_filter:VirtualDubx86Plugins% $
### ###
""")

some of the x86 filters i use in Mp_Pipeline already have loads of prompts, input boxes or browse file in them and it's a pain as some things can not be nested , for example : https://pastebin.com/e0kJbsdx

But if it is possible to call & insert a filter with something like %Add_filter:name_of_the_filter% i'll just have to turn all my things into filters for a easier and quicker use.
Then create a selection prompt to add them where i want in my scripts, It will also make the possibility to use and add pure x86 avisynth filters way more easily than it is now, probably eliminate some of the nesting issues too and allow some loops too i guess, this will be the ultimate icing on the cake



Thank you .

Last edited by Yanak; 4th October 2017 at 16:29.
Yanak is offline   Reply With Quote
Old 5th October 2017, 07:31   #2628  |  Link
mparade
Registered User
 
Join Date: Nov 2013
Posts: 577
@stax76

If I have several .avi containers and during import I select "merge files" is it possible to set chapter points at the merging points? I just want to jump to the merging points in the final output file, is it possible? In Vdub I will prepare the files for StaxRip. I could save my files as 1 pc of long avi. In this case I would need to determine the scene changes for StayRip to encode properly. Or I can save as multiple avi files which then would be merged with StaxRip but in this case the merging points should be the chapter points as well. Does Staxrip have some chapter handling capability (in case of merged container files, not BD input)?

Thank you very much.

Last edited by mparade; 5th October 2017 at 07:36.
mparade is offline   Reply With Quote
Old 5th October 2017, 11:27   #2629  |  Link
Magik Mark
Registered User
 
Join Date: Dec 2014
Posts: 666
Stax

I get this error everytime encoding is finish and staxrip is set to "close" AND my Chrome browser is open and active:

__________________
Asus ProArt Z790 - 13th Gen Intel i9 - RTX 3080 - DDR5 64GB Predator - LG OLED C9 - Yamaha A3030 - Windows 11 x64 - PotPlayerr - Lav - MadVR
Magik Mark is offline   Reply With Quote
Old 5th October 2017, 16:58   #2630  |  Link
mparade
Registered User
 
Join Date: Nov 2013
Posts: 577
Quote:
Originally Posted by stax76 View Post
You can add custom filters like FrimSource at:

Filters > Profiles

Before opening a 3D source you would select FrimSource or you can use the 'Manual Workflow' template, staxrip would show a dialog then where you can select FrimSource.
I will check it shortly because I could save ~50% of bitrate with this mvc - full sbs conversion method using FrimSource and x264 with a low crf value if works (aim is visual transparency which is subjective). Do you recommend a conversion stage at first in makemkv before feeding StaxRip? Or should I try directly a 3D BD folder? As far as I know, it was not easy for other softwares as well to implement 3D handling capabilities.

Thanks again. The results of my first 2D BD projects are
excellent (no bugs found yet and I really like the large number of functions, capabilities available). Thank you for the great program I am much obliged.
mparade is offline   Reply With Quote
Old 5th October 2017, 20:14   #2631  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
Can i call and insert in my scripts a filter with a simple macro ? Something like :
%Add_filter:name_of_the_filter%
Yes you can using the eval_ps macro, create a script containing a function that returns your filter:

Code:
$s = [ShortcutModule]::s

function GetFilter($name)
{
    foreach ($i in $s.AviSynthProfiles)
    {
        foreach ($i2 in $i.Filters)
        {
            $temp = $i2
            if ($name -eq $temp.Name)
            {
                return $temp.Script
            }
        }
    }
}
Then in your eval_ps macro argument you can import your script using powershell's dot sourcing.

Code:
%eval_ps:. C:\Users\Frank\AppData\Roaming\StaxRip\Scripts\test.ps1; GetFilter("RemoveGrain")%
info about dot sourcing:

http://jeffwouters.nl/index.php/2015...nd-why-use-it/

Quote:
If I have several .avi containers and during import I select "merge files" is it possible to set chapter points at the merging points?
For merging staxrip uses either dgmpgdec or mkvmerge, it don't support creating chapters at the merge points and I don't know if there is an easier way than writing script code, here is a tool you can try:

https://forum.doom9.org/showthread.php?t=169984

Quote:
I get this error everytime encoding is finish and staxrip is set to "close" AND my Chrome browser is open and active:
It's fixed in the next build.

Quote:
Or should I try directly a 3D BD folder? As far as I know, it was not easy for other softwares as well to implement 3D handling capabilities.
I remember a staxrip issue with 3D and eac3to but I don't remember details.
stax76 is offline   Reply With Quote
Old 5th October 2017, 22:28   #2632  |  Link
mcjordan
Registered User
 
Join Date: Nov 2010
Posts: 124
Latest mkvtoolnix (v16.0 r01574/r01572; on r01570 this behavior is not present)
gone in heaven on final muxing phase with error aka:

----------------- Error Muxing using mkvmerge 16.0 x64 -----------------

Muxing using mkvmerge 16.0 x64 failed with exit code: -1073740940 (0xC0000374)

The exit code might be a system error code: A heap has been corrupted.
---
In log under that I've a doubled section of "Muxing using mkvmerge 16.0 x64" etc. mkvtoolnix command line order. Muxing failed in this case.
I've not made screenshot (may be later; now is after midnight), but on error window I see numerous VBS line tags.
I'm under Win 10 LTSB. Тomorrow on а fresh head I'm going to investigate this case... Sorry for disturbance.
mcjordan is offline   Reply With Quote
Old 6th October 2017, 09:21   #2633  |  Link
mcjordan
Registered User
 
Join Date: Nov 2010
Posts: 124
Here is screenshot of failed muxing:
http://imgbox.com/y6RHSFjJ#
mcjordan is offline   Reply With Quote
Old 6th October 2017, 13:43   #2634  |  Link
Yanak
Registered User
 
Join Date: Oct 2011
Posts: 275
Hi Stax,
the last bits of code works nicely, always learning something new with you and this will serve me for some things i had in plan but had no idea how to do it until your last answer, but for my import filter last question sadly i cannot use this code inside a
Code:
$select:msg:Select x86 filter;bla|bla;blabla|blabla$
because of the semi colon inside the eval_Ps line breaking it all
Code:
%eval_ps:. %script_dir%Import_Filter.ps1; GetFilter("Rotate")%
I think i will not bother more with this part, i need to take time and rethink my approach of this problem, think at another way for doing what i want, probably directly using powershell to set all parameters, might be longer to code such thing for the noob i am but giving less issues in the end.


Now i have to figure out why as long as i have "LWLibavVideoSource" in my filter the program launches -- Index LWLibav -- sequence, each time i open or close a preview ... either with this in a ternary expression like code posted earlier here : http://forum.doom9.org/showthread.ph...03#post1820703

or using it in a source filter having Gscript on it like here :
Code:
Source_Filter_Test = 
    srcFile = "%source_file%"
    ext = LCase(RightStr(srcFile, 4))
    if ( (ext == ".avi") || (ext == ".vdr") ) {
    AviSource(srcFile, Audio = False)
    }
    else if ( (ext == ".mov") || (ext == ".mp4")  || (ext == ".m4v") ) {
    LSMASHVideoSource(srcFile, format = "YUV420P8")
    }
    else if ( (ext == ".264") || (ext == "h264")  || (ext == ".avc")  || (ext == ".265")  || (ext == "h265")  || (ext == "hevc")  ||  (ext == ".hvc") ) {
    LWLibavVideoSource(srcFile, format = "YUV420P8")
    }
    else if ( (ext == ".d2v") ) {
    MPEG2Source(srcFile)
    }
    else {
    DSS2(srcFile)
    }
It have to be compressed into a single line to avoid formating issues in the profiles manager but this works.

As long as LWLibavVideoSource(srcFile, format = "YUV420P8") is present on the code filter Staxrip launches --- Index LWLibav -- processes on file load, even if the file is an avi using avisource for example, then this --- Index LWLibav -- process is also launched each time the preview is opened or closed. Tested also outside MP_Pipeline and same results when code above is used as a regular source filter. once i remove the LWLibavVideoSource part it works nicely as expected...

Seems also to work ok outside staxrip in avspmod but once inside Staxrip filter it launched the index process, i spend last hours trying to figure this out and starting to have a headache now.

Thanks a lot.

Last edited by Yanak; 6th October 2017 at 13:50.
Yanak is offline   Reply With Quote
Old 6th October 2017, 19:44   #2635  |  Link
Taurus
Registered User
 
Taurus's Avatar
 
Join Date: Mar 2002
Location: Krautland
Posts: 903
This is what I get trying Avisynth+ new "mClean" on any suitable SourceFilter/ or any encoder.



All other new scripts (Finesharp,etc.) are doing fine
Taurus is offline   Reply With Quote
Old 6th October 2017, 20:50   #2636  |  Link
mparade
Registered User
 
Join Date: Nov 2013
Posts: 577
Quote:
Originally Posted by stax76 View Post
You can add custom filters like FrimSource at:

Filters > Profiles

Before opening a 3D source you would select FrimSource or you can use the 'Manual Workflow' template, staxrip would show a dialog then where you can select FrimSource.
StaxRip told: "3D demuxing is not supported"
Additionally, there should be some syntax errors in this as well:

Quote:
FRIMSource = SBS=FRIMSource(codec="mvc",filename="%source_file%",filename_dep="%source_file%",layout="sbs",ts=true,platform="sw",cache=24,num_frames=%frame_count%)
VIEW1 = Crop(SBS,1920,0,1920,1080)
VIEW2 = Crop(SBS,0,0,1920,1080)
mparade is offline   Reply With Quote
Old 6th October 2017, 22:05   #2637  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
@mcjordan

Please also try mkvtoolnix 15.0.0 and post the full log file if it persists.

Quote:
Now i have to figure out why as long as i have "LWLibavVideoSource" in my filter the program launches -- Index LWLibav -- sequence, each time i open or close a preview ... either with this in a ternary expression like code posted earlier here : http://forum.doom9.org/showthread.ph...03#post1820703
Is it really indexing or just reading the index file, the l-smash index file can be large like 1GB and just reading it can take 10-20 sec.

Quote:
This is what I get trying Avisynth+ new "mClean" on any suitable SourceFilter/ or any encoder.
mClean 1.8 with x264 works here on Win 10 and Win 7.

Quote:
StaxRip told: "3D demuxing is not supported"
I can't find a sample otherwise I would try to add support.

Quote:
Additionally, there should be some syntax errors in this as well:
What error do you get?
stax76 is offline   Reply With Quote
Old 6th October 2017, 22:29   #2638  |  Link
Yanak
Registered User
 
Join Date: Oct 2011
Posts: 275
Quote:
Is it really indexing or just reading the index file, the l-smash index file can be large like 1GB and just reading it can take 10-20 sec.
The window process pops out quickly.
If i add cache = true , like LWLibavVideoSource(srcFile, cache = true, format = "YUV420P8")
The .lwi file is sometimes created where the source file loaded is located, depends the file extension loaded, most often nothing is created, but there is a problem anyways, it goes too fast for an indexing and the log tell me this :
Quote:
---------------------------- Index LWLibav ----------------------------

C:\Users\Yanak\Desktop\StaxRip-x64-1.7.0.1-test\Apps\ffmpeg\ffmpeg.exe -i "H:\TEMP\Eisenwald 2017-08-17 11-51-34-58_temp\Eisenwald 2017-08-17 11-51-34-58.avs" -hide_banner

Input #0, avisynth, from 'H:\TEMP\Eisenwald 2017-08-17 11-51-34-58_temp\Eisenwald 2017-08-17 11-51-34-58.avs':
Duration: 00:00:52.70, start: 0.000000, bitrate: 0 kb/s
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080, 60 fps, 60 tbr, 60 tbn, 60 tbc
At least one output file must be specified

Start: 23:43:26
End: 23:43:27
Duration: 00:00:00
that was for a .avi file loaded

For a mp4 i get this kind of message :
Quote:
---------------------------- Index LWLibav ----------------------------

C:\Users\Yanak\Desktop\StaxRip-x64-1.7.0.1-test\Apps\ffmpeg\ffmpeg.exe -i H:\TEMP\00_temp\00_new.avs -hide_banner

[avisynth @ 000000000054a800] AviSynth version is too old. Please upgrade to either AviSynth 2.6 >= RC1 or AviSynth+ >= r1718.
H:\TEMP\00_temp\00_new.avs: Unknown error occurred

Start: 23:24:59
End: 23:24:59
Duration: 00:00:00
Strange message as i use last avs+ version ...

Those log entries get created each time i load a file + each time i open or close the preview mode, each time i load a file a file having an extension not supposed to trigger this source filter i mean, if i load a hvc or h264 input it works as supposed.

I can't figure out why this gets triggered while the extensions of the input files are not supposed to trigger it, also i don't demux sound or anything for those avi's or mp4's, it's a mystery for me.

Thank you.

Last edited by Yanak; 6th October 2017 at 22:44.
Yanak is offline   Reply With Quote
Old 6th October 2017, 22:42   #2639  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
The automatic indexing isn't really designed for having multiple source filters in the source section, maybe you could put your automatic source detection code in a avsi file, this would disable automatic indexing.
stax76 is offline   Reply With Quote
Old 6th October 2017, 22:48   #2640  |  Link
Yanak
Registered User
 
Join Date: Oct 2011
Posts: 275
Will try this method yes, at least for the LWLibavVideoSource that gives the problem, if i remove LWLibavVideoSource from the source filter all works perfectly fine...
Will try to add it into a separate script and see if i can call it only when needed, in case the input file extension is needing it only.

Thank you very much for the help Stax, very kind from you to answer us for such things, and learning a bit more each day with all this.

Edit :

Importing from avsi having this only in it : LWLibavVideoSource(srcFile, format = "YUV420P8") and following code works :
Quote:
srcFile = "%source_file%"
ext = LCase(RightStr(srcFile, 4))
(ext == ".mov") || (ext == ".mp4") || (ext == ".m4v") || (ext == ".264") || (ext == "h264") || (ext == ".avc") || (ext == ".265") || (ext == "h265") || (ext == "hevc") || (ext == ".hvc") ? LoadPlugin("%startup_dir%Apps\Plugins\avs\L-SMASH-Works\LSMASHSource.dll") : \
(ext == ".d2v") ? LoadPlugin("%startup_dir%Apps\Plugins\avs\MPEG2DecPlus\MPEG2DecPlus64.dll") : \
LoadPlugin("%startup_dir%Apps\Plugins\avs\DSS2mod\DSS2.dll")
(ext == ".avi") || (ext == ".vdr") ? AviSource(srcFile, Audio = False) : \
(ext == ".mov") || (ext == ".mp4") || (ext == ".m4v") ? LSMASHVideoSource(srcFile, format = "YUV420P8") : \
(ext == ".264") || (ext == "h264") || (ext == ".avc") || (ext == ".265") || (ext == "h265") || (ext == "hevc") || (ext == ".hvc") ? import("H:\import.avsi") : \
(ext == ".d2v") ? MPEG2Source(srcFile) : \
DSS2(srcFile)
Should have tried this earlier to avoid hours of headache testing various options today, had nose pointed inside this for too long and it did not even came to my mind before :/.

Thanks again Stax, i think i will just bypass it this way.

Last edited by Yanak; 6th October 2017 at 23:03.
Yanak is offline   Reply With Quote
Reply


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 14:47.


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