Log in

View Full Version : L-SMASH Source


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 [28] 29 30 31 32 33 34

qyot27
20th July 2021, 01:06
As I commented over there, what probably happened is that it got built using meson with g++. It works, but only with a GCC build of AviSynth+.

real.finder
28th July 2021, 13:24
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.

https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/issues/5#issuecomment-887420681

also everyone, Asd-g made release https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/releases don't know if HW decode work or not in this build

FranceBB
28th July 2021, 14:42
Lovely. Thanks for the heads up. ;)

JKyle
28th July 2021, 16:26
I've just confirmed that the new release, 20210728 (https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/releases/tag/20210728), works nicely with NVIDIA CUVID acceleration on both AviSynth+(3.7.0) and VapourSynth(R54).
:thanks: for the wonderful job!

tebasuna51
28th July 2021, 19:51
And the new release have the drc_scale parameter working fine for me. Thanks.

gispos
28th July 2021, 22:07
Can't play MPEG-TS AVC video files with it, with all previous versions there are no problems with these files.

kedautinh12
29th July 2021, 00:09
You need report to developer
https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/issues

JKyle
29th July 2021, 00:46
Can't play MPEG-TS AVC video files with it, with all previous versions there are no problems with these files.

I've experienced a similar phenomenon with an MPEG-TS HEVC video file (HDR10).

For reference, here's the issue (https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/issues/6) I submitted on the GitHub repo.

kedautinh12
29th July 2021, 13:35
Can't play MPEG-TS AVC video files with it, with all previous versions there are no problems with these files.

Check new ver
https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/releases/tag/20210729

gispos
29th July 2021, 15:28
Check new ver
https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/releases/tag/20210729
Yes, it works now

JKyle
29th July 2021, 18:12
Ver 20210729 opens the sample HDR10 file OK but there is another issue.
Now it outputs an incorrect pixel type.

Original: YUV420P10 --(LWLibavVideoSource)--> YV12(YUV420P8) (without an explicit format setting)

I've seen the same issue with another 10-bit source (HLG HDR video) (https://4kmedia.org/travelxp-4k-hdr-hlg-sample/).

Plz have a look at my issue thread (https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/issues/6).

FranceBB
30th July 2021, 09:36
I cannot reproduce the problem.

I opened a YUV 4:2:2 10bit HDR PQ AppleProRes UHD 4000 nits mov source and it displays the right bit depth:

https://i.imgur.com/kzTSybM.png

I also tried with a YUV 4:2:2 10bit HDR HLG XAVC Intra Class 300 UHD 1000 nits mxf source and it displays the right bit depth again:

https://i.imgur.com/Ndpt27A.png
https://i.imgur.com/tpjMm0S.png

At this point I thought it was only happening with H.265 HEVC files, therefore I tried with a YUV 4:2:0 10bit HDR PQ H.265 HEVC HDR PQ 1000 nits .ts file and...

Video
ID : 257 (0x101)
Menu ID : 1 (0x1)
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@High
Codec ID : 36
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Writing library : ATEME Titan File 3.7.9 (4.7.9.0)

https://i.imgur.com/S2bVVI4.png
https://i.imgur.com/oIpmuJz.png

everything was fine again.

Avisynth 3.7.1 x64
Windows 10 Enterprise x64
LSMASH version 20210729 x64

JKyle
31st July 2021, 01:08
CPU decoding is OK with me too.

The issue arises when hardware decoding (NVIDIA CUVID) is employed (prefer_hw=1).

You can see my tests and screenshots on the issue thread.

https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/issues/6

FranceBB
31st July 2021, 13:31
Ah, right. Well I can't test that as my Quadro doesn't support HEVC as it's fairly old...

Morku
30th August 2021, 12:13
Someone have the same? I load a .mp4 file with "Frame rate : 23.976 (24000/1001) FPS", but L-Smash Output is "Framerate : 1.5321345 (4601/3003)"

I have tested with StaxRip and MeGUI version 20210811. When I use DGIndexNV, the Framerate is fine. I tested another mp4 with same issue.
Script is just a simple "LSMASHVideoSource("file.mp4")"

FranceBB
30th August 2021, 12:53
Someone have the same? I load a .mp4 file with "Frame rate : 23.976 (24000/1001) FPS", but L-Smash Output is "Framerate : 1.5321345 (4601/3003)"


Nope. I can't reproduce the bug.

I made a simple:


ColorBars(848, 480, pixel_type="YV12")

ConvertFPS(23.976)

trim(0, 100)


and encoded it with the most basic settings ever in H.264, encoded the audio in AAC with NeroAAC and then I muxed everything in MP4 with MP4box:

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 2 s 169 ms
Bit rate : 11.0 kb/s
Width : 848 pixels
Height : 480 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (23976/1000) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.001
Stream size : 2.92 KiB (2%)
Writing library : x264 core 152 r2851bm ba24899
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Codec configuration box : avcC

Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 4 s 234 ms
Duration_LastFrame : -11 ms
Bit rate mode : Variable
Bit rate : 243 kb/s
Maximum bit rate : 256 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 126 KiB (96%)
Default : Yes
Alternate group : 1

Then I used LWLibavVideoSource to index the newly created file and... it works fine:

https://i.imgur.com/YMBf8vB.png
https://i.imgur.com/9BsKgrv.png


same goes for LSMASHVideoSource:

https://i.imgur.com/oqXvZrw.png
https://i.imgur.com/NOJz0mv.png



Would you mind uploading a sample for us?
We need to know which codec leads to your issue, not just the container...

Morku
30th August 2021, 15:33
Who can I provide the sample in PM?
I have found out, not all mp4 are affected, but I can reproduce on two.

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 41 min 12 s
Bit rate : 4 648 kb/s
Maximum bit rate : 22.6 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.093
Stream size : 1.34 GiB (88%)
Encoded date : UTC 2021-08-28 16:28:55
Tagged date : UTC 2021-08-28 16:28:55
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Codec configuration box : avcC

Audio
ID : 2
Format : E-AC-3
Format/Info : Enhanced AC-3
Commercial name : Dolby Digital Plus
Codec ID : ec-3
Duration : 41 min 12 s
Bit rate mode : Constant
Bit rate : 640 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Compression mode : Lossy
Stream size : 189 MiB (12%)
Language : German
Service kind : Complete Main
Encoded date : UTC 2021-08-28 16:28:55
Tagged date : UTC 2021-08-28 16:28:55

kedautinh12
30th August 2021, 15:56
Just give sample to L-SMASH Works developer
https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/issues

kedautinh12
30th August 2021, 16:57
If you want private, ask @Reel_Deel (one man stand) way to contact Asd_g

Morku
30th August 2021, 17:22
The reason is simply I can't share copyright material public to report an issue. As I know, GitHub has no private message feature (or I can't see it).
Since the issue is just with two mp4 files (which also decode fine with FFVideoSource and DGSource), I can't create an innocent file to share.

If Reel_Deel and Asd_g would like to have a look, it would be great if they drop me a message to check. :)

kedautinh12
30th August 2021, 17:27
The reason is simply I can't share copyright material public to report an issue. As I know, GitHub has no private message feature (or I can't see it).
Since the issue is just with two mp4 files (which also decode fine with FFVideoSource and DGSource), I can't create an innocent file to share.

If Reel_Deel and Asd_g would like to have a look, it would be great if they drop me a message to check. :)

I mean another way not in github

poisondeathray
30th August 2021, 18:20
@Morku, try LWLibavVideoSource instead of LSmashVideoSource

Was file "cut" or stream copied ? Sometimes cut file can have buggy timestamps; LSmashVideoSource does not index MOV/MP4 and declares wrong framerate

Morku
30th August 2021, 18:39
@poisondeathray
LWLibavVideoSource helps indeed. The framerate is fine.

It was downloaded with AnyStream. No other adjustments. So I started to clickthrough StaxRip and ran into the issue. Wondering why it takes so long and files size gets unfamiliar high :)

Other files, received the same way, are fine, using LSMASHVideoSource.

EDIT: I see, I can change the Source filter to LWLibavVideoSource in StaxRip. Still wondering, because unter Settings -> Video there is a check for "Add filter to automatically correct the frame rate", would expect an AssumeFPS here, because the Logfile shows a difference in "Media Info Source File" = 23.976 and following "Source Script Info" = 1.5321345

Anyway, if it something normal, thank you for the hint.

Balling
31st August 2021, 02:47
"The issue arises when hardware decoding (NVIDIA CUVID) is employed"

This is normal, ffmpeg also defaults to pixel format nv12 when you decode avc with -c:v h264_cuvid -i or with -hwaccel nvdec.

You can just specify ffplay -s 1920x1080 -pix_fmt nv12 file.yuv (you also need to set the matrix at least with -vf scale=in_color_matrix) and it will work. There is no need to use yuv420p10.

Maybe it is a good idea to already move to p010 and p016. Those are now what is used on linux too.

Katie Boundary
1st September 2021, 05:56
I've found that LWLibavVideoSource indexes video MUCH more quickly than ffvideosource or ffmsindex does, meaning that you can use it for longer video files without programs becoming unresponsive. This, in turn, allows easier batch-indexing. I've only learned this in the past day or two and I've already replaced ffmsindex/ffvideosource with Libav in my workflow.

Lsmash just seems to be useless though.

LigH
1st September 2021, 10:10
LSMASHVideoSource is not at all "useless". It does not need extra indexing when it can rely on an index chunk already available in the source file. Disadvantage: The contained index must be reliable... and the source must belong to the ISO/IEC Base Media File Format (https://en.wikipedia.org/wiki/ISO/IEC_base_media_file_format) standard (e.g. MP4, MOV, 3GPP(2)).

FranceBB
1st September 2021, 10:23
Lsmash just seems to be useless though.

Oh... poor LSMASH... :(


You see, when you use LSMASH.dll there are four functions inside:

LWLibavVideoSource() / LWLibavAudioSource()
LSMASHVideoSource() / LSMASHAudioSource()

now, the first two are what we would refer to as indexers, in fact they create a proper index file by seeking through the whole video and "indexing" the whole video (and audio).
This is exactly what FFMpegSource2() does with FFVideoSource() and FFAudioSource().
The other two, though, the LSMASH ones, are not.
They only work with ISO containers like MP4 and the reason is that they don't index.
You might call them indexers as well, but they really don't properly index, instead, they read the information inside the container and trust the container's index values.
This makes sense and allows users to actually decode the video faster than by using a "proper" indexer that re-creates the index from scratch.
You see, some containers have already an index inside them.
What indexers like LWLibav, FFVideo etc do is to ignore the internal index inside the container and re-create their own to play extremely safe.
What LSMASH does is to find the index inside the container and use it.
Of course, the index in a container can be broken, corrupted, wrong for all kind of reasons, so it's always better to really "index" a file with an indexer that properly re-creates it, but that doesn't mean that LSMASHVideoSource() is totally useless as sometimes the index in a container is right and can be trusted and this allows you to save a lot of time.

Just think about me indexing 1.3 TB worth of masterfiles through a 1 Gbit/s network. If I trust the index of the container and avoid to re-create it from scratch I'm gonna save a lot of time, so, as you can see, there are some scenarios in which it can be used.

Besides, the world is good 'cause it's various, so the more options we have to decode a file in Avisynth the better! ;)

MysteryX
17th September 2021, 22:22
Encoding GoPro 5K footage. Using StaxRip editor, with x265 it encodes fine, but with NVenc for hardware acceleration, it always freezes at about 99%. No warning or anything. When it freezes, it says "729/748" frames.

x265 encodes fine but gives a warning

vpy [FLAW]: error occurred while reading frame 747


In Avisynth, it encodes fine both with x265 and NVenc. (with LSMashSource)

Final test, using Vapoursynth with ffms2 source and NVenc. Worked flawlessly.

The problem is LSMashSource for VapourSynth.

kedautinh12
18th September 2021, 02:24
I think you need report to developer
https://github.com/AkarinVS/L-SMASH-Works/issues

Katie Boundary
23rd September 2021, 00:29
Oh... poor LSMASH... :(


You see, when you use LSMASH.dll there are four functions inside:


I didn't say Lsmash.dll; I just said Lsmash. I thought the context would make it clear that I was referring to Lsmashvideosource and Lsmashaudiosource.

FranceBB
23rd September 2021, 08:24
I didn't say Lsmash.dll; I just said Lsmash. I thought the context would make it clear that I was referring to Lsmashvideosource and Lsmashaudiosource.

Ok, granted.
Still, I gotta be fair, having an indexer that doesn't create an index file means that it's faster to open in AVS however I wouldn't take the risk on MP4 files from somewhere from the web 'cause bad things can happen like in this case. On the other hand, when I receive .mxf files of 1.3 TB as UHD Masterfiles it could be useful as it would save hours of indexing time (assuming that the index inside the container is correct).

So, in a nutshell, I'd like LSMASH to support MXF as well one day, but for anything that doesn't come from a professional studio, I wouldn't take any chances and I would use an indexer that indexes the file. :)

MysteryX
7th October 2021, 02:38
He did investigate the issue.
The video file is invalid in that the last two frames both contain the same
poc (26).
ffms2 ignores the error but lsmas is more picky.

ffms2 does work for GoPro videos, but in some cases, the frames in the source video don't match the frames in the output. Something gets skipped. That's probably due to the same issue.

Is there any way I can open GoPro videos without such glitches?

videoh
7th October 2021, 02:47
He did investigate the issue.

ffms2 does work for GoPro videos, but in some cases, the frames in the source video don't match the frames in the output. Something gets skipped. That's probably due to the same issue.

Is there any way I can open GoPro videos without such glitches? Any chance of a link to the video? I looked but couldn't find it.

MysteryX
7th October 2021, 03:17
Here's a sample video (https://mega.nz/file/TIoFya6Q#KQ3rZxzYbWAZxNG3eIOlZkf9-snH0Rki3LHwO8DvGjo)

I just converted a GoPro 5K HEVC video to UT Video with FFMPEG and it gave this list of errors:
- Using non-standard frame rate 29/1
- deprecated pixel format used, make sure you did set range correctly
- Duplicate POC in a sequence
- Error parsing NAL unit #0
- Error while decoding stream #0:0: Invalid data found when processing input

...

videoh
7th October 2021, 03:29
Seems to work fine with DGDecNV.

FranceBB
25th October 2021, 13:40
Who's the current maintainer of LSMASH and in which repository can I open an issue on Github about LWLibavAudioSource?
It used to be HollyWu but if I remember correctly last time he retired... so... who's handling this now?

kedautinh12
25th October 2021, 13:59
Just creat an issues and Asd-g will fix it

FranceBB
25th October 2021, 16:51
Just creat an issues and Asd-g will fix it

Yes, but I didn't know where, I mean in which repository xD

In the end, I figured it out and I opened it here:

https://github.com/AkarinVS/L-SMASH-Works/issues/17

I feel like I'm always the only one who comes up with Indexing bugs on weird audio codecs like last time with IPCM.
This time is DolbyE ehehehehehe

kedautinh12
25th October 2021, 17:15
Yes, but I didn't know where, I mean in which repository xD

In the end, I figured it out and I opened it here:

https://github.com/AkarinVS/L-SMASH-Works/issues/17

I feel like I'm always the only one who comes up with Indexing bugs on weird audio codecs like last time with IPCM.
This time is DolbyE ehehehehehe

It's for Vapoursynth and AkarinVS won't support avs, just creat issue here for avs
https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/issues

FranceBB
10th November 2021, 14:47
Opened a new bug about a ZLog2 HDR H.265 UHD file (yes, there's more than just PQ and HLG in the world ehehehe): https://github.com/AkarinVS/L-SMASH-Works/issues/18

kedautinh12
7th April 2022, 06:30
L-SMASH-Works (20220406)
https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/releases

FranceBB
9th April 2022, 22:03
L-SMASH-Works (20220406)
https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/releases

Uh, a new version, it's always nice when indexers are updated! :)

I have a question, or rather a feature request: when an .xml is given to the indexer like LWLibavVideoSource("CPL.xml") and LWLibavAudioSource("CPL.xml") please try to use the IMF decoder built into FFMpeg rather than return an error.
That would be really cool as this way we're gonna have IMF support inside Avisynth! :D

kedautinh12
9th April 2022, 22:05
You can ask in issues tab :D

FranceBB
9th April 2022, 22:11
You can ask in issues tab :D

Done. :)

https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/issues/16

Emulgator
20th April 2022, 18:54
Tiny cosmetics, don't remember when it sneaked in.
At first opening and indexing the resampler rate default seems to be uninitiated:
a=LWLibavAudioSource("F:\file.avi"
"LWLibavAudioSource: Failed to open resampler"
but indexes anyway.
Reloading after indexing throws no error.

gispos
28th April 2022, 19:04
Tiny cosmetics, don't remember when it sneaked in.
At first opening and indexing the resampler rate default seems to be uninitiated:
a=LWLibavAudioSource("F:\file.avi"
"LWLibavAudioSource: Failed to open resampler"
but indexes anyway.
Reloading after indexing throws no error.

I have the same problems when PCM audio stream is included in the video.
Have reported this here: https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/issues/20

Emulgator
28th April 2022, 22:29
Yes, confirmed: In my case PCM Codec ID "twos" Big Endian/Signed 16bps@48kHz wrapped in .MP4 from a Panasonic DC-GH5.

kedautinh12
5th May 2022, 19:12
L-SMASH-Works 20220505
https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/releases

If FranceBB rep issue quickly, we will have IMF support function :D

FranceBB
5th May 2022, 19:14
L-SMASH-Works 20220505
https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/releases

If FranceBB rep issue quickly, we will have IMF support function :D

Sorry, I've been a bit overwhelmed. Testing first thing tomorrow, I promise.

LigH
6th May 2022, 07:21
If FranceBB rep issue quickly, we will have IMF support function :D

Looking forward to that one:

This message will self-destruct in 5 seconds. Good luck, Jim.

https://static.wikia.nocookie.net/missionimpossiblefanon/images/9/90/Imf_logo_by_asainguy444-d6yhy6s-1.png

:sly: