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 > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th March 2013, 10:52   #1  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
L-SMASH Source

Since LSMASHSource came up in the FFmpegSource thread I thought it might be a good idea to have a separate thread for it.


the_weirdo's Dropbox repository contains up-to-date downloads: http://www.dropbox.com/sh/3i81ttxf02...VhYLasmwa?dl=0
and here's the Wiki: http://avisynth.nl/index.php/LSMASHSource

From what I gathered LSMASHSource.dll offers:
LSMASHVideoSource(string source, int "track", int "threads", int "seek_mode", int "seek_threshold", bool "dr")
LSMASHAudioSource(string source, int "track", bool "skip_priming", string "layout")
LWLibavVideoSource(string source, int "stream_index", int "threads", bool "cache", int "seek_mode", int "seek_threshold", bool "dr")
LWLibavAudioSource(string source, int "stream_index", bool "cache", bool "av_sync", string "layout")

see: LSMASHSource.txt that comes with the download

Does anyone know what the difference is between LSMASH..Source and LWLibav..Source source is?
LWLibavVideoSource is basically a FFmpegSource alternative, which can be used without an index file. (index file will be created if cache is set to true)
LSMASHVideoSource is a mp4 source filter.

Cu Selur
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 15th December 2014 at 19:34.
Selur is offline   Reply With Quote
Old 17th March 2013, 12:54   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Seems to belong to or part of L-SMASH-Works by "VFR Maniac", see his sig here:
http://forum.doom9.org/showthread.ph...34#post1567834
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 18th March 2013, 11:54   #3  |  Link
radigast
Registered User
 
Join Date: Dec 2009
Posts: 18
Are there any advantages to using LWLibavVideoSource over FFVideoSource?
radigast is offline   Reply With Quote
Old 18th March 2013, 12:00   #4  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
No, clue.
For me so far:
advantages
  • can be used the need to index the content,... (especially indexing HD content takes it's time)
downsides:
  • has no separate indexing application (which would allow me to index all my content over night, without having to use Avisynth)

-> test and post if you find more pro's and con's
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 18th March 2013, 13:06   #5  |  Link
the_weirdo
Yes, I'm weird.
 
the_weirdo's Avatar
 
Join Date: May 2010
Location: Southeast Asia
Posts: 271
Quote:
Originally Posted by Selur View Post
advantages
  • can be used the need to index the content,... (especially indexing HD content takes it's time)
You mean "can be used *without* the need..." right? Then actually it *does* need to index the source. It just stores the index in memory when set "cache=false", same as with FFMS2.

EDIT: It seems it take less time than FFMS2 to create the index.
EDIT (after some more testing):
Its index file is much larger than FFMS2's.
In case of MKV and MP4 container, it seems frame accurate as FFMS2.
Not sure about other containers 'cause I don't have a reference, but in some of my test, it decodes MPEG-TS different from FFMS2.
__________________
“Never argue with stupid people, they will drag you down to their level and then beat you with experience.” — Mark Twain

Last edited by the_weirdo; 18th March 2013 at 13:46. Reason: My English sucks!
the_weirdo is offline   Reply With Quote
Old 18th March 2013, 13:50   #6  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
Quote:
It just stores the index in memory when set "cache=false", same as with FFMS2.
argh, seems you are right. Opening a large HD file still takes a long time,..
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 18th March 2013, 14:05   #7  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
Quote:
Originally Posted by the_weirdo View Post
Its index file is much larger than FFMS2's.
FFMS2 compresses its index files with zlib, so that's not so strange.

I think lsmashsource might actually do MPEG TS/PS right. For other stuff there shouldn't be much of a difference between lshashsource and FFMS2.
TheFluff is offline   Reply With Quote
Old 18th March 2013, 14:11   #8  |  Link
VFR maniac
Spinner of yarns
 
VFR maniac's Avatar
 
Join Date: May 2009
Posts: 164
Quote:
Originally Posted by the_weirdo View Post
Its index file is much larger than FFMS2's.
I dislike compressed/encoded format.
Since people can't select which stream by looking the index file.
So, I write the index file as human-readable.
__________________
僕と契約して、L-SMASH developerになってよ!
L-SMASH | L-SMASH Works | Opus-in-ISOBMFF specification and reference software
VFR maniac is offline   Reply With Quote
Old 18th March 2013, 14:18   #9  |  Link
the_weirdo
Yes, I'm weird.
 
the_weirdo's Avatar
 
Join Date: May 2010
Location: Southeast Asia
Posts: 271
Quote:
Originally Posted by TheFluff View Post
FFMS2 compresses its index files with zlib, so that's not so strange.
Ah, that explains a lot.
Quote:
Originally Posted by VFR maniac View Post
I dislike compressed/encoded format.
Since people can't select which stream by looking the index file.
So, I write the index file as human-readable.
That's the good thing, then. Actually, the index file doesn't take up much disk space, anyway.

I hope L-SMASHSource will become a good MPEG-TS/PS source filter, too.
__________________
“Never argue with stupid people, they will drag you down to their level and then beat you with experience.” — Mark Twain
the_weirdo is offline   Reply With Quote
Old 18th March 2013, 14:27   #10  |  Link
VFR maniac
Spinner of yarns
 
VFR maniac's Avatar
 
Join Date: May 2009
Posts: 164
CODEC specific data (extradata) is written in the index file as well.
This makes more accurate seek possible.

For instance, H.264 allows IDR-picture without SPS/PPS.
For such IDR-pictures in TS, we can't treat as keyframe (random access point) but libavfomrat returns them as keyframe.
So, the result will be broken when the current SPS/PPS in extradata doesn't match (and libavcodec shall not update AVCodecContext.extradata).
This case is frequently present in BD m2ts.
LWLibavVideoSource can handle correctly this case.

About WMV3/VC-1 in ASF, libavformat may not return any PTS even if there is B-picture.
LWLibavVideoSource attempts to generate PTS from DTS and picture type by actual __decoding__, and realizes frame accurate seek.
So, creating the index file is to be slow.

About MPEG-1/2 Video, libavformat might return no PTS for some frames in certain contaniers such as MPEG-PS.
LWLibavVideoSource attempts to generate PTS from DTS and picture type, and realizes frame accurate seek.

LWLibavVideoSource can handle audio stream of DV-in-AVI Type-I without crash.
This format requires seek by special treatment in libavformat.
__________________
僕と契約して、L-SMASH developerになってよ!
L-SMASH | L-SMASH Works | Opus-in-ISOBMFF specification and reference software

Last edited by VFR maniac; 18th March 2013 at 15:01.
VFR maniac is offline   Reply With Quote
Old 18th March 2013, 16:03   #11  |  Link
noee
Registered User
 
Join Date: Jan 2007
Posts: 530
I have a source that I ripped from one of my BDs that is interlaced/TFF VC1 (1080i60) and I get an error: "Detected PTS duplication..." and LWLibavVideoSource(source="...", seek_mode=0) won't open the file. Expected behavior? Bad rip?
noee is offline   Reply With Quote
Old 18th March 2013, 17:52   #12  |  Link
radigast
Registered User
 
Join Date: Dec 2009
Posts: 18
Does LWLibavVideoSource accurately index interlaced sources? Depending on the source/solar winds/price of tea in China/etc..., FFVideoSource sometimes will index interlaced sources properly and sometimes won't.
radigast is offline   Reply With Quote
Old 19th March 2013, 10:16   #13  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
regarding indexing:
looking at the aui_indexer from rigaya, it is mainly a frontend for the lsmashinput.aui (library), sadly it does not offer any way to choose where the index will be created nor does it offer any progress indication during the indexing.
-> so if someone is in contact with rigaya and/or lsmashinput.aui would be nice if adding progress indication and the possibility could be passed on to them as 'feature requests/wishes'.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 19th March 2013, 15:01   #14  |  Link
VFR maniac
Spinner of yarns
 
VFR maniac's Avatar
 
Join Date: May 2009
Posts: 164
Quote:
Originally Posted by noee View Post
I have a source that I ripped from one of my BDs that is interlaced/TFF VC1 (1080i60) and I get an error: "Detected PTS duplication..." and LWLibavVideoSource(source="...", seek_mode=0) won't open the file. Expected behavior? Bad rip?
I threw all warning to env->ThrowError().
Now (@ rev499), I don't throw them but don't display any warning and non-fatal error.
At least that message means the file is broken or libavformat TS demuxer is broken for the file, and means the seek may behave inaccurately.
Well, I killed that message from LSMASHSource.dll so you can't see that message anymore :P unless I add the error threshold option.
__________________
僕と契約して、L-SMASH developerになってよ!
L-SMASH | L-SMASH Works | Opus-in-ISOBMFF specification and reference software
VFR maniac is offline   Reply With Quote
Old 19th March 2013, 15:26   #15  |  Link
VFR maniac
Spinner of yarns
 
VFR maniac's Avatar
 
Join Date: May 2009
Posts: 164
Quote:
Originally Posted by radigast View Post
Does LWLibavVideoSource accurately index interlaced sources? Depending on the source/solar winds/price of tea in China/etc..., FFVideoSource sometimes will index interlaced sources properly and sometimes won't.
For frames structured by single picture, I think LWLibavVideoSource can seek correctly as long as there is no PTS/DTS duplication and no error of frame info returned by libavformat.

For frames structured by two separated pictures, LWLibavVideoSource will return correct frame and broken frame by turns.
In this case, you can delete broken frames by SelectEven() or SelectOdd().

For progressive frames with pulldown/RFF flag, LWLibavVideoSource can't handle these flags.
There is the patches for that, but impossible to apply to the latest repository.
https://skydrive.live.com/?cid=8658EC275D9699D5&id=8658EC275D9699D5!236
https://github.com/maki-rxrz/L-SMASH-Works/tree/experimental_repeat_control

About whether the index is written accurately or inaccurately, All I can say is that it depends on libavformat!!


Quote:
Originally Posted by Selur View Post
regarding indexing:
looking at the aui_indexer from rigaya, it is mainly a frontend for the lsmashinput.aui (library), sadly it does not offer any way to choose where the index will be created nor does it offer any progress indication during the indexing.
-> so if someone is in contact with rigaya and/or lsmashinput.aui would be nice if adding progress indication and the possibility could be passed on to them as 'feature requests/wishes'.
aui_indexer only hits the open function common to all L-SMASH Works input plugin through AviUtl API without AviUtl.
Progress indication is displayed by another dialog.

It can't specify any destination for the index file and the way of displaying progress as long as hitting through AviUtl API.
__________________
僕と契約して、L-SMASH developerになってよ!
L-SMASH | L-SMASH Works | Opus-in-ISOBMFF specification and reference software

Last edited by VFR maniac; 19th March 2013 at 15:49.
VFR maniac is offline   Reply With Quote
Old 19th March 2013, 16:06   #16  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,229
Testing on some old avi files that work fine with FFMpegsource, LwLibAvSource has the couple of flashes of green frames at the beginning, which then throws the video/audio sync out for the rest of the video.

Also, how do you use LsmashVideoSource? Does that only work on raw files or is it meant to open the video streams of Avi, MKV, VOV etc as well?
burfadel is offline   Reply With Quote
Old 20th March 2013, 16:12   #17  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,255
LsmashVideoSource works with mp4 and mov input. (not sure which video formats it supports)
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 20th March 2013, 16:45   #18  |  Link
VFR maniac
Spinner of yarns
 
VFR maniac's Avatar
 
Join Date: May 2009
Posts: 164
Quote:
Originally Posted by burfadel View Post
Testing on some old avi files that work fine with FFMpegsource, LwLibAvSource has the couple of flashes of green frames at the beginning, which then throws the video/audio sync out for the rest of the video.
I don't know your old AVI files.
__________________
僕と契約して、L-SMASH developerになってよ!
L-SMASH | L-SMASH Works | Opus-in-ISOBMFF specification and reference software
VFR maniac is offline   Reply With Quote
Old 20th March 2013, 21:08   #19  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 496
vapoursynth plugin for l-smash not compatible with linux?

http://paste.opensuse.org/60828889

Last edited by sl1pkn07; 24th March 2013 at 13:45.
sl1pkn07 is offline   Reply With Quote
Old 20th March 2013, 21:30   #20  |  Link
VFR maniac
Spinner of yarns
 
VFR maniac's Avatar
 
Join Date: May 2009
Posts: 164
Quote:
Originally Posted by sl1pkn07 View Post
vapoursynth plugin for l-smash not compatible with linux?

http://paste.opensuse.org/75818329
I don't test the compilation on any linux environment.
I build on MinGW32 only.
Patches welcome if the compilation fails.

BTW as far as I look at your log, it seems your ffmpeg or libav is old.
I don't consider about backward compatibility for L-SMASH Works.
__________________
僕と契約して、L-SMASH developerになってよ!
L-SMASH | L-SMASH Works | Opus-in-ISOBMFF specification and reference software
VFR maniac is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 05:15.


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