View Full Version : L-SMASH Source
Nico8583
21st April 2021, 14:07
Thank you HolyWu !
real.finder
21st April 2021, 14:11
https://github.com/HolyWu/L-SMASH-Works/releases/download/20210421/L-SMASH-Works_20210421.7z
Update to FFmpeg 4.4.
Update to dav1d 0.8.2.
Update to nv-codec-headers 11.0.10.1.
Update mfx_dispatch to API 1.35.
Update to xxHash 0.8.0.
LWLibav: Set frame properties for AviSynth+. (Asd-g)
LWLibav: Export AviSynth variables FFSAR_NUM, FFSAR_DEN, FFSAR. (Asd-g)
lwindex: Fix crash when opening remote files. (AkarinVS)
lwindex: Hash value in FileHash field is now 64 bits long.
thanks
did you add what Asd-g forget https://github.com/HolyWu/L-SMASH-Works/pull/12#issuecomment-753911159 ?
kedautinh12
23rd April 2021, 07:12
Thanks
StainlessS
23rd April 2021, 15:57
Thankyou Mister Wu :) :- https://www.youtube.com/watch?v=3w3X95uWv8A
gispos
24th April 2021, 13:25
Thanks, this is almost the only source filter I use:)
abyss616
24th April 2021, 13:52
I tried to do some research on this, both in reading this thread and my own testing, but I wanted to get a more definitive answer: is the cache file created by MeGUI different than the one created when using VirtualDub/AvsPMod? Since I'm dealing with 1080i files that are several GB in size, I'd love to use the same cache file across both programs so I don't have to wait (and wait, and wait) for a new file to be generated when I go from one program to another. Thanks.
scharfis_brain
24th April 2021, 20:50
I typically capture my VHS-tapes three times into YUV422-10bit (Blackmagic Intensity Shuttle).
Then I load these three files in AVISynth+ using LibavSMASH and do some median() processing to get rid of recording-noise.
I really gave LibavSMASH a try. But it nearly always reindexed my files upon reloading the AVS-file into VDub. And my files are *huge* (400GB per File).
It takes about 15 minutes to reindex a single file. So reloading a AVS-file may take up to 45 minutes. This is very painful.
How can I force LibavSMASH to never re-index a file if a index is already present?
poisondeathray
24th April 2021, 21:10
I typically capture my VHS-tapes three times into YUV422-10bit (Blackmagic Intensity Shuttle).
Then I load these three files in AVISynth+ using LibavSMASH and do some median() processing to get rid of recording-noise.
I really gave LibavSMASH a try. But it nearly always reindexed my files upon reloading the AVS-file into VDub. And my files are *huge* (400GB per File).
It takes about 15 minutes to reindex a single file. So reloading a AVS-file may take up to 45 minutes. This is very painful.
How can I force LibavSMASH to never re-index a file if a index is already present?
It normally does not re-index by default. You might have done something to the cache file (.lwi), or location of files ?
Also, if you use MOV container for v210, you don't need an index when using LSmashVideoSource
StainlessS
24th April 2021, 21:43
This anything to do with it [from old docs, dont know if changed]
#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")
## @ cache - if true (the default), create an index file.
##
function LibavSource2(string path, int "atrack",
\ int "fpsnum", int "fpsden",
\ string "format", bool "stacked", bool "cache")
{
atrack = Default(atrack, -1)
fpsnum = Default(fpsnum, 0)
fpsden = Default(fpsden, 1)
stacked = Default(stacked, false)
cache = Default(cache, true)
format = Default(format, "")
format = (format=="" && stacked==true) ? "YUV420P16" : ""
video = LWLibavVideoSource(path,
\ fpsnum=fpsnum, fpsden=fpsden, format=format,
\ stacked=stacked, cache=cache)
return (atrack==-2) ? video: AudioDub(video,
\ LWLibavAudioSource(path, stream_index=atrack, cache=cache))
}
Maybe try with cache=false (perhaps after check [ Exist() ] on exisitng index).
EDIT: Or is that too obvious.
EDIT: Yeah, cache default true for current LWLibavAudioSource,
http://avisynth.nl/index.php/LSMASHSource/LWLibavVideoSource
kedautinh12
25th April 2021, 02:22
You can use LSMASHVideoSource without cache function
kedautinh12
17th May 2021, 12:39
Error when index .avi with L-SMASH source, original video have 25 minutes but when i index video output just 22 minutes
Example video: https://drive.google.com/file/d/1MDiKpaIc_-lCrVtPQUPAU9Gy__HykhHh/view?usp=drivesdk
JKyle
17th May 2021, 20:06
@HolyWu,
Plz take a look at this issue (https://github.com/HolyWu/L-SMASH-Works/issues/21) I posted the other day.
It's about wrong frame rate(playback duration) info served by LSMASHVideoSource for (some) Dolby Vision video streams.
Katie Boundary
18th May 2021, 02:59
I'm having an interesting problem. I have 32-bit AVIsynth 2.60 installed on both my Win7 laptop and the WinXP x64 partition on my desktop. I have an MP4 file and an AVIsynth script on an external hard drive (to eliminate any problems resulting from differences between files). The newest version of 32-bit Lsmashsource.dll has been extracted to the plugin folders on both computers. The laptop's avisynth can read the MP4 just fine, but my desktop's avisynth complains that there is no function named lsmashaudiosource, LWLibavAudioSource, ffms2source, etc.??
kedautinh12
18th May 2021, 05:21
Your video is VFR (Variable Frame Rate). The returned frame count from the source filter is correct. But the returned frame rate is higher than the average frame rate, hence the duration becomes shorter. However that's not an issue at all if you know how to correctly process VFR videos.
my mediainfo wasn't reported that vfr, now i used fpsnum=25, fpsden=1 and that correct duration, sr for your waste time
@ Katie Boundary: Use AVSMeter (https://forum.doom9.org/showthread.php?t=174797) (AVSMeter.exe -avsinfo -l) to check if AviSynth is installed correctly, in which directory it looks for plugins, which plugins are found, which functions are known (the created log file is more verbose than the screen output).
tebasuna51
18th May 2021, 11:33
Your video is VFR (Variable Frame Rate). The returned frame count from the source filter is correct. But the returned frame rate is higher than the average frame rate, hence the duration becomes shorter. However that's not an issue at all if you know how to correctly process VFR videos.
I can't understand that. My test show:
1) Load Kanjani8.avi in VirtualDub2:
38902 frames, 25 fps -> Duration 24:56
sequence of frames:
KDPPPPPPPPPPKDKDKDKPPPPPPPPPPPPPPPPPPPDPDPDP...
K=Key frame, D=Drop or Duplicated frame
2) Load LWLibavVideoSource("C:\tmp\Kanjani8.avi") in VirtualDub2:
34239 frames, 25 fps -> Duration 22:49
Drop/Duplicated frames deleted, but the fps is not changed then the duration is shorter.
It is not than you say or the help show:
+ fpsnum (default : 0)
Output frame rate numerator for VFR->CFR (Variable Frame Rate to Constant Frame Rate) conversion.
If frame rate is set to a valid value, the conversion is achieved by padding and/or dropping frames at the specified frame rate.
Otherwise, output frame rate is set to a computed average frame rate and the output process is performed by actual frame-by-frame
3) Load LWLibavVideoSource("C:\tmp\Kanjani8.avi", fpsnum=25, fpsden=1) in VirtualDub2:
38902 frames, 25 fps -> Duration 25:56
The Drop/Duplicated frames are preserved. Now is correct.
4) Load FFVideoSource("C:\tmp\Kanjani8.avi", timecodes = "C:\tmp\Kanjani8.txt") in VirtualDub2:
34239 frames, 22 fps -> Duration 25:56
FFVideoSource output the average fps to preserve duration.
And output the timecodes for a perfect sync with audio in a mkv VFR.
I don't know how output timecodes with LWLibav.
5) Load FFVideoSource("C:\tmp\Kanjani8.avi", fpsnum=25, fpsden=1) in VirtualDub2:
38902 frames, 25 fps -> Duration 25:56
The Drop/Duplicated frames are preserved. The same than LWLibav.
And MediaInfo can't detect VFR in avi files.
With Avinaptic (http://fsinapsi.altervista.org/) we can detect Null/Drop/Duplicated frames:
Video track
FourCC XVID/XVID
Resolution 1280 x 720
Frame aspect ratio 16:9 = 1.777778
Pixel aspect ratio 1:1 = 1
Display aspect ratio 16:9 = 1.777778
Vprp aspect ratio 71:40 = 1.775 (~16:9)
Framerate 25 fps
Total frames 38,902
Stream size 559,355,390 bytes (533.442869 MiB)
Bitrate 2875.715336 kbps
Qf 0.124814
Key frames 264 (0; 12; 14; 16; 18; ... 38763)
Null frames 4,663 (1; 13; 15; 17; 38; ... 38837)
...
kedautinh12
18th May 2021, 13:39
Thanks for your info but how to make timecodes file???
tebasuna51
18th May 2021, 19:16
To make timecodes with FFVideoSource("C:\tmp\Kanjani8.avi", timecodes = "C:\tmp\Kanjani8.txt")
Now recode only 34239 frames and after add timecodes with mkvmerge/mp4fpsmod for mkv/mp4
kedautinh12
18th May 2021, 19:54
Thanks
FranceBB
22nd May 2021, 10:52
Hi there, HolyWu, I noticed that you have archived your repository, so I can't open any new issue on GitHub, therefore I might as well post it here.
I think this is something of concern that has to be addressed on developers side: https://forum.doom9.org/showthread.php?p=1943307
GMJCZP
22nd May 2021, 14:15
I am having a problem with, at least, the latest version of Lsmash, at first I thought it was a neo_f3kdb problem. The discussion is at the following link:
Here (https://forum.doom9.org/showthread.php?p=1942911#post1942911)
Thanks.
Edit: possibly the bug was introduced from this year, I tested the 20200728 and it still works fine.
Edit2: The funny thing is that the old f3kdb works with the latest version of Lsmash, as you can see in the link.
EDIT3: problem fixed, see link.
GMJCZP
25th May 2021, 02:50
On the Lsmash wiki page I got an error in the script "Combining LSMASHVideoSource + LSMASHAudioSource", here is the fix:
# Combining LSMASHVideoSource + LSMASHAudioSource
#LoadPlugin("LSMASHSource.dll")
##################################
## @ atrack - audio track number. Default auto. If -2, ignore audio.
## @ fpsnum, fpsden - framerate. Default auto.
## @ format - force specified output pixel format. Default auto.
## (see documentation for valid color formats)
##
##
function LSmashSource2(string path, int "atrack",
\ int "fpsnum", int "fpsden",
\ string "format")
{
atrack = Default(atrack, 0)
fpsnum = Default(fpsnum, 0)
fpsden = Default(fpsden, 1)
format = Default(format, "")
video = LSMASHVideoSource(path,
\ fpsnum=fpsnum, fpsden=fpsden,
\ format=format)
return (atrack==-2) ? video: AudioDub(video,
\ LSMASHAudioSource(path, track=atrack))
}
It is just a parenthesis that is instead of a comma, indicated in red.
real.finder
29th May 2021, 08:09
Hi there, HolyWu, I noticed that you have archived your repository, so I can't open any new issue on GitHub, therefore I might as well post it here.
I think this is something of concern that has to be addressed on developers side: https://forum.doom9.org/showthread.php?p=1943307
HolyWu seems will not do any update from now on since he made the project read only https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/issues/3#issuecomment-850781424
so maybe we need another adopter for this Project
Atak_Snajpera
30th May 2021, 12:19
Is hardware decoding broken in latest version?
With this script
video=LWLibavVideoSource("F:\_Video_Samples\mkv\[SS-Eclipse]_Kanon_-_Promo_(h264)_[E3CE768D] (1).mkv",cachefile="C:\Temp\RipBot264temp\job1\[SS-Eclipse]_Kanon_-_Promo_(h264)_[E3CE768D] (1).mkv.lwi",prefer_hw=3)
I'm getting
System exception - Access Violation
It used to work fine with version from year 2020
FranceBB
30th May 2021, 13:26
HolyWu seems will not do any update from now on since he made the project read only
so maybe we need another adopter for this Project
Ah... I see...
That's a shame...
real.finder
5th June 2021, 10:21
Ah... I see...
That's a shame...
there are this https://github.com/AkarinVS/L-SMASH-Works/releases
BUT, its x64 only (at least for now), and seems don't care much about AVS/AVS+ and focus only on vs
kedautinh12
5th June 2021, 10:34
Wow, it's support .VOB file
JKyle
5th June 2021, 15:26
there are this https://github.com/AkarinVS/L-SMASH-Works/releases
BUT, its x64 only (at least for now), and seems don't care much about AVS/AVS+ and focus only on vs
:thanks: for the info.
It's kind of sad that HolyWu has freezed his repo. :(
I hope he's just on a leave for whatever reason and wish that the leave won't take that long. :)
---
So I tried AkarinVS's vA.2b on StaxRip (by renaming the file name to fit into StaxRip), and it seems that it's not for AVS like real.finder pointed out.
https://i.imgur.com/ODA7JGz.png
:(
Or am I missing anything here?
According to AkarinVS's blurb on his repo,
I generally work on enhancing the VapourSynth plugin, but I will try my best to not break the AviSynth plugin.
but the filter call LSMASHVideoSource("%source_file%") definitely fails.
I suspect he probably has pruned the AVS part out of the source. :scared:
tebasuna51
23rd June 2021, 14:05
Hi there, HolyWu, I noticed that you have archived your repository, so I can't open any new issue on GitHub, therefore I might as well post it here.
I have also a feature request. See https://forum.doom9.org/showthread.php?p=1945716#post1945716
and the equivalent feature request for FFAudioSource() and BestAudioSource()
real.finder
29th June 2021, 01:10
msg7086/MeteorRain said
if anyone is willing to participate in developing or maintaining any projects in this org, please let me know and I'll invite you.
before, and recently in github (https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/issues/3#issuecomment-850786923)
Let me know if I should add others to the org. My new job doesn't allow me to spend much time on those filters anymore so I'd be happy to let someone else handle the projects.
now aside from msg7086, there are me (not a programmer) and Asd-g in "Home Of AviSynthPlus Evolution" org
if anyone like to join to develop L-SMASH Source there https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works since AkarinVS seems do it only for himself, his changes can be backported with HolyWu last changes to https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works anyway
kedautinh12
29th June 2021, 05:23
Asd-g still don't in "Home Of AviSynthPlus Evolution" org
https://github.com/orgs/HomeOfAviSynthPlusEvolution/people
real.finder
29th June 2021, 07:51
Asd-g still don't in "Home Of AviSynthPlus Evolution" org
https://github.com/orgs/HomeOfAviSynthPlusEvolution/people
You cant see him there since its hidden by default unless you are a member or he made it public
real.finder
1st July 2021, 06:42
HolyWu last changes added https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works
tebasuna51
1st July 2021, 10:46
Added feature request to HomeOfAviSynthPlusEvolution/L-SMASH-Works (https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/issues/5)
We hope than this fork continue the job.
boondoggle
4th July 2021, 23:37
On the Lsmash wiki page I got an error in the script "Combining LSMASHVideoSource + LSMASHAudioSource", here is the fix:
# Combining LSMASHVideoSource + LSMASHAudioSource
#LoadPlugin("LSMASHSource.dll")
##################################
## @ atrack - audio track number. Default auto. If -2, ignore audio.
## @ fpsnum, fpsden - framerate. Default auto.
## @ format - force specified output pixel format. Default auto.
## (see documentation for valid color formats)
##
##
function LSmashSource2(string path, int "atrack",
\ int "fpsnum", int "fpsden",
\ string "format")
{
atrack = Default(atrack, 0)
fpsnum = Default(fpsnum, 0)
fpsden = Default(fpsden, 1)
format = Default(format, "")
video = LSMASHVideoSource(path,
\ fpsnum=fpsnum, fpsden=fpsden,
\ format=format)
return (atrack==-2) ? video: AudioDub(video,
\ LSMASHAudioSource(path, track=atrack))
}
It is just a parenthesis that is instead of a comma, indicated in red.
Uhm.. the change to comma broke the script for me!?
StainlessS
4th July 2021, 23:41
Uhm.. the change to comma broke the script for me!?
I think GMJCZP was saying that the comma [','] was wrong, and closing parenthesis [')'] was correct.
kedautinh12
14th July 2021, 08:00
Good NEWS, AkakinVS said he will update avisynth ver
https://github.com/AkarinVS/L-SMASH-Works/issues/3#issuecomment-879623789
JKyle
14th July 2021, 08:15
Good NEWS, AkakinVS said he will update avisynth ver
https://github.com/AkarinVS/L-SMASH-Works/issues/3#issuecomment-879623789
Wow, that's pretty good news. :cool:
kedautinh12
14th July 2021, 08:58
Wow, that's pretty good news. :cool:
If you had issues, you can report him
FranceBB
14th July 2021, 09:02
Yeah, the problem is that the FFMpeg devs just seem not to care about my bugs... -.-
https://trac.ffmpeg.org/ticket/9219 and https://trac.ffmpeg.org/ticket/9255
But the IPCM one I think can be integrated in LWLibavAudioSource.
Now, I don't know how it calls the decoding libraries, but if it's possible to include some sort of conditional to check whether it's a normal PCM or an IPCM from Sony, it would be better as it would be possible to add the relative information to the decoder so that the right library can be called.
Technically speaking, if there was a way to tell Libav what the input file is and specify a particular decoder, there would be no problems at all decoding IPCM files: https://forum.doom9.org/showthread.php?p=1942428
About the DNX one, I think we should storm from Doom9 the bug tracker of FFMpeg and insist on this issue 'cause they have to get that crap fixed.
Even nowadays I gotta use the workaround I provided but it's incredibly slow, especially for big files over the network...
It's just not feasible, it has to work out of the box...
tebasuna51
14th July 2021, 11:13
But the IPCM one I think can be integrated in LWLibavAudioSource.
Now, I don't know how it calls the decoding libraries, but if it's possible to include some sort of conditional to check whether it's a normal PCM or an IPCM from Sony, it would be better as it would be possible to add the relative information to the decoder so that the right library can be called.
Technically speaking, if there was a way to tell Libav what the input file is and specify a particular decoder, there would be no problems at all decoding IPCM files: https://forum.doom9.org/showthread.php?p=1942428
The check for pcm is not easy. If I well remember madshi, in eac3to, try encode to flac with many options and the most compressible is the good.
But with parameters can work fine. From NicAudio wiki (http://avisynth.nl/index.php/NicAudio):
NicLPCMSource (string, int "samplerate", int "samplebits", int "channels")
...
int samplebits = 0
Necessary for lpcm and raw files. Valid values 8/16/24/32 (also 33 (32 float) for raw) (lpcm also accept 20 and -8/-16/-24/-32. Negative values are for BluRay lpcm (big-endian)).
BTW if you need AviSynth to open your IPCM_Sample_track2.ipcm that works:
NicLPCMSource("C:\...\IPCM_Sample_track2.ipcm", 48000, -24, 2)
FranceBB
14th July 2021, 14:25
if you need AviSynth to open your IPCM_Sample_track2.ipcm that works:
NicLPCMSource("C:\...\IPCM_Sample_track2.ipcm", 48000, -24, 2)
Ah, so you can pass parameters to NICAudio to make it work, sweet. :)
That's good to know.
qyot27
14th July 2021, 23:11
Does this build of FFmpeg detect it correctly? I couldn't download the sample to verify for myself.
https://www.mediafire.com/file/7ttrj9zvnxb9z2y/ffmpeg_isomipcm_64bit.7z/file
tebasuna51
14th July 2021, 23:47
Does this build of FFmpeg detect it correctly?
Yes work fine:
ffmpeg.exe -i IPCM.MP4 -acodec pcm_s24le out1.wav
...
Stream #0:1(und): Audio: pcm_s24be (ipcm / 0x6D637069), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
and the output is correct.
real.finder
19th July 2021, 10:13
Good NEWS, AkakinVS said he will update avisynth ver
https://github.com/AkarinVS/L-SMASH-Works/issues/3#issuecomment-879623789
Wow, that's pretty good news. :cool:
not for a long time https://github.com/AmusementClub/L-SMASH-Works/commit/47ebb6ed01d8107ad3b9d62d257fc2200ef9dcce
even if they say
Amusement club internal L-SMASH releases. Generally for specific needs of our members, *not* for public consumption.
that not a good sign, AkakinVS repo seems not get new updates last days unlike AmusementClub one, so I think we should better depends on https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works
real.finder
19th July 2021, 10:31
btw, there are avs build here https://github.com/AkarinVS/L-SMASH-Works/releases/tag/vA.3b it should work with HW decoding since last update seems not work https://forum.doom9.org/showpost.php?p=1943898&postcount=1326
as a side note, maybe this FFmpeg https://github.com/AkarinVS/FFmpeg worth pay attention
kedautinh12
19th July 2021, 10:57
I seen only x64 ver
GMJCZP
19th July 2021, 14:27
I seen only x64 ver
Exactly says:
All the released binaries are for Windows/x64.
Experimental AviSynth+ plugin is also included, but it does not include any of the VS only changes mentioned above.
Hopefully this is temporary.
kedautinh12
19th July 2021, 16:30
X86 here
https://github.com/AkarinVS/L-SMASH-Works/issues/3#issuecomment-882612464
Only me can't test everything about format video, audio. Need everyone test with me to development L-SMASH of AkarinVS
GMJCZP
19th July 2021, 23:14
X86 here
https://github.com/AkarinVS/L-SMASH-Works/issues/3#issuecomment-882612464
Only me can't test everything about format video, audio. Need everyone test with me to development L-SMASH of AkarinVS
I am getting this error message: "Script error: There is no function named 'LWLibavVideoSource'".
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.