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 9th January 2020, 05:10   #1141  |  Link
l33tmeatwad
Registered User
 
l33tmeatwad's Avatar
 
Join Date: Jun 2007
Posts: 295
Quote:
Originally Posted by HolyWu View Post
I just tested it by 32-bit AVSMeter on a few clips with codecs avc hevc vc-1 mpeg2 vp9 av1, and I couldn't reproduce it.
Tried it on two different Windows 10 machines (both 64-bit Windows) and on macOS though WINE. The x64 version works on the same machines.
l33tmeatwad is offline   Reply With Quote
Old 9th January 2020, 06:26   #1142  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 754
Quote:
Originally Posted by l33tmeatwad View Post
Tried it on two different Windows 10 machines (both 64-bit Windows) and on macOS though WINE. The x64 version works on the same machines.
I tried it on x64 Win10 as well. But I couldn't reproduce it due to lack of useful information. Post your full script and the mediainfo of your media file. What program did you use to open the script? Have you tried to open other media files and it's still the same?
HolyWu is offline   Reply With Quote
Old 9th January 2020, 06:35   #1143  |  Link
l33tmeatwad
Registered User
 
l33tmeatwad's Avatar
 
Join Date: Jun 2007
Posts: 295
Quote:
Originally Posted by HolyWu View Post
I tried it on x64 Win10 as well. But I couldn't reproduce it due to lack of useful information. Post your full script and the mediainfo of your media file. What program did you use to open the script? Have you tried to open other media files and it's still the same?
I'll post some more information tomorrow when I'm at my computer again, but it was several MP4s containing x264 encoded video. The script was literally just LWLibavVideoSource and nothing else and works with the x64 plugin. It is not even generating the index file with the x86 version, just displays access violation in the AvsPmod preview window with no specific error codes.
l33tmeatwad is offline   Reply With Quote
Old 9th January 2020, 06:58   #1144  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,896
Just like HolyWu I could not reproduce it on my machine...

Hardware:
Core i5 (two physical cores plus two hyperthreading cores)
8 GB RAM

Software:
Win7 64
AVS+ 3.40 32bit
Latest HolyWu LSMASH build from Nov 2019
Old StaxRip 32bit version as the host software
Current X264 32bit MABS build by Ligh

Source:
Concert Show by Toto
AVC video 1280x720 @25fps progressive in MP4 container

Target format:
AVC video @704x396 @25fps progressive in MKV container

AVS Script:
Quote:
LWLibavVideoSource("D:\Toto.mp4", cachefile="D:\Toto temp files\Toto.lwi", format="YUV420P8")
ChangeFPS(25.00)
Crop(0,0, -Width % 4,-Height % 4)
ColorMatrix(source=0,dest=2)
RequestLinear(rlim=50, clim=50)
ConvertToYV12()
Spline36Resize(704,396)
avstp_set_threads(1)
Prefetch(4)

Two things to note about the script:
1. The ChangeFPS call right after the source filter has the only purpose to force linear access. I could have used RequestLinear instead. In MT mode this is necessary, otherwise the speed will drop to a snail's pace. (FFMS2 has the same behavior)
See here:
https://forum.doom9.org/showthread.p...54#post1883754

2. The RequestLinear call after ColorMatrix ist required to prevent crashes in MT mode. It is also necessary to force MT_SERIALIZED for ColorMatrix and RequestLinear if MT is used.
See here:
https://forum.doom9.org/showthread.p...79#post1865279
The relevant information is in the third paragraph of the post.


But with these settings the latest LWLibavVideoSource versions are absolutely stable on my machine...

Last edited by manolito; 10th January 2020 at 02:45.
manolito is offline   Reply With Quote
Old 9th January 2020, 12:41   #1145  |  Link
Taurus
Registered User
 
Taurus's Avatar
 
Join Date: Mar 2002
Location: Krautland
Posts: 903
Quote:
Originally Posted by manolito View Post

But with these settings the latest LWLibavVideoSource versions are absolutely stable on my machine...
Same here...
Using almost identical settings as manolito mentioned.
No crash, no nothing, pur fun
Taurus is offline   Reply With Quote
Old 9th January 2020, 16:26   #1146  |  Link
l33tmeatwad
Registered User
 
l33tmeatwad's Avatar
 
Join Date: Jun 2007
Posts: 295
After testing a few things I found out what I think is triggering it. Apparently files that contain cover art (iTunes) appear to crash the x86 version, a recontainered version will work fine. It's odd that it works on the x64 version but not the x86 version. The following machines were used to test with the same settings:

Machine 1
Code:
Processor: Core i7-8700 @ 3.20GHz
RAM: 16GB
Operating System: Windows 10 LTSB (2019) (64-bit)
Software: AviSynth+ 3.4.0
AvsPmod v2.6.1.1
Microsoft Visual C++ 2015-2019 Redist (14.24.28127)
Machine 2
Code:
Processor: Core i3-4160 @ 3.60GHz
RAM: 8GB
Operating System: Windows 10 LTSB (2019) (64-bit)
Software: AviSynth+ 3.4.0
AvsPmod v2.6.1.1
Microsoft Visual C++ 2015-2019 Redist (14.24.28127)
Machine 3
Code:
Processor: Core i5 @ 2.5GHz
RAM: 8GB
Operating System: macOS 10.11.6
Software: PlayOnMac (WINE, System Version 3.9)
AviSynth+ 3.4.0
AvsPmod v2.6.1.1
Media File
Code:
General
Complete name                            : 8bit Sample.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 60.5 MiB
Duration                                 : 3 min 13 s
Overall bit rate                         : 2 616 kb/s
Cover                                    : Yes

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
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                                 : 3 min 13 s
Bit rate                                 : 2 440 kb/s
Width                                    : 960 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 4:3
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.147
Stream size                              : 56.4 MiB (93%)
Writing library                          : x264 core 133 r2334 a3ac64b
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=240 / keyint_min=23 / scenecut=40 /
intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=16.0 / qcomp=0.60 /
qpmin=0 / qpmax=69 / qpstep=4 / vbv_maxrate=17500 / vbv_bufsize=17500 /
crf_max=0.0 / nal_hrd=none / ip_ratio=1.40 / aq=1:1.00
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 3 min 13 s
Duration_LastFrame                       : -19 ms
Bit rate mode                            : Constant
Bit rate                                 : 169 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                              : 3.90 MiB (6%)
Default                                  : Yes
Alternate group                          : 1
AviSynth Script
Code:
LWLibavVideoSource("8bit Sample.mp4", format="YUV420P8")

Last edited by l33tmeatwad; 14th January 2020 at 21:54.
l33tmeatwad is offline   Reply With Quote
Old 9th January 2020, 20:04   #1147  |  Link
Taurus
Registered User
 
Taurus's Avatar
 
Join Date: Mar 2002
Location: Krautland
Posts: 903
@l33tmeatwad:
I can confirm your findings.
Any other: directshowsource, dss2, ffvideoSource, etc. is doing fine.
This is on Win7_64bit with avisynth_32bit.
Have'nt tested avisynth_64bit.
Thanks for sharing your insight...
Taurus is offline   Reply With Quote
Old 11th January 2020, 14:08   #1148  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 754
Quote:
Originally Posted by l33tmeatwad View Post
After testing a few things I found out what I think is triggering it and you can find a test file below. Apparently files that contain cover art (iTunes) appear to crash the x86 version, a recontainered version will work fine. It's odd that it works on the x64 version but not the x86 version.
Thanks for the findings. The access violation is caused by zlib and it seems that there is something wrong in the masmx86 assembly implementation. Hence I decide not to use them now.
HolyWu is offline   Reply With Quote
Old 11th January 2020, 14:13   #1149  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 754
https://github.com/HolyWu/L-SMASH-Wo...ks_20200111.7z
  • Update to FFmpeg-20200110-c4c96d5.
  • lwindex: Don't write unneeded entries for audio streams in VideoSource.
  • Fix access violation caused by zlib in x86 version.
HolyWu is offline   Reply With Quote
Old 11th January 2020, 15:26   #1150  |  Link
l33tmeatwad
Registered User
 
l33tmeatwad's Avatar
 
Join Date: Jun 2007
Posts: 295
Awesome, thanks for the speedy fix!
l33tmeatwad is offline   Reply With Quote
Old 11th January 2020, 16:32   #1151  |  Link
Taurus
Registered User
 
Taurus's Avatar
 
Join Date: Mar 2002
Location: Krautland
Posts: 903
Thank you!
Taurus is offline   Reply With Quote
Old 12th January 2020, 12:55   #1152  |  Link
outhud
Registered User
 
Join Date: Aug 2018
Posts: 9
I want to compile L-SMASH-Works for Vapoursynth on Linux. Which repository should I use for this? Are there compile instructions somewhere?
outhud is offline   Reply With Quote
Old 12th January 2020, 15:19   #1153  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 309
https://github.com/HolyWu/L-SMASH-Works/

Code:
git clone https://github.com/HolyWu/L-SMASH-Works
cd L-SMASH-Works/VapourSynth/
mkdir build
meson . build/
ninja -C build/
https://github.com/l-smash/l-smash is a dependency for the vapoursynth plugin, besides ffmpeg and vapoursynth itself.

Last edited by Are_; 12th January 2020 at 15:22.
Are_ is offline   Reply With Quote
Old 12th January 2020, 17:17   #1154  |  Link
outhud
Registered User
 
Join Date: Aug 2018
Posts: 9
Quote:
Originally Posted by Are_ View Post
https://github.com/HolyWu/L-SMASH-Works/

Code:
git clone https://github.com/HolyWu/L-SMASH-Works
cd L-SMASH-Works/VapourSynth/
mkdir build
meson . build/
ninja -C build/
https://github.com/l-smash/l-smash is a dependency for the vapoursynth plugin, besides ffmpeg and vapoursynth itself.
Thanks. I've installed ffmpeg, vapoursynth and l-smash. It seems ninja fails on the last step for L-SMASH-Works with:
Code:
 
/usr/bin/ld: /usr/local/lib/liblsmash.a(dts.o): relocation R_X86_64_PC32 against symbol 
`lsmash_remove_dts_reserved_box' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Last edited by outhud; 13th January 2020 at 15:43.
outhud is offline   Reply With Quote
Old 12th January 2020, 20:32   #1155  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 309
Try to recompile l-smash with
Code:
./configure --disable-static --enable-shared
Are_ is offline   Reply With Quote
Old 13th January 2020, 08:00   #1156  |  Link
outhud
Registered User
 
Join Date: Aug 2018
Posts: 9
Quote:
Originally Posted by Are_ View Post
Try to recompile l-smash with
Code:
./configure --disable-static --enable-shared
That did it! Thanks.
outhud is offline   Reply With Quote
Old 14th January 2020, 17:38   #1157  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,368
Lsmash seek /refresh issue with CPU decoding

Lsmash seek /refresh issue with CPU decoding

If you seek to frame 240, or 480, or 720 then push refresh, the frame jumps to frame 0

This was posted from another forum;
https://www.mediafire.com/file/pvojg...5719.m2ts/file


-Affects avspmod refresh, or vdub2 refresh, or vsedit refresh
-Affects x86/x64 , threads=1, avs/vpy versions, several different lsmash versions

-Decodes ok with ffms2

-Decodes ok with Lsmash decoder="h264_cuvid" (!) . But "wrong" framerate @ 59.94 . Correct frames without refresh bug. If you AssumeFPS(30000,1001), or repeat=true with selecteven() or selectodd(), it works work

-Only occurs on certain P-frames ; eg. if you go to frame 44 and refresh, it does not occur


Could it be related to frame doubling flag ? This from a Panasonic ZS7 / TZ10 that shoots 29.97p with frame doubling

Frame mode : Frame doubling

Problem still persists with repeat=true and selecteven() or selectodd()


Something to do with timecodes ? There is a discrepancy between VFR/CFR time reported by ffms2 ffinfo
poisondeathray is offline   Reply With Quote
Old 19th January 2020, 09:26   #1158  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 754
Quote:
Originally Posted by poisondeathray View Post
-Only occurs on certain P-frames
The problematic frames you mentioned are actually I-frames.

Quote:
Originally Posted by poisondeathray View Post
Could it be related to frame doubling flag ?
No. It has to do with the frame reordering buffer size in the decoder.
HolyWu is offline   Reply With Quote
Old 19th January 2020, 09:28   #1159  |  Link
HolyWu
Registered User
 
HolyWu's Avatar
 
Join Date: Aug 2006
Location: Taiwan
Posts: 754
https://github.com/HolyWu/L-SMASH-Wo...ks_20200118.7z
  • VideoSource: Fix missing frames in some H264 streams.
  • LWLibav: Change the default of 'repeat' to true.
  • LWLibav: Fix VP8 decoding issue with alt-ref frames.
HolyWu is offline   Reply With Quote
Old 19th January 2020, 13:50   #1160  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,896
Quote:
Originally Posted by HolyWu View Post
[URL]
LWLibav: Change the default of 'repeat' to true.
Thanks a lot for the update...

Still I think that changing the default for the "repeat" parameter from false to true is not such a good idea. I do not dispute that setting it to true makes sense, my concern is that this change breaks almost all of my LSMASH based scripts.

So far the source filter behavior for all my filters has been like this:

1. MPEG2Source (and all DG source filters) honor the pulldown flags by default.

2. FFMS2 and LSMASH do not honor the pulldown flags by default.

3. DirectShow based source filters also do not honor the pulldown flags, but without specifying the fps parameter they output 29.97 fps, but not by honoring the pulldown flags, but by inserting duplicate frames instead.


I would really appreciate if all the source filter authors could agree on using the same method for treating pulldown flags - once and for all...


Cheers
manolito
manolito 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 14:55.


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