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 29th July 2021, 18:12   #1361  |  Link
JKyle
App Digger
 
JKyle's Avatar
 
Join Date: Sep 2018
Posts: 411
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).

Plz have a look at my issue thread.
JKyle is offline   Reply With Quote
Old 30th July 2021, 09:36   #1362  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
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:



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:




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...

Code:
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)



everything was fine again.

Avisynth 3.7.1 x64
Windows 10 Enterprise x64
LSMASH version 20210729 x64
FranceBB is offline   Reply With Quote
Old 31st July 2021, 01:08   #1363  |  Link
JKyle
App Digger
 
JKyle's Avatar
 
Join Date: Sep 2018
Posts: 411
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/HomeOfAviSynthPlu...Works/issues/6
JKyle is offline   Reply With Quote
Old 31st July 2021, 13:31   #1364  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Ah, right. Well I can't test that as my Quadro doesn't support HEVC as it's fairly old...
FranceBB is offline   Reply With Quote
Old 30th August 2021, 12:13   #1365  |  Link
Morku
Registered User
 
Join Date: Jul 2012
Posts: 208
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")"
Morku is offline   Reply With Quote
Old 30th August 2021, 12:53   #1366  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Quote:
Originally Posted by Morku View Post
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:

Code:
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:

Quote:
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:





same goes for LSMASHVideoSource:






Would you mind uploading a sample for us?
We need to know which codec leads to your issue, not just the container...
FranceBB is offline   Reply With Quote
Old 30th August 2021, 15:33   #1367  |  Link
Morku
Registered User
 
Join Date: Jul 2012
Posts: 208
Who can I provide the sample in PM?
I have found out, not all mp4 are affected, but I can reproduce on two.

Quote:
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
Morku is offline   Reply With Quote
Old 30th August 2021, 15:56   #1368  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
Just give sample to L-SMASH Works developer
https://github.com/HomeOfAviSynthPlu...H-Works/issues
kedautinh12 is offline   Reply With Quote
Old 30th August 2021, 16:57   #1369  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
If you want private, ask @Reel_Deel (one man stand) way to contact Asd_g
kedautinh12 is offline   Reply With Quote
Old 30th August 2021, 17:22   #1370  |  Link
Morku
Registered User
 
Join Date: Jul 2012
Posts: 208
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.
Morku is offline   Reply With Quote
Old 30th August 2021, 17:27   #1371  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
Quote:
Originally Posted by Morku View Post
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
kedautinh12 is offline   Reply With Quote
Old 30th August 2021, 18:20   #1372  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,346
@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
poisondeathray is offline   Reply With Quote
Old 30th August 2021, 18:39   #1373  |  Link
Morku
Registered User
 
Join Date: Jul 2012
Posts: 208
@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.

Last edited by Morku; 30th August 2021 at 19:13.
Morku is offline   Reply With Quote
Old 31st August 2021, 02:47   #1374  |  Link
Balling
Registered User
 
Join Date: Feb 2020
Posts: 539
"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.
Balling is offline   Reply With Quote
Old 1st September 2021, 05:56   #1375  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 1,048
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.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers.
Katie Boundary is offline   Reply With Quote
Old 1st September 2021, 10:10   #1376  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
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 standard (e.g. MP4, MOV, 3GPP(2)).
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 1st September 2021 at 10:14.
LigH is offline   Reply With Quote
Old 1st September 2021, 10:23   #1377  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Quote:
Originally Posted by Katie Boundary View Post
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!
FranceBB is offline   Reply With Quote
Old 17th September 2021, 22:22   #1378  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
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
Code:
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.
MysteryX is offline   Reply With Quote
Old 18th September 2021, 02:24   #1379  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
I think you need report to developer
https://github.com/AkarinVS/L-SMASH-Works/issues
kedautinh12 is offline   Reply With Quote
Old 23rd September 2021, 00:29   #1380  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 1,048
Quote:
Originally Posted by FranceBB View Post
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.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers.
Katie Boundary 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 03:21.


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