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. |
![]() |
#2361 | Link |
Registered User
Join Date: Jan 2018
Posts: 1,807
|
AviSynthPlus r3973
https://gitlab.com/uvz/AviSynthPlus-Builds |
![]() |
![]() |
![]() |
#2362 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,549
|
with yv411 source using LWLibavVideoSource or ffms2 both give _ChromaLocation = 2 and make avspmod, ConvertToRGB or ConvertToYV16 give error
![]()
__________________
See My Avisynth Stuff Last edited by real.finder; 28th March 2023 at 22:17. |
![]() |
![]() |
![]() |
#2363 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,239
|
Probably 0-"left" and 2-"topleft" (they are the same in other-than-4:2:0 formats) could be enabled? I think, this is how it is handled, but since there is no valid choice at 411, using any _Chromalocation hint was disabled until now.
|
![]() |
![]() |
![]() |
#2364 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,549
|
I think maybe it safe to make it if 411 then _Chromalocation could has 0-"left" or 2-"topleft"
__________________
See My Avisynth Stuff |
![]() |
![]() |
![]() |
#2365 | Link | |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,575
|
Avisynth 3.7.3 Beta 9, using the following script:
Quote:
Even AVSPmod mod really doesn't like length=0 in BlankClip(): ![]() Given that using BlankClip(length=1) produces 1 frame of black, namely frame 0: ![]() what is BlankClip(length=0) supposed to output? And why is it making FFMpeg go on forever and AVSPmod mod fail? I even tried with VirtualDub, it doesn't fail, and although the preview is bogus like this: ![]() it does produce a file which is 1 frame long (frame 0) of pure black when I play it back with MPC-HC: ![]() I reported the issue to the ffmpeg community, but the more I test the more I think that we (the Avisynth community) might be the one at fault here. I'm not sure. What do you think, guys? |
|
![]() |
![]() |
![]() |
#2367 | Link | |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,377
|
Quote:
The error is that length=0 is treated by BlankClip as somehow valid when it isn't, and ends up creating an audio stream of infinite length, which FFmpeg then attempts to read/output. Forcing an output length via the -t parameter would probably demonstrate that it is indeed attempting to write an ever-increasing number of audio samples, until the process is killed. |
|
![]() |
![]() |
![]() |
#2368 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,575
|
Gotcha.
So... what next? I think we should be throwing an error and display it correctly as an error if length=0 is passed to BlankClip() instead of failing silently. The good thing is that a new version of Avisynth is being worked on, so perhaps we can include this in 3.7.3 Beta 10 (or one of the next betas before the stable release)? Anyway, it's just a proposition as I've addressed it in the code at work last Sunday (yes, I rushed to work on Sunday when I saw the server crash eheheheheh). Anyway, as far as my use case is concerned, now if there's a clip of 0 frame, length is forced to 1 as one workaround in the AVS Script that my supply chain generates automatically (and I'll make sure to include the fix in the next public release of FFAStrans, if Steinar approves my pull request). ![]() I'll let the ffmpeg guy know as well and close the ticket there anyway, since this is not a bug on their end. ![]() |
![]() |
![]() |
![]() |
#2369 | Link | |
Registered User
Join Date: Oct 2018
Location: Germany
Posts: 891
|
Quote:
Edit: Avisynth should have returned an error here, but probably does not. Code:
self.src_frame = self.clip.get_frame(frame) if self.clip.get_error(): Error() return False
__________________
Live and let live Last edited by gispos; 5th April 2023 at 22:11. |
|
![]() |
![]() |
![]() |
#2371 | Link |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,377
|
To explain a bit further, I'm now not really sure if it was generating valid audio either, because if I tried to do
Code:
ffmpeg -i test.avs -vn -acodec copy output.wav Code:
Returns the number of samples of the audio of the clip (type: int). Be aware of possible overflow on very long clips (2^31 samples limit). |
![]() |
![]() |
![]() |
#2372 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,575
|
Thanks for the fix and the explanation, Stephen!
![]() (also thanks to Gispos for addressing it in AVSPmod mod; I didn't report it in the AVSPmod mod thread only 'cause I thought it should really be Avisynth throwing a proper error anyway, but thanks for addressing it for older version of AVS too in AVSPmod mod ![]() |
![]() |
![]() |
![]() |
#2373 | Link | |
Registered User
Join Date: Oct 2018
Location: Germany
Posts: 891
|
Quote:
![]() https://drive.google.com/drive/folde...usp=share_link
__________________
Live and let live |
|
![]() |
![]() |
![]() |
#2375 | Link | |
Registered User
Join Date: Oct 2018
Location: Germany
Posts: 891
|
Quote:
But it will probably change when avisynth gives an error on BlankClip(0). Then there is nothing I can do about it.
__________________
Live and let live |
|
![]() |
![]() |
![]() |
#2376 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,575
|
It's fine, it's fine, thanks
![]() Yeah and rightly so. I would rather get a proper error than a memory leak in FFMpeg that takes my whole farm of several servers down and makes me rush back to the office after getting an incident on Spark and a phone call on a Sunday! XD |
![]() |
![]() |
![]() |
#2377 | Link | |
Registered User
Join Date: Oct 2018
Location: Germany
Posts: 891
|
Quote:
At the second look I recognized it now... The script was only meant as an example... Sometimes it takes longer... ![]()
__________________
Live and let live |
|
![]() |
![]() |
![]() |
#2378 | Link |
Registered User
Join Date: Jul 2018
Posts: 880
|
Some syntax request for some resizers:
Currently AVS resampling engine also used as convolution filter with resizer's kernel for non-resizing processing. So it required not very nice hacky way of forcing processing using non-zero src_left and/or src_top small float value. Also non-zero non-required shift may more degrade output. So 2 ideas: 1. Add more param to resizers like force_processing (fp) = 0 (default - no), 1,2,3 (H, V, H+V), or horfp=false/true and verfp=false/true. 2. Add naming aliases with H(V) ending - like standard GaussResize and GaussResizeH/GaussResizeV/GaussResizeHV (conditionless forced H, V or HV processing). It looks like shortest way of script typing. Mostly needed for resizers with user-adjustable kernel (taps or p or b,c params). May be other ideas exist how to force resizer processing if width and height not changed ? Last edited by DTL; 8th April 2023 at 22:26. |
![]() |
![]() |
![]() |
#2379 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,239
|
Quote:
Then I can finally have a look at DTL's (old and new) resizer related things. |
|
![]() |
![]() |
![]() |
#2380 | Link |
Registered User
Join Date: Jan 2018
Posts: 1,807
|
AviSynthPlus r3982
https://gitlab.com/uvz/AviSynthPlus-Builds |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|