View Full Version : Basic and CURRRENT (2015) loading FLV files
TCmullet
21st February 2015, 16:26
There is SO much out there scattered about here and on the web about loading/opening FLVs in AviSynth, but it's spread over a decade and impossible (to me) to know what is current and what is outdated.
Could someone please tell me what is the CURRENT (in Feb. 2015) best way to open a simple FLV that I have? Media info says it's AVC video and AAC audio.
I've tried FFmepgSource2 but it gives no audio. I've tried DirectShowSource, but I can't scrub frame-to-frame quickly in order to plan edits, etc.
I'm trying to avoid converting it to huge AVI (which I CAN do) and instead directly open it in AviSynth. (I have a lot of such FLVs to work on.)
Reel.Deel
21st February 2015, 16:31
video = FFVideoSource("sample.flv")
audio = FFAudioSource("sample.flv")
AudioDub(video, audio)
or LSmash (http://avisynth.nl/index.php/LSMASHSource)
video = LWLibavVideoSource("sample.flv")
audio = LWLibavAudioSource("sample.flv")
AudioDub(video, audio)
TCmullet
21st February 2015, 16:33
You're showing two FLVs. I have only 1 FLV with both audio and video in the same file.
Reel.Deel
21st February 2015, 16:35
Load the the same FLV for audio and video.
TCmullet
21st February 2015, 16:44
Thank you, Reel. I see you edited your initial reply to make the audio and video come from the same file.
I've seen logic like this where they say you can reduce it to one line:
FFmpegSource2("sample.flv")
The FFmpegSource2 is a "helper function" that does what you say. I used FFmpegSource2 and the file doesn't handle well (scrubbing along the VirtualDub timeline). Is there some functional advantage over doing the audio and video separately as you described? The source of info said using FFmpegSource2 is EXACTLY the same as what you did.
Reel.Deel
21st February 2015, 16:49
Yeah, I forgot about FFmpegSource2 (since I mainly use AviSynth with video), it's probably the same as what I suggested above but I would just use FFmpegSource2, it seems more well thought out :).
TCmullet
21st February 2015, 16:57
I've tried FFmpegSource2 on 2 different files. Both of them result in NO audio showing up in Virtualdub. It's like there's no audio track inside the FLV, even though MediaInfo shows it there, it plays fine (and loud) in Applian FLV Player, and Virtualdub can create output from it using the ffdshow video codec.
TCmullet
21st February 2015, 16:57
You see I thought there were other FLV-open methods out here beside FFmpegSource and DirectShowSource.
Reel.Deel
21st February 2015, 17:06
You can try LSmashSource (http://avisynth.nl/index.php/LSMASHSource) like I suggested in post #2. Also, are you using the latest FFMS2 (https://github.com/FFMS/ffms2/releases)?
Edit: Also, another alternative is using FLVExtract (http://www.moitah.net/) (alternative v2.2.0 fork here (http://www.videohelp.com/tools/FLV-Extract)) and then load the raw stream with DGAVCDec (http://www.videohelp.com/tools/DGAVCDec) or even better (if you have the license and required hardware) DGDecNV (http://rationalqm.us/dgdecnv/dgdecnv.html) or DGDecIM (http://rationalqm.us/mine.html). Audio will have to be loaded separately like the example above.
RTW47
21st February 2015, 17:15
I've seen logic like this where they say you can reduce it to one line:
FFmpegSource2("sample.flv")
The FFmpegSource2 is a "helper function" that does what you say. I used FFmpegSource2 and the file doesn't handle well (scrubbing along the VirtualDub timeline). Is there some functional advantage over doing the audio and video separately as you described? The source of info said using FFmpegSource2 is EXACTLY the same as what you did.
in this case, it's not exactly the same i.e if video is opened first. And second you are still not importing audio.
FFmpegSource2("sample.flv", atrack=-1)
TCmullet
21st February 2015, 17:19
I have now added atrack=-1 (and I read up on how -1 picks up the first audio track found). I get:
Avisynth open failure:
FFAudioSource: No audio track found
(FFMS2.avsi, line 40)
Is it possible that the FLV was "fudged at the factory" (intentionally "damaged") to fool tools like this but still play okay in players?
TCmullet
21st February 2015, 17:37
You can try LSmashSource (http://avisynth.nl/index.php/LSMASHSource) like I suggested in post #2. Also, are you using the latest FFMS2 (https://github.com/FFMS/ffms2/releases)?
Yes, I believe I am. Version 2.20.icl. But I will look into LSmash, in parallel to this discussion.
StainlessS
21st February 2015, 17:47
If you want to be a guinea pig you can try this
Function GetFile(string vFN,string "aFN",Int "Prefer",Float "AudioDelay") {
myName="GetFile: "
START=RT_TimerHP
Assert(vFN!="",myName+"Empty VideofileName")
vFN = LCase(vFN)
aFN = LCase(Default(aFN,""))
Prefer=Default(Prefer,0) # Default 0=Avi if "AVI", 1, 1 = L-SMASH, 2 = FFMPegSource
Prefer = (Prefer<0 || Prefer>2) ? 0 : Prefer
AudioDelay=Float(Default(AudioDelay,0.0))
SepAud = (aFN!="" && aFN!=vFN)
Ext=RT_GetFileExtension(vFN)
Function IsISOFileName(String s) {
s=Lcase(RT_GetFileExtension(s)) Return(s==".mov"||s==".mp4"||s==".3gp"||s==".3g2"||s==".mj2"||s==".dvb"||s==".dcf"||s==".m21")}
GScript("""
c = 0
FLGS = 0
RT_DebugF("\nOpening Video %s for Extension %s",vFN,Ext,name=myName)
try {
# Attempt open for some formats by extension, NOT AVISource as could be non seekable, Allow AVI Indexing via later Source Plugs.
if(Ext == ".d2v") {c = MPEG2Source(vFN,UPCONV=1) RT_DebugF("MPEG2Source Succeeds:",name=myName)}
Else if(Prefer==0 && Ext == ".avi") {
c = AviSource(vFN)
try {c=AviSource(vFN) RT_DebugF("AVISource Video Succeeds:",name=myName) }
catch (msg) {RT_DebugF("AVISource Video Fails:- '%s'",msg,name=myName) }
}
if(!c.IsClip) {
if(Prefer<=1) {
If(IsISOFileName(Ext)) {
FLGS=RT_BitSet(FLGS,0)
c = LSMASHVideoSource(vFN) RT_DebugF("LSMASHVideoSource Video Succeeds:",name=myName)
if(!SepAud) {FLGS=RT_BitSet(FLGS,1) try{c=AudioDubEx(c,LSMASHAudioSource(vFN)) } catch(msg){} }
}
if(!c.IsClip) {
try {FLGS=RT_BitSet(FLGS,2) c=LWLibavVideoSource(vFN) RT_DebugF("LWLibavVideoSource Video Succeeds:",name=myName)
if(!SepAud) {FLGS=RT_BitSet(FLGS,3) try{c=AudioDubEx(c,LWLibavAudioSource(vFN)) } catch(msg){} }
} catch (msg) {RT_DebugF("LWLibavVideoSource Video Fails:- '%s'",msg,name=myName) }
}
} Else {
try {FLGS=RT_BitSet(FLGS,4) FFIndex(vFN) c=FFVideoSource(vFN) RT_DebugF("FFMSSource Video Succeeds:",name=myName)
if(!SepAud) {FLGS=RT_BitSet(FLGS,5) try{c=AudioDubEx(c,FFAudioSource(vFN)) } catch(msg){} }
} catch(msg) {RT_DebugF("FFMSSource Video Fails:- '%s'",msg,name=myName)}
}
}
} catch (msg) {c=0 RT_DebugF("Open Video by Extension Fails:- '%s'",msg,name=myName)}
if(!c.IsClip) {
if(!RT_BitTst(FLGS,4)) {
try {FLGS=RT_BitSet(FLGS,4) FFIndex(vFN) c=FFVideoSource(vFN) RT_DebugF("FFMSSource Video Succeeds:",name=myName)
if(!SepAud) {FLGS=RT_BitSet(FLGS,5) try{c=AudioDubEx(c,FFAudioSource(vFN)) } catch(msg){} }
} catch(msg) {RT_DebugF("FFMSSource Video Fails:- '%s'",msg,name=myName)}
}
if(!c.IsClip) {
if(!RT_BitTst(FLGS,2)) {
try {FLGS=RT_BitSet(FLGS,2) c=LWLibavVideoSource(vFN) RT_DebugF("LWLibavVideoSource Video Succeeds:",name=myName)
if(!SepAud) {FLGS=RT_BitSet(FLGS,3) try{c=AudioDubEx(c,LWLibavAudioSource(vFN)) } catch(msg){} }
} catch (msg) {RT_DebugF("LWLibavVideoSource Video Fails:- '%s'",msg,name=myName) }
}
if(!c.IsClip) {
if(!RT_BitTst(FLGS,0)) { # Not tried LSmash Video yet
FLGS=RT_BitSet(FLGS,0)
try {c = LSMASHVideoSource(vFN) RT_DebugF("LSMASHVideoSource Video Succeeds:",name=myName)
if(!SepAud) {FLGS=RT_BitSet(FLGS,1) try{c=AudioDubEx(c,LSMASHAudioSource(vFN)) } catch(msg){} }
} catch (msg) {RT_DebugF("LSMASHVideoSource Video Fails:- '%s'",msg,name=myName) }
}
if(!c.IsClip) {
try {c = DSS2(vFN) RT_DebugF("DSS2Source Video Succeeds:",name=myName) }
catch(msg) {RT_DebugF("DSS2Source Video Fails:- '%s'",msg,name=myName)
if(Ext==".avi") { # One last go before DirectShowSource
try {c=AviSource(vFN) RT_DebugF("AVISource Video Succeeds:",name=myName) }
catch (msg) {RT_DebugF("AVISource Video Fails:- '%s'",msg,name=myName) }
}
if(!c.IsClip) {
try {c=DirectShowSource(vFN,pixel_type="YV12") RT_DebugF("DirectShowSource(YV12) Video Succeeds:",name=myName) }
catch(msg) {RT_DebugF("DirectShowSource(YV12) Video Fails:- '%s'",msg,name=myName)
try {c=DirectShowSource(vFN,pixel_type="YUY2") RT_DebugF("DirectShowSource(YUY2) Video Succeeds:",name=myName) }
catch(msg) {RT_DebugF("DirectShowSource(YUY2) Video Fails:- '%s'",msg,name=myName)
try {c=DirectShowSource(vFN,pixel_type="RGB") RT_DebugF("DirectShowSource(RGB) Video Succeeds:",name=myName) }
catch(msg) {Assert(False,myName+"DirectShowSource(RGB) Video Fails: "+Chr(10)+msg)}
}
}
}
}
if(!c.HasAudio && !SepAud) {try{c=AudioDubEx(c,DirectShowSource(vFN,video=false) ) } catch(msg){} }
}
}
}
}
if((!c.HasAudio&&Ext!=".d2v") || SepAud){
RT_DebugF("Attempting Get Audio")
a = 0
aFN = (aFN=="") ? vFN : aFN
Ext=RT_GetFileExtension(aFN)
if(SepAud) {
RT_DebugF("Opening Audio %s for Extension %s",aFN,Ext,name=myName)
try {
if(Ext==".ac3") {a=NICAC3Source(aFN,channels=2,DRC=0) RT_DebugF("NICAC3Source Succeeds:",name=myName) }
Else if(Ext==".mpa"||Ext==".mp1"||Ext==".mp2"||Ext==".mp3") {
a=NicMPG123Source(aFN,Normalize=False) RT_DebugF("NicMPG123Source Succeeds:",name=myName) }
Else if(Ext==".wav") {a=RaWavSource(afN) RT_DebugF("RaWavSource Succeeds:",name=myName) }
Else if(Ext==".dts") {a=NicDTSSource(aFN) RT_DebugF("NicDTSSource Succeeds:",name=myName)}
} catch (msg) {a=0 RT_DebugF("Extension based Audio Fails:- '%s'",msg,name=myName) }
}
if(!a.IsClip) {
if(SepAud || !RT_BitTst(FLGS,5)) {
try {
if(SepAud || !RT_BitTst(FLGS,4)) {FFIndex(aFN)}
a = FFAudioSource(aFN) RT_DebugF("FFAudioSource Succeeds:",name=myName)
} catch(msg) {RT_DebugF("FFAudioSource Fails:- '%s'",msg,name=myName)}
}
if(!a.IsClip) {
if((SepAud || !RT_BitTst(FLGS,3))) {
try {a=LWLibavAudioSource(aFN) RT_DebugF("LWLibavAudioSource Succeeds:",name=myName) }
catch (msg) {RT_DebugF("LWLibavAudioSource Fails:- '%s'",msg,name=myName) }
}
if(!a.IsClip) {
if((SepAud || !RT_BitTst(FLGS,1))) {
try {a=LSMASHAudioSource(aFN) RT_DebugF("LSMASHAudioSource Succeeds:",name=myName) }
catch (msg) {RT_DebugF("LSMASHAudioSource Fails:- '%s'",msg,name=myName) }
}
if(!a.IsClip && SepAud) {
try {a=DirectShowSource(s,video=false) RT_DebugF("DirectShowSource Succeeds:",name=myName) }
catch (msg) {a=0 Assert(aFN!=vFN,myName+"Audio Fails: "+Chr(10)+msg)}
}
}
}
}
c = (a.IsClip) ? AudioDubEx(c,a) : c
c = (c.HasAudio) ? DelayAudio(c,AudioDelay).Trim(0,0) : c
}
RT_DebugF("Checking dimensions")
W=c.Width % 8 H=c.Height % 8
if(W > 0 || H > 0) {
W=(W==0)?0:8-W H=(H==0)?0:8-H
if(c.IsRGB()) {
yMin=c.RT_YPlaneMin(n=0,threshold=0.2) # Default matrix @ PC levels
Col = (yMin * 256 + yMin) * 256 + yMin
RT_DebugF("RGB Adding Borders %dx%d, Y=$%06X",W,H,Col,name=myName)
c=c.Addborders(0,0,W,H,Col)
} Else {
yMin=c.RT_YPlaneMin(n=0,threshold=0.2)
Col = (yMin * 256 + $80) * 256 + $80
RT_DebugF("YUV Adding Borders %dx%d, Y=$%06X",W,H,Col,name=myName)
if(W>0) {c=c.StackHorizontal(c.Blankclip(color_yuv=Col,Width=W))}
if(H>0) {c=c.StackVertical(c.Blankclip(color_yuv=Col,Height=H))}
}
}
RT_DebugF("ConvertYV12")
c = c.ConvertToYV12()
RT_DebugF("Convert Stereo")
c = FAVCStereo(c,c) # Output is YV12 + Stereo, Width & Height Mod 8
""")
T=RT_TimerHP - START
RT_DebugF("Total File Open Time = %.2fsecs",T,name=myName)
return c
}
Requires RT_Stats, FFMpegSource, LSmash, DirectShowSource2, Mpeg2Source(from DGIndex), and also Favc.avsi (cant remember where I got that).
It has a go with all of the possible sources dubs the audio and ensures mod 8 YV12 video and Stereo audio.
Work-in-progress.
I usually dont bother with awkward clips, just do batch conversion to avi with ffmpeg, probably always less bother than trying to figure out how to open,
and hoping that result is frame accurate, life is just too short for anything else.
I do use this script a lot, but usually only with avi (for the mod 8 yv12 stereo type stuff).
EDIT: Also requires NicAudio
martin53
21st February 2015, 18:52
Seems this post (http://forum.doom9.org/showthread.php?p=844645#post844645)'s embedded code is Favc.avsi?
StainlessS
21st February 2015, 19:22
Thanx M53, that FAVCStereo() script works fine.
TCmullet
21st February 2015, 20:02
Looks like ffmpeg created an index file (with extension .ffindex). I hadn't noticed that. By deleting it and reopening the script, I have audio now! It took 10 sec of "lockup", apparently building that index. Thanks to all.
And to Reel, I did try the L-Smash, and it too, worked. (With the 3-line invocation.) Also took at least 10 sec before Vdub showed the first frame. Now that both work, I may do some comparing.
TCmullet
21st February 2015, 20:15
A couple differences already:
1. Ffmpeg took 10-11 seconds to create its index (.ffindex). 2,291 KB.
2. LSmash took a lot longer, 26 seconds, to do same (.lwi). But it's a whopping 123,915 KB.
I wonder if LSmash's bigger index has benefits.
creaothceann
21st February 2015, 20:44
I usually use just this snippet:
f = <input file>
v = DSS2(f)
a = DirectShowSource(f, video=false)
AudioDub(v, a)
For DSS2 you'll need avss.dll or avss_26.dll.
If you want to make absolutely sure that you can do frame-accurate seeks everywhere, encode the source to a lossless format that uses only keyframes (e.g. Lagarith).
RTW47
21st February 2015, 20:48
I wonder if LSmash's bigger index has benefits.
.lwi index is simply not compressed format (and therefore is human-readable)
TCmullet
21st February 2015, 20:52
I have a more tangible difference. I"ve loaded the same video into both. The video is a 2 1/2 hour sports program. I found an action frame 13 minutes in (meaning it's close to the start), and one late in the show, 2 hr 13 min. These action frames are where an athlete hits a ball so that there's a distinct "pop" that visually shows up in Virtualdub when you do "View", "Audio display".
FFmpeg (FFmpegSource2): The first point had a audio delay of about 3 frames at first point and 9 frames at the second.
LSmash (3 lines of code): The first point had delay of about 2 frames at the first point and ALSO 2 frames at the second point.
So it looks like I'll work with LSmash for now. Thanks, Reel.Deel. I guess LSmash must be handling audio a bit more precisely.
TCmullet
21st February 2015, 20:57
I usually use just this snippet:
f = <input file>
v = DSS2(f)
a = DirectShowSource(f, video=false)
AudioDub(v, a)
For DSS2 you'll need avss.dll or avss_26.dll.
If you want to make absolutely sure that you can do frame-accurate seeks everywhere, encode the source to a lossless format that uses only keyframes (e.g. Lagarith).
Thanks, but creating huge Lagarith files was what I was alredy doing. Due to shortage of space and the need to set up a bunch of runs in Vdub as "jobs", I needed to learn a way to open the FLVs directly. I think the LSmash seems to work the best, short of the Lagarith option.
Hmmm, I've seen DSS2 from somewhere but couldn't remember where or (even) what. That's not the same as DirectShowSource apparently.
StainlessS
21st February 2015, 21:27
Hmmm
http://forum.doom9.org/showthread.php?p=1699301#post1699301
TCmullet
21st February 2015, 22:09
or LSmash (http://avisynth.nl/index.php/LSMASHSource)
video = LWLibavVideoSource("sample.flv")
audio = LWLibavAudioSource("sample.flv")
AudioDub(video, audio)
Reel, seeing as you are the one who suggested to me LSmash and I took your advice, I thought I'd direct this problem toward you. It's working, but every time I add a cut (loop(0,x,y)) to the script, save it and F2 in Vdub, it takes Vdub 15 long seconds to reopen and process the script. When I was pre-extracting to a Lag. file and using AviSource, it would come back in less than 1 second, maybe even half a second. Why the long wait??
I can see it is not updating the index (.lwi) file as the timestamp on that file hasn't changed since its creation.
poisondeathray
21st February 2015, 22:28
The indices (for l-smash or ffms2) don't update, and they aren't suppose to update. They only index once at the beginning
I don't know if it makes a difference, but why are you cutting with loop() instead of trim() ?
Is it possible these FLV's are VFR? (variable frame rate) ? That could explain various time disrepancies and problems editing
TCmullet
21st February 2015, 22:38
The indices (for l-smash or ffms2) don't update, and they aren't suppose to update. They only index once at the beginning
I don't know if it makes a difference, but why are you cutting with loop() instead of trim() ?
Is it possible these FLV's are VFR? (variable frame rate) ? That could explain various time disrepancies and problems editing
Yes, the timestamp proves it only updates at creation.
I like the way loop looks, but don't remember enough of what trim looked like (months ago) when I tried it that made me lean toward loop. Loop lets me have exactly the frame numbers I want deleted shown in the command.
No they are not VFR. This file works fine when simply creating a lag./pcm file and avisynth with avisource. No VFR or anything weird. (Vdub would greatly hiccup if a VFR file was fed to it.) I build a loop command, save the script (ctrl-s in Notepad), press F2 in Vdub and instantly the clip disappears from the Vdub timeline, not a huge 15 seconds later.
I have a 4-core i5 system and drive is not full. (180GB free; not a lot, but should be plenty.)
TCmullet
21st February 2015, 22:47
Rather than any of the loop commands, it has to have something to do with the act of re-opening the script, which re-opens my FLV when I F2 in Vdub. Maybe now is the time to give a fuller script fragment as it currently stands: (The empty loops are precoded for me to easily paste the actual numbers in. I'm partway thru that, as I write.)
# Requires AviSynth 2.6MT (using 2.6.0.5MT)
SetMemoryMax(512)
SetMTMode(3,4)
video = LWLibavVideoSource("D:/Video-Work/sample-video.flv")
audio = LWLibavAudioSource("D:/Video-Work/sample-video.flv")
AudioDub(video, audio)
# now have video file opened
DelayAudio(-0.067)
loop(0,5180,7823)
loop(0,15036,16842)
loop(0,32751,34598)
loop(0,44339,47976)
loop(0,53753,55598)
loop(0,61136,62950)
loop(0,88004,92636)
loop(0,91701,96224)
loop(0,118014,119922)
loop(0,122443,124286)
loop(0,140120,143761)
loop(0,153381,155231)
loop(0,171257,173087)
loop(0,192746,196380)
loop(0,206608,208431)
#loop(0,,)
#loop(0,,)
#loop(0,,)
#loop(0,,)
#loop(0,,)
#loop(0,,)
#loop(0,,)
#loop(0,,)
#loop(0,,)
#ConvertToYV12()
#SetMTMode(2)
#InterFrame(Cores=2,Tuning="Film")
#InterFrame(Cores=2,Tuning="Film",FrameDouble=true)
TCmullet
21st February 2015, 23:01
As I might have expected, the 15 sec. spell also occurs when I open it fresh in a Vdub that has no video file open.
TCmullet
22nd February 2015, 02:16
Reel.Deel, seeing as you recommended LSmash, maybe you could open up a clip of your own (an FLV) and time how many seconds it takes to open. Of course, you must disregard the first opening, as it is then that the index is built. But open it a second time and see how it takes for the re-open.
When mine creates the index, it's, I believe, over 26 seconds, but to open again after the index has been previously built takes only 15-16 seconds. But it ought to take 0 seconds. I'd like to know what YOUR experience has been and is.
MysteryX
22nd February 2015, 02:24
I followed someone's advice and convert all my videos to AVI using FFMPEG before processing with AviSynth, and then open with AviSource. This avoid all kinds of issues with all these file formats. You could consider this as an option.
TCmullet
22nd February 2015, 02:35
I followed someone's advice and convert all my videos to AVI using FFMPEG before processing with AviSynth, and then open with AviSource. This avoid all kinds of issues with all these file formats. You could consider this as an option.
Ha ha, yes I DID consider this several years ago and that's what I ALWAYS did as a result. (So you're too late, ha ha.) But now I have a real need to avoid that, both due to being low on adequate disk work space and a desire to have all processing in one script. I tend to be the one (like your advisor) to avoid the hassles and thereby avoid learning new things. But this situation forces me to realize that tools that the rest of the world uses should be learned. And it buys me great advantages in my current situation.
While I'm still in the current project (of many big videos) I will probably try that DSS2 thing. But in the immediate short term I will set up edits with FFmpegSource2 and do the 14 hour encodings with LSmash. (Reel.Deel, I wish you or someone could help figure why those 15-sec. open-times are hitting me, esp. if they're hitting no one else.)
TCmullet
22nd February 2015, 04:18
Two advices you may try:
1. comment out the first SetMTMode line and see if it differs.
2. add threads=1 to LWLibavVideoSource and see if it differs.
First suggestion alone brought it from 16 sec. down to about 9.
Second suggestion alone brought it from 16 up to 17+.
Both suggestions together brought from 16 down to about 9.
All times were done without a stopwatch, only counting "1001, 1002", etc., therefore are a bit rough.
What do these numbers tell you?
TCmullet
22nd February 2015, 06:18
The loop lines make no difference.
I haven't tried video-but-no-audio. (I need the audio.)
FFmpegSource2 only take 4-5 sec.
As to why I can't use FFmpegSource2 for final run, I've seen 3 videos now (all 3 that I've processed) where FFmpegSource2 stretches the audio by at least 7 extra frames by the end of the 2 hour video. In fast action sports, that's a noticable defect. In LSmash, it's rock solid consistent from start to finish.
Both produce audio that is offset by 1 to 4 frames, but my DelayAudio fixes it in LSmash. Would be a nightmare to fix it in many chunks if I had to use FFmpegSource2.
martin53
22nd February 2015, 10:01
maybe you could open up a clip of your own (an FLV) and time how many seconds it takes to open. ... to open again after the index has been previously built takes only 15-16 seconds. But it ought to take 0 seconds. I'd like to know what YOUR experience has been and is.
With a 98 minute FLV i timed about 9 seconds to re-open. The index is about 65MB. Hope this helps.
If there are many re-open situations when cutting, might use a fast, inaccurate source filter here, and then use the accurate one later for final review of the cuts only and for processing.
TCmullet
22nd February 2015, 23:13
Thanks, Martin. Yes, that helps! Looks like we all have on the order of 9 sec to re-open the file.
And I had already taken your advice to use FF for script building (including reopening after deriving every commercial cut-out sequence) and LS for setting a constant audio delary correction and final run.
The fast inaccurate FFmpegSource2 is inaccurate only in how it renders the audio. Seems to make it gradually slow down and incurr audio delay by at least 7 frames or so after less than 2 hours of content. Guess I should try to report this to whoever's in charge of FFmpegSource.
TheFluff
23rd February 2015, 02:15
A fix for a possibly related issue was actually implemented just a day ago or so, bother someone for a new build I guess. https://github.com/FFMS/ffms2
TCmullet
23rd February 2015, 17:34
Reel.Deel, as a separate matter from all the discussion about re-open problems, I've had to migrate off of my Win7 4-core system onto a WinXP 4-core. LSmashSource fails when I open my script in Vdub with:
there is no function named "LWLibavVideoSource"
I had brought all dlls over to remake my avisynth environment, but can't figure out why am getting this error. I ran MS's Visual C++ runtime 2013 installer.
Any ideas?
StainlessS
23rd February 2015, 18:00
Could this be the problem: http://forum.doom9.org/showthread.php?p=1710822#post1710822
[linked post related to recent MeGUI and LSmash r783. (if old MeGUI on your XP, then unlikely that is related)].
martin53
23rd February 2015, 21:47
StainlessS, your GetFile() function is really a great piece of code - can make a guinea pig feel a daring beast!
I modified it moderately to my likes, e.g. get FPS, Framecount and pixel aspect ratio through MediaInfo and provide them to the DirectShow fallback, and do a Resize to get the correct clip aspect ratio with square pixels, and mainly to wipe the index files (with CallCmd(close="..")) after the clip is closed, since I don't want any plugins to clutter my directories.
Though that leads to re-creating of the index file every time a media file is opened, I got 3.9s open time with the same 98min FLV file today with GetFile().
[1132] GetFile: LWLibavVideoSource Video Succeeds:
[1132] GetMediaInfo FPS=25.000000 Framecount=146727 PAR=1.000000
[1132] GetFile: Total File Open Time = 3.90secs
creaothceann
23rd February 2015, 23:26
Do you really need square pixels in the encoding?
StainlessS
24th February 2015, 11:45
M53, Glad you like it, pretty good but could stand some improvement.
If you like, you could post what you've got in eg RT_Stats or other suitable thread, so as not to clog up this one, I'll add what you've done
(excl resize) to what I've got. Could also eg force AviSource if MediaInfo can tell that is frame separable codec ie not DivX or XVid. Also "Prefer"
could be bettered to incl eg DSS2. Dont change the addborders stuff without good reason, cant remember offhand why I used StackH/V but
addborders was awkward in some way (need to add border colour of darkest black in clip rather than eg 16, so can be auto cropped off again later).
EDIT: Made return mod 8 so as to not annoy AutoGain (think that was reason). Also, I would prefer to resize after autocropping letterboxing,
or replacing letterbox with solid black (RoboCrop option).
TCmullet
24th July 2015, 20:25
video = FFVideoSource("sample.flv")
audio = FFAudioSource("sample.flv")
AudioDub(video, audio)
or LSmash (http://avisynth.nl/index.php/LSMASHSource)
video = LWLibavVideoSource("sample.flv")
audio = LWLibavAudioSource("sample.flv")
AudioDub(video, audio)
Reel,
I have to install LSMASH on a different machine. I am totally lost, as the machine I was using before had had lots of various installs of video stuff beforehand, and this additional machine today has nothing. Is there a step-by-step list somewhere to help me install LSMASH including all dependencies? I did install the newest (I believe) ffmpeg.exe, but it doesn't install it anywhere after I extract it from the .7z file. Putting the LSMASHSource.dll into the plugins folder of Avisynth isn't enough.
sneaker_ger
24th July 2015, 20:31
Read "Requirements":
http://avisynth.nl/index.php/LSMASHSource
TCmullet
24th July 2015, 20:42
Read "Requirements":
http://avisynth.nl/index.php/LSMASHSource
I did. VC++ for 32-bit is in place. (I ran the installer twice. 2nd time I did repair; all is good.) And Avisynth version says 2.60 (via script). The version on the avisynth.dll in c:\windows\system32 says 2.6.0.5.
sneaker_ger
24th July 2015, 20:51
Try:
https://www.dropbox.com/sh/3i81ttxf028m1eh/AAD3q4BLIbks-5SVuhWGctO6a/Old/L-SMASH-Works-r783-20150223-32bit-XP.7z?dl=0
Or maybe that version, I see you already discussed it some time ago:
http://forum.doom9.org/showthread.php?p=1710899#post1710899
(I assume you are still on XP)
TCmullet
24th July 2015, 21:31
(I assume you are still on XP)
Thank you, Sneaker. Yes, this additional system is also XP and I had forgotten about that thread. It was simply having the correct LSMASHSource.dll, the one with the XP switch compiled into it. Nice that we now have r783-xp (almost new) instead of the old r768-xp. I hadn't picked "old". But when I did, I saw that r783-xp, which must be the link you gave here.
Again, thanks.
TCmullet
25th July 2015, 06:19
More trouble now.
LSMASH is working fine on that 2nd XP system, now that I have the XP version of r783 in the plugins folder.
However, I have a 3rd XP system, and copying LSMASHSource.dll from the r783-xp version to IT'S Avisynth folder STILL results in:
"there is no function named "LWLibavVideoSource".
Any ideas as to what could be wrong in this system??
Groucho2004
25th July 2015, 08:46
More trouble now.
LSMASH is working fine on that 2nd XP system, now that I have the XP version of r783 in the plugins folder.
However, I have a 3rd XP system, and copying LSMASHSource.dll from the r783-xp version to IT'S Avisynth folder STILL results in:
"there is no function named "LWLibavVideoSource".
Any ideas as to what could be wrong in this system??
This (http://forum.doom9.org/showthread.php?t=170647) may help.
TCmullet
26th July 2015, 03:15
This (http://forum.doom9.org/showthread.php?t=170647) may help.Wow, that's a nifty utility you wrote and refined over time! Thanks!
Now will you please help me decipher where to proceed? I have done "Tools", "Plugin Info", and when it hits LSMASHSource.dll, it says:
=======================
LoadPlugin: unable to load "C:\Program Files\AviSynth 2.5\plugins\LSMASHSource.dll", Module not found. Install missing library?
DLL dependencies for this file:
MSVCR120.dll, KERNEL32.dll, ADVAPI32.dll
One or more dependencies for this file may be unresolved.
Use Dpendency Walker (http://www.dependencywalker.com/) to rectify the problem.
========================
Obviously if left to myself, I should get and run that Walker thingy. But may I ask you what the above info tells you off hand?
Then immediately another message, except it was:
LSMASHSource.r783-xp.dll
with everything else about the message, the same.
TCmullet
26th July 2015, 03:30
I did get and run DependencyWalker. Said MSVCR120.dll is missing. Google tells me that's the C/C++ MS runtime.
I guess I'm wondering why it was not included in the LSMASH distribution file.
TCmullet
26th July 2015, 04:06
I think I could have downloaded MSVCR120.dll from numerous places. But I ran Agent Ransack (a cool tool I love) and found I had one as part of an installation of Firefox. Properties showed it was from Visual Studio 2013, so I figure it's current enough.
I copied to system32 folder of the Windows folder, rebooted, and LSMASH works FINE.
Thanks for the pointers, Groucho.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.