View Full Version : Going from Windows To Linux, how would I...
Carpo
15th July 2011, 09:13
Change this
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("F:\DISC_RIPS\ERGO_PROXY_ep1\ergo_ep1.d2v", info=3)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, interlaced=true, threads=0)
Load_Stdcall_Plugin("C:\Program Files (x86)\MeGUI\tools\yadif\yadif.dll")
SetMTMode(5)
Yadif(order=1)
crop( 4, 2, 0, 0)
Spline36Resize(720,400) # Spline36 (Neutral)
GradFun2DBmod()
toon()
MSharpen()
#denoise
Into something that I could do on Linux, I am planing on upgrading my system to a Core i7 near to Xmas/New Year when they have the sales and will use the Q6600 I have now as a server come encode box, so thought I would get a head start now :)
I'd use AviSynth through avs2yuv on Wine, so nothing would need to be changed in the filtering side.
Carpo
15th July 2011, 10:26
is avisynth stable on wine? does dgindex dedecode work under wine?
is avisynth stable on wine?
Yes, perfectly stable.
does dgindex dedecode work under wine?
I have only used DGAVCDec a few times and it worked fine. If there are problems with DGMPGDec, FFMS2 should work well enough.
Carpo
15th July 2011, 10:31
suppose its time i compile wine and gave it a test, what would be the commandline i would have to use? could i use the linux version of x264 or would it have to use the windows version?
suppose its time i compile wine and gave it a test, what would be the commandline i would have to use? could i use the linux version of x264 or would it have to use the windows version?
With avs2yuv (http://akuvian.org/src/avisynth/avs2yuv/), you can pipe AviSynth output to any native Linux program that can read video from standard input or a named pipe. Simply put avs2yuv.exe together with AviSynth dlls and plugins to a directory and run it like this:
wine /path/to/avs2yuv.exe input.avs -o - | x264 --crf 20 --preset slower --tune film -o output.mkv --demuxer y4m -
Use a shell script to make calling easier.
Running a Windows build of x264 with AVS support on Wine should also work, but I haven't tried that myself.
Carpo
15th July 2011, 10:50
sweet, will have to try it all out in a bit :)
Carpo
15th July 2011, 12:10
what is the --demuxer y4m - bit for?
what is the --demuxer y4m - bit for?
Avs2yuv outputs yuv4mpeg by default. This raw format includes a header for frame size and frame rate, so they don't need to be specified on the x264 command line. --demuxer y4m tells x264 that the input is yuv4mpeg. The - part at the end means standard input (piped from avs2yuv -o -).
Carpo
15th July 2011, 12:28
Okay, thanks for the info :) - will report back any failures or success :D
Carpo
15th July 2011, 17:11
ok last Q, have most running now, usually I would use MeGUI to make the avs but seeing as MeGUI doesn't work under Linux (not that i have go it working) how would i now what way to de-interlace some of the content I have.
Also how do i get around the fact its telling me it cant load avisynth.dll even though its there, do i need to add that to the .avs file?
ok last Q, have most running now, usually I would use MeGUI to make the avs but seeing as MeGUI doesn't work under Linux (not that i have go it working) how would i now what way to de-interlace some of the content I have.
Learn to recognize the content type yourself. For example mplayer -vf il=d separates fields so that you can see what is going on. Key . (dot) advances the video one frame at a time.
Also how do i get around the fact its telling me it cant load avisynth.dll even though its there, do i need to add that to the .avs file?
Avisynth.dll doesn't need to be loaded in the script. Have you also placed devil.dll to the same directory?
Carpo
15th July 2011, 22:39
devil.dll ? have not seen that dll
devil.dll ? have not seen that dll
"DevIL.dll" comes with AviSynth and gets installed to system32. If you install AviSynth with Wine, both avisynth.dll and devil.dll are put to .wine/drive_c/windows/system32 and they work from there. Alternatively you can copy them from an existing installation to the directory where avs2yuv.exe resides.
If you still have problems, post the full console output that you get from running avs2yuv.exe, and a file listing from its directory (preferably with ls -l).
Carpo
16th July 2011, 07:32
Thanks, wont be today as i have a wedding to go to, and well tomorrow may be a recovery day :p
RazrFalcon
16th July 2011, 12:12
Hi, trying to use it, but get this error:
$ wine '/home/razrfalcon/.wine/drive_c/Program Files/avs2yuv/avs2yuv.exe' '/home/razrfalcon/.wine/drive_c/Program Files/AviSynth 2.5/Examples/Autors.avs' -o - | x264 --crf 20 --preset slower --tune film -o output.mkv --demuxer y4m -
failed to load avisynth.dll
x264 [error]: could not open input file `-'
Avisynth.dll and devil.dll in ~/.wine/drive_c/windows/system32/
What is wrong? Thanks.
Hi, trying to use it, but get this error:
$ wine '/home/razrfalcon/.wine/drive_c/Program Files/avs2yuv/avs2yuv.exe' '/home/razrfalcon/.wine/drive_c/Program Files/AviSynth 2.5/Examples/Autors.avs' -o - | x264 --crf 20 --preset slower --tune film -o output.mkv --demuxer y4m -
failed to load avisynth.dll
x264 [error]: could not open input file `-'
Avisynth.dll and devil.dll in ~/.wine/drive_c/windows/system32/
Hmm. That should work. Try copying them to the same directory with avs2yuv. Which AviSynth version do they come from?
RazrFalcon
16th July 2011, 13:47
Try copying them to the same directory with avs2yuv.Didn't work. Still get this error.
v.2.5.8 ST, 32-bit at SourceForge
PS: ArchLinux x32
RazrFalcon
16th July 2011, 15:06
Fixed. I just install vcrun6 via winetricks. And move avs2yuv.exe to system32 directory.
Example:
$ wine avs2yuv.exe "/media/data/Authors.avs" -o - | x264 --crf 20 --preset slower --tune film -o output.mkv --demuxer y4m -
/media/data/Authors.avs: 448x448, 25 fps, 2562 frames
converting YUY2 -> YV12
y4m [info]: 448x448p 0:0 @ 25/1 fps (cfr)
x264 [info]: using cpu capabilities: MMX2 SSE2Slow SlowCTZ
x264 [info]: profile High, level 2.2
x264 [info]: frame I:15 Avg QP:14.52 size: 7872
x264 [info]: frame P:824 Avg QP:21.22 size: 1628
x264 [info]: frame B:1723 Avg QP:24.42 size: 87
x264 [info]: consecutive B-frames: 2.8% 5.8% 50.0% 41.4%
x264 [info]: mb I I16..4: 91.9% 0.3% 7.8%
x264 [info]: mb P I16..4: 4.8% 0.1% 0.1% P16..4: 11.3% 2.7% 2.0% 0.0% 0.0% skip:78.9%
x264 [info]: mb B I16..4: 0.2% 0.0% 0.0% B16..8: 4.9% 0.3% 0.0% direct: 1.8% skip:92.7% L0:26.3% L1:39.8% BI:33.9%
x264 [info]: 8x8 transform intra:1.9% inter:48.8%
x264 [info]: direct mvs spatial:26.8% temporal:73.2%
x264 [info]: coded y,uvDC,uvAC intra: 2.9% 17.2% 9.8% inter: 2.3% 6.5% 3.4%
x264 [info]: i16 v,h,dc,p: 94% 5% 1% 0%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 2% 4% 88% 0% 2% 1% 0% 1% 2%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 26% 26% 3% 6% 5% 6% 4% 10%
x264 [info]: i8c dc,h,v,p: 6% 4% 3% 86%
x264 [info]: Weighted P-Frames: Y:95.9% UV:2.1%
x264 [info]: ref P L0: 68.6% 13.8% 11.3% 4.6% 0.5% 0.5% 0.3% 0.1% 0.2% 0.2%
x264 [info]: ref B L0: 79.1% 18.4% 2.0% 0.3% 0.1% 0.0% 0.0%
x264 [info]: ref B L1: 62.2% 37.8%
x264 [info]: kb/s:125.65
encoded 2562 frames, 27.49 fps, 125.70 kb/s
http://storage2.static.itmages.ru/i/11/0716/s_1310825296_5c42ad859f.png (http://itmages.ru/image/view/232046/5c42ad85)
Big thanks nm
Ok, I just tried it on a clean Wine installation and looks like AviSynth also needs Microsoft Visual C++ 6 libraries (mfc42.dll, msvcp60.dll and msvcrt.dll). Wine does print out an error on this though, but maybe you have error messages disabled?
Anyway, easiest way to install those libraries is by winetricks (http://wiki.winehq.org/winetricks):
winetricks vcrun6sp6
RazrFalcon
16th July 2011, 15:28
Just as I said ^_^
Carpo
16th July 2011, 23:21
will have to try this in the morning :) :thanks:
RazrFalcon
19th July 2011, 16:40
Hello again.
I have some trouble with DGDecode_mpeg2source
Here is my script:
LoadPlugin("DGDecode.dll")
DGDecode_mpeg2source("Z:\media\data\Invader Zim\Disc 01\VIDEO_TS\VTS_02_1.d2v", info=3)
#DGDecode_mpeg2source("/media/data/Invader Zim/Disc 01/VIDEO_TS/VTS_02_1.d2v", info=3)
LoadPlugin("ColorMatrix.dll")
ColorMatrix(hints=true, interlaced=true, threads=0)
LoadPlugin("TIVTC.dll")
LoadPlugin("EEDI2.dll")
LoadPlugin("TDeint.dll")
edeintted = SeparateFields().SelectEven().EEDI2(field=-1)
tdeintted = TDeint(edeint=edeintted)
tfm(order=-1,clip2=tdeintted).tdecimate(hybrid=1)
crop( 4, 0, -4, 0)
Spline64Resize(640,480) # Spline64 (Sharp)
#denoise
And I have such error:
Avisynth error:
MPEG2Source: Could not open one of the input files.
(/media/data/Additional/ZimAvisynth.avs, line 18)
I understand, that problem with path, but I don't know how to fix it.
PS: script copied from MeGUI
Carpo
19th July 2011, 17:02
you have to use LoadPlugin("c\Program Files\Avisynth 2.5\plugins\DGDecode.dll")
or where ever you have the dll files, at the moment i have it complaining that yadif is not a valid avisynth plugin, so it wont de-interlace the content i have here :( Haven't tried with anything requiring ITVC yet
i also ran sh winetricks vcrun 2003/5/8/10 as it was complaining about other dlls missing
RazrFalcon
19th July 2011, 17:21
Disagree. Path is correct, because DGDecode.dll are in C:\Windows\system32.
When I write LoadPlugin("DGDecode2.dll") it says LoadPlugin: unable to load "DGDecode2.dll"
So problem with loading *.d2v file.
Carpo
19th July 2011, 18:31
and is this file in your system32 dir on windows? or is it in the megui directory? because i have put it in system32 on wine and it didn't work, i even put it in the avisynth plugins dir under wine and that never worked, its only when i told it exactly where it was that it worked. Have you even tried what i suggested above?
RazrFalcon
19th July 2011, 19:32
LoadPlugin("/home/razrfalcon/.wine/drive_c/windows/system32/DGDecode.dll") - works
LoadPlugin("C:\Windows\system32\DGDecode.dll") - works
LoadPlugin("DGDecode2.dll") - works
But first they says that:
Script error: there is no function named "DGDecode_mpeg2source"
And I simply renamed DGDecode_mpeg2source into mpeg2source. And again got the same error:
MPEG2Source: Could not open one of the input files.
I think, it becouse I created VTS_02_1.d2v under Windows+MeGUI in VirtualBox. And VTS_02_1.d2v still have windows paths. Am I right?
Carpo
19th July 2011, 19:42
LoadPlugin("/home/razrfalcon/.wine/drive_c/windows/system32/DGDecode.dll") - works
LoadPlugin("C:\Windows\system32\DGDecode.dll") - works
LoadPlugin("DGDecode2.dll") - works
But first they says that:
Script error: there is no function named "DGDecode_mpeg2source"
And I simply renamed DGDecode_mpeg2source into mpeg2source. And again got the same error:
MPEG2Source: Could not open one of the input files.
I think, it becouse I created VTS_02_1.d2v under Windows+MeGUI in VirtualBox. And VTS_02_1.d2v still have windows paths. Am I right?
I was getting that same error
try
LoadPlugin("c:\windows\system32\DGDecode.dll")
and then add the rest of the .avs
this works for me
LoadPlugin("c:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
DGDecode_mpeg2source("H:\Downloads\ergo.d2v", info=3)
LoadPlugin("c:\Program Files\AviSynth 2.5\plugins\ColorMatrix.dll")
ColorMatrix(hints=true, interlaced=true, threads=0)
#LoadPlugin("c:\Program Files\AviSynth 2.5\plugins\yadif.dll")
#Yadif(order=1)
crop( 4, 2, 0, 0)
Spline36Resize(720,400) # Spline36 (Neutral)
MSharpen(threshold=10,strength=100,mask=false,highq=true)
toon(strength=0.6)
#denoise
Although as i said above yadif doesnt work, i made the .d2v using latest DGDecode under wine, although as long as the .d2v is pointing to the right place, in my case H:\Downloads I cant see why it wouldnt work, recheck your .d2v just in case, i will check with some files i made under windows + MeGUI
DGIndexProjectFile16
2
H:\Downloads\MainMovie\ERGO_PROXY_V2\VIDEO_TS\VTS_01_1.VOB
H:\Downloads\MainMovie\ERGO_PROXY_V2\VIDEO_TS\VTS_01_2.VOB
Stream_Type=1
MPEG_Type=2
iDCT_Algorithm=6
YUVRGB_Scale=1
Luminance_Filter=0,0
Clipping=0,0,0,0
Aspect_Ratio=16:9
Picture_Size=720x576
Field_Operation=0
Frame_Rate=25000 (25/1)
Location=0,0,1,46b23
I did notice it wouldnt work if i use linux file paths though, try remaking the .d2v under wine and see if that helps
RazrFalcon
19th July 2011, 20:23
Thanks, I just changed paths in *.d2v and it started to encoding.
PS: I didn't know, that *.d2v can be opened by text editor.
PSS: when I use yadif, I get this error:
Plugin yadif.dll is not an AviSynth 2.5 plugin.
PSS: when I use yadif, I get this error:
Plugin yadif.dll is not an AviSynth 2.5 plugin.
You guys are loading it with the wrong command. From the manual (http://avisynth.org.ru/yadif/yadif.html):
Implemented as Avisynth C-plugin (not regular Avisynth plugin).
Must be loaded with Load_Stdcall_plugin("yadif.dll") or LoadCplugin("yadif.dll") (not LoadPlugin !). Do not use autoloading. (Note: in Avisynth v2.5.7-2.5.8 there is no need in explicit loading of Avisynth_c.dll by user for such plugins.)
So use LoadCplugin("yadif.dll")
Personally I keep everything Avisynth-related (avs2yuv.exe, main dlls, plugins, ...) in a separate directory tree within my home dir. With avs2yuv there, I can refer to plugins by a relative path from its location and avoid using drive letters and full paths. I only have Visual C++ runtime libraries and other shared stuff installed in system32.
PS. If you aren't in a hurry with your encodes, QTGMC (even with a fast preset) will give much better results than plain yadif.
RazrFalcon
19th July 2011, 21:38
nm, I'm added
QTGMC( Preset="Slow" )
and get error:
Script error: there is no function named "QTGMC"
PS: sorry, but I'm complete noob =|
nm, I'm added
QTGMC( Preset="Slow" )
and get error:
Script error: there is no function named "QTGMC"
It's not a built-in function. You need to install and load plugins: http://forum.doom9.org/showthread.php?t=156028
Carpo
19th July 2011, 21:47
You guys are loading it with the wrong command. From the manual (http://avisynth.org.ru/yadif/yadif.html):
So use LoadCplugin("yadif.dll")
Personally I keep everything Avisynth-related (avs2yuv.exe, main dlls, plugins, ...) in a separate directory tree within my home dir. With avs2yuv there, I can refer to plugins by a relative path from its location and avoid using drive letters and full paths. I only have Visual C++ runtime libraries and other shared stuff installed in system32.
PS. If you aren't in a hurry with your encodes, QTGMC (even with a fast preset) will give much better results than plain yadif.
Indeed i forgot about that call :o , will have to give QTGMC a try :) - currently compiling XFCE as KDE pisses me off :(
RazrFalcon
19th July 2011, 21:56
nm, Yes, I understand it.
I installed the plugins. Start converting again. It said that I need to install vcrun2005. And I installed it too.
Now I get the same error:
Script error: there is no function named "QTGMC"
Carpo
19th July 2011, 21:58
rename the file from QTGMC-3.32.avsi to QTGMC.avsi , should be fine then
nm, Yes, I understand it.
I installed the plugins. Start converting again. It said that I need to install vcrun2005. And I installed it too.
Now I get the same error:
Script error: there is no function named "QTGMC"
Post your full script.
RazrFalcon
19th July 2011, 22:10
Sorry, i forgot to unpack the script. I install only a plugins...
Now it work fine.
Big thanks for helping!
:(
LoadPlugin("DGDecode.dll")
DGDecode_mpeg2source("/media/data/Invader Zim DVD ISO's/Zim Vol 01 Disc 01/VIDEO_TS/VTS_02_1.d2v", info=3)
LoadPlugin("ColorMatrix.dll")
ColorMatrix(hints=true, interlaced=true, threads=0)
QTGMC( Preset="Slow" )
SelectEven()
crop( 4, 0, -4, 0)
Spline64Resize(640,480)
It's a normal script?
PS: sorry, I started using avisynth today.
It's a normal script?
You seem to be using plugin autoloading, which may cause head scratching in some cases, especially when you start having multiple versions of the same plugin around. Some people prefer loading each and every plugin manually (and keep the plugin dir almost empty).
Btw, are you sure that the source you are encoding there is truly interlaced video and not telecined or field-blended, for example?
smok3
19th July 2011, 23:31
is it possible to pipe audio to neroaac from that same avs script for example? or better to pipe video to x264, audio to neroaac at the same time? (source always avisynth)
Carpo
20th July 2011, 09:07
SelectEven() # Add this line to keep original frame rate, leave it out for smoother doubled frame rate
if i was to leave this out that would mean that the 25fps material and the bluray 24fps, would go to 50fps and 48fps, would that be a good or a bad thing?
Also, i am guessing its an idea not to use MSharpen() with QTGMC as it has a sharpener in it, but what about toon() would that still be safe to use?
SelectEven() # Add this line to keep original frame rate, leave it out for smoother doubled frame rate
if i was to leave this out that would mean that the 25fps material and the bluray 24fps, would go to 50fps and 48fps, would that be a good or a bad thing?
24 fps is always progressive, so you wouldn't deinterlace that. 30i may be interlaced or telecined or something else. 25i, if the content is live action, is usually interlaced or progressive encoded as interlaced, but there are exceptions.
To find out what the source really is, separate fields and look for duplicates or blended fields when progressing frame by frame.
Bobbing a truly interlaced source to 50 fps is a good thing since it fully retains the original temporal resolution (smooth motion). In that case SelectEven/Odd will often cause visible judder and you'd need frame interpolation and motion blurring to avoid it.
Also, i am guessing its an idea not to use MSharpen() with QTGMC as it has a sharpener in it, but what about toon() would that still be safe to use?
Yep, MSharpen may be unnecessary. Toon should be safe if you want the effect.
RazrFalcon
20th July 2011, 10:11
Btw, are you sure that the source you are encoding there is truly interlaced video and not telecined or field-blended, for example?
MediaInfo:
-- Display aspect ratio : 4:3
-- Frame rate : 29.970 fps
-- Standard : NTSC
-- Scan type : Interlaced
-- Scan order : Top Field First
After encoding (2 min length):
-- Display aspect ratio : 4:3
-- Frame rate : 29.970 fps
-- Scan type : Progressive
Screenshots:
http://storage4.static.itmages.ru/i/11/0720/s_1311152760_cb846d525b.png (http://itmages.ru/image/view/234542/cb846d52)http://storage5.static.itmages.ru/i/11/0720/s_1311152761_13bbbd97a2.png (http://itmages.ru/image/view/234543/13bbbd97)
I think it's interlace. Am I right?
PS: Whether there is something like preview for linux? In MeGUI i can see changes right away, in preview window.
Carpo
20th July 2011, 10:29
Yes that looks interlaced to me, nm is there a site you know of that i could read up on interlaced material and how to spot it better, atm I go by what MeGUI tells me, which most of the time its says either partially interlaced, requiring yadif or hybrid film/interlaced. Mostly Interlaced - requiring TITVC, is there a one size fits all form of de-interlacing?
I think it's interlace. Am I right?
I'm pretty sure it's hard-telecined and needs to be IVTC'd. A video clip would tell more. It might also be hybrid with interlaced panning scenes, for example.
PS: Whether there is something like preview for linux? In MeGUI i can see changes right away, in preview window.
Maybe with Avidemux and its avsproxy. Haven't tried it myself.
nm is there a site you know of that i could read up on interlaced material and how to spot it better
Luke's video guide (http://neuron2.net/LVG/) is a good one to start with:
http://neuron2.net/LVG/interlacing.html
http://neuron2.net/LVG/telecining.html
Also see the first FAQ entries on Neuron2's site:
http://neuron2.net/faq.html
is there a one size fits all form of de-interlacing?
Nope, you need to find out what the source really is. Reliable automatic detection is very difficult and there are broken sources that are even harder to deal with. I doubt MeGUI was giving you the right options every time.
If you have questions about a particular source, the AviSynth usage subforum is a good place to ask about it.
Carpo
20th July 2011, 13:28
Okay, one last question, have tested an episode using the links you put above, and in VDub i had to use the telecine filter, and found that top field first was its field order, so if its telecined, i would have to use IVTC on it, which MeGUI suggested, does that sound right?
I'm not too sure on what he means in the FAQ at the top, so a bit of guessing going on
Okay, one last question, have tested an episode using the links you put above, and in VDub i had to use the telecine filter, and found that top field first was its field order, so if its telecined, i would have to use IVTC on it, which MeGUI suggested, does that sound right?
Possibly, if motion looked smooth and there were no skips anywhere on the video after IVTCing with VDub.
I'm not too sure on what he means in the FAQ at the top, so a bit of guessing going on
Using the SeparateFields script given and no other filters, step through the fields and see what kind of pattern of duplicates or blending you have. Repeat in different positions of the video (pick a scene with motion, otherwise you can't see what is happening).
I haven't dealt with anime sources myself, but they commonly have various combinations of interlacing in different scenes. Read up elsewhere on how to deal with such hybrid sources.
Carpo
20th July 2011, 14:17
wondering if i should just use QTGMC and not have to worry about it all :)
RazrFalcon
20th July 2011, 18:14
nm,
http://dl.dropbox.com/u/16019144/example.avi
Thanks that recalled about Avidemux, I forgot about it.
wondering if i should just use QTGMC and not have to worry about it all :)
Better to encode as interlaced if you don't want to worry about it (now).
nm,
http://dl.dropbox.com/u/16019144/example.avi
Yep, 3:2 hard-telecined. Needs to be inverse-telecined back to 24000/1001p
is it possible to pipe audio to neroaac from that same avs script for example? or better to pipe video to x264, audio to neroaac at the same time? (source always avisynth)
I've never used AviSynth for audio, but it should be possible with wavi-avi2wav, which is like avs2yuv but for audio. If you don't need AviSynth-specific audio filtering, piping from Mplayer to NeroAacEnc/qaac/... is probably faster.
I encode video and audio one after another (or simultaneously) and then mux them together.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.