Hi. Just as I think I'm really getting to grips with avisynth, I find myself stuck again. I have an mp4(AVC,AAC) that I'd like to use the Trim function on. I can open the video in MeGUI with this script:
LoadPlugin("E:\MeGUI\tools\lsmash\LSMASHSource.dll ")
LSMASHVideoSource("E:\NLsans.mp4")
but when I add a third line:
LoadPlugin("E:\MeGUI\tools\lsmash\LSMASHSource.dll ")
LSMASHVideoSource("E:\NLsans.mp4")
LSMASHAudioSource("E:\NLsans.mp4")
it'll only load the audio. AvsPmod doesn't like it either – 'No Video' is the error message. Although virtualdub will play it fine. I don't understand it. Have you any suggestions? Thanks.
+ Reply to Thread
Results 1 to 7 of 7
-
-
-
http://avisynth.nl/index.php/LSMASHSource
Copy the following, edit and uncomment the first line to load LSMASHSource.dll if you'd prefer (or just copy LSMASHSource.dll from where-ever MeGUI keeps it to the Avisynth plugins folder so it'll auto-load) save it as a script with an avsi extension (calling it LSmashSource2.avsi seems appropriate) and stick it in the Avisynth plugins folder.
I'm referring to putting the script and dll in the installed Avisynth plugins folder and not the folder where MeGUI keeps the plugins it uses.
#LoadPlugin("LSMASHSource.dll")
##################################
## @ atrack - audio track number. Default auto. If -2, ignore audio.
## @ fpsnum, fpsden - framerate. Default auto.
## @ stacked - if true, return Stack16 format.
## (note, stacked=true requires a 16-bit color format)
## @ format - force specified output pixel format. Default auto.
## (see documentation for valid color formats)
## (if stacked = true, default "YUV420P16")
##
function LSmashSource2(string path, int "atrack",
\ int "fpsnum", int "fpsden",
\ string "format", bool "stacked")
{
atrack = Default(atrack, 0)
fpsnum = Default(fpsnum, 0)
fpsden = Default(fpsden, 1)
stacked = Default(stacked, false)
format = Default(format, "")
format = (format=="" && stacked==true) ? "YUV420P16" : ""
video = LSMASHVideoSource(path,
\ fpsnum=fpsnum, fpsden=fpsden,
\ format=format, stacked=stacked)
return (atrack==-2) ? video: AudioDub(video,
\ LSMASHAudioSource(path, track=atrack))
}
LSMASHSource2("E:\NLsans.mp4")
You can do the same thing yourself with AudioDub but the script above automates it a little. There's a similar script on the page I linked to for combining LWLibavVideoSource + LWLibavAudioSource when opening other file types. -
Yeah it does seem pretty familiar, although FFmpegSource2 isn't a script any more. The function's now provided by ffms2.dll.
Same for FFImageSource, if I remember correctly.
Similar Threads
-
AviSynth script error on meGUI
By vancew90 in forum EditingReplies: 16Last Post: 16th Jan 2019, 06:42 -
QTGMC Script in meGUI
By duffbeer in forum DVD RippingReplies: 61Last Post: 16th Feb 2015, 15:54 -
I Need Perfect Help QTGMC Deinterlacing Script On MeGui
By arcte in forum Video ConversionReplies: 21Last Post: 11th Oct 2014, 07:01 -
How can i Use VDub Script[.vcf] into Avisynth Script[.avs] ( Megui )
By Maskoff in forum EditingReplies: 1Last Post: 25th Jun 2013, 15:30 -
MeGui: AVS script creator problem
By Fed03 in forum Newbie / General discussionsReplies: 5Last Post: 23rd May 2013, 11:02