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. |
![]() |
#2641 | Link |
Registered User
Join Date: Aug 2016
Posts: 535
|
ScriptClip appears to return audio from the clip being iterated on instead of the clip returned by the expression
Code:
global withAudio = ColorBars().ConvertToYV12().Text("withAudio") global withoutAudio = ColorBars().ConvertToYV12().KillAudio().Text("withoutAudio") ScriptClip(withoutAudio, "return withAudio", after_frame=true, local=false) # the returned clip appears to be equivalent to AudioDub(withAudio, withoutAudio) |
![]() |
![]() |
![]() |
#2642 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,430
|
Quote:
ScriptClip doesn't do any audio processing, it only operates on the video track. |
|
![]() |
![]() |
![]() |
#2643 | Link |
Registered User
Join Date: Aug 2016
Posts: 535
|
If it's by design, then I would say it's not very good design as I noticed just now that it also sets the field parity of the returned clip to that of the one being iterated on.
Code:
last = ColorBars().ConvertToYV12().KillAudio() global tff = last.AssumeTFF().Text("TFF", align=9) global bff = last.AssumeBFF().Text("BFF", align=9) ScriptClip(tff, "return bff", after_frame=true, local=false) info() Last edited by flossy_cake; 6th September 2023 at 19:30. |
![]() |
![]() |
![]() |
#2644 | Link | |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,478
|
Quote:
|
|
![]() |
![]() |
![]() |
#2645 | Link | |
Registered User
Join Date: Aug 2016
Posts: 535
|
Quote:
I don't see the need to modify the audio or field order of the output clip. |
|
![]() |
![]() |
![]() |
#2646 | Link |
Registered User
Join Date: Aug 2016
Posts: 535
|
Also sorry if my comments about ScriptClip sound overly critical - I've been fighting with it the past few weeks and it's causing me a lot of headaches getting it to play nice with multithreading, avoiding memory leaks and my QTGMC output was broken due to this field order issue. Gavino's Grunt thread page 1 has some quotes from other members noting how quirky and strange the runtime environment is, so I know I'm not alone in this frustration.
|
![]() |
![]() |
![]() |
#2647 | Link | |
Registered User
Join Date: Aug 2016
Posts: 535
|
I'm just playing around with Avisynth's internal TimeStretch audio filter and was wondering about this:
Quote:
I was thinking... is it possible to somehow force a manual audio resync every n minutes, to nudge it back in sync? Could this be done in Aviysynth scripting or only within the TimeStretch plugin itself? |
|
![]() |
![]() |
![]() |
#2648 | Link | |
Moderator
![]() Join Date: Feb 2005
Location: Spain
Posts: 6,773
|
Quote:
The audio don't be never stretched, if it is not in sync with the video is a video fps problem. Play the video at fps it was filmed and the audio is always in sync. If you film the Usain Bolt 100 m WR (9.58 s) at 24 fps and play it at 25 fps you have a new WR of 9.2 s BTW if you want modify the real audio duration to fit the wrong video duration you can add some correction at your taste, there are audio editors.
__________________
BeHappy, AviSynth audio transcoder. |
|
![]() |
![]() |
![]() |
#2649 | Link | |
Registered User
Join Date: Aug 2016
Posts: 535
|
Quote:
Anyway, I'm not modifying the video fps at all. The TimeStretch function only processes audio, and I'm going to be modifying audio pitch while retaining audio length, and the wiki says audio length will be slightly off due to unavoidable rounding errors, and if the audio length is different then it's not going to be in sync with video. I tried to reproduce it by taking a 1hr clip and Loop(20).TimeStretch(pitch_n=24000, pitch_d=25025) to simulate pitch down of 4% and skipped to the end and audio was still in sync. But I don't think this simulates the issue - I'll probably have to leave the video running overnight and come back the next day and see if it's still in sync. If it isn't, then I had an idea: split the clip into say 3 hour chunks with Trim, and do the TimeStretch() on each individual clip before joining them back together with ++. But then maybe there will be a little audio glitch every 3 hours at the splice point. I think the optimal solution would be for TimeStretch to handle it internally and when it detects drift is > some value it should smooth over the resync point using its own timestretching algorithms. Last edited by flossy_cake; 19th September 2023 at 04:33. |
|
![]() |
![]() |
![]() |
#2650 | Link |
PgcEdit daemon
Join Date: Jul 2003
Posts: 7,468
|
It is usually assumed that an A/V difference of 100 ms or even more is not perceptible. So, unless you want absolutely to watch a 24 hours movie, you should not worry too much.
__________________
r0lZ PgcEdit homepage (hosted by VideoHelp) BD3D2MK3D A tool to convert 3D blu-rays to SBS, T&B or FS MKV |
![]() |
![]() |
![]() |
#2652 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,266
|
Quote:
|
|
![]() |
![]() |
![]() |
#2653 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,266
|
Quote:
I've raised an issue here in order to check it later: https://github.com/AviSynth/AviSynthPlus/issues/365 now it's "later", but I'm unable to see the error. I don't understand, becasue my code does contain a check against such plugins built with pre-V5 AVISYNTH_INTERFACE_VERSION. Maybe an Avisynth 2.5 plugin was accidentally built with AVISYNTH_INTERFACE_VERSION = 5 in its avisynth.h????) If you still get the error, please upload me somewhere the exact plugin binary you are using, thanks. |
|
![]() |
![]() |
![]() |
#2654 | Link | |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,727
|
No, looks like it was broken in some of the 3.7.3 test but eventually got fixed in the stable build:
![]() Sorry for not closing this https://github.com/AviSynth/AviSynthPlus/issues/365 I should have checked too, but I very rarely have time to do anything nowadays... ![]() I'm gonna comment it there too, thank you as always, Ferenc, the conditional to check the version of the plugins and apply the workaround is indeed working as expected ![]() Quote:
![]() Last edited by FranceBB; 13th October 2023 at 22:54. |
|
![]() |
![]() |
![]() |
#2655 | Link | |
Registered User
Join Date: Jul 2018
Posts: 414
|
Quote:
What version did you use? |
|
![]() |
![]() |
![]() |
#2656 | Link | ||
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,727
|
Quote:
I used v1.28.0 built on Wednesday 07 October 2020, 16.27.15 however even if I swap dither.dll 1.28.0 from October 2020 with the one you provided (which is the same as the one provided by Real Finder) that was built on Monday 17 July 2023, 08.33.18, I get the same result: ![]() Quote:
Ferenc also tried to reproduce it, but to no avail... ![]() The fact that you can also reproduce this, StvG, and not just real.finder, means that there's something really there. In the meantime, despite not being able to reproduce the issue (just like I can't reproduce it on my pc ![]() Testing on my computer would be pointless 'cause I can't reproduce the error anyway, so can you guys who can actually reproduce the error, test the new build and see if it solves it? |
||
![]() |
![]() |
![]() |
#2659 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,266
|
Quote:
|
|
![]() |
![]() |
![]() |
#2660 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,266
|
Try this one. Much safer, git commits are still not uploaded, I'd wait a bit.
Avisynth 3.7.3+ tests Avisynth+ 3.7.3post test 4 (20231019 - r4013) Code:
20231019 3.7.3 post 4 --------------------- - Fix #365 (https://github.com/AviSynth/AviSynthPlus/issues/365) Avisynth 2.5 plugins when NICE_FILTER would crash with "invalid response to CACHE_GETCHILD_AUDIO_MODE". Bug appeared since reintroducing audio cache in 3.7.3. - Fix #370: array size assert error in ConvertToYUY2 when internally ConvertTo422 is called. Reason: ConvertToYUV422 has one more parameter (ChromaOutPlacement) than ConvertToYUY2 has - Issues mentioned in #354 https://github.com/AviSynth/AviSynthPlus/issues/354 - Leave _ColorRange frame property as-is, when using matrix names "PC.709" or "PC.601", for example in ConvertToRGB32. Formerly _ColorRange property would always set to 0 (full range), even if a limited range clip (e.g. ColorBarsHD) was inputted. Now we act as the specification ( http://avisynth.nl/index.php/Convert ) says: "PC.601 and PC.709 keep the range unchanged, instead of converting between 0-255 RGB and 16-235 YUV, as is the normal practice." Now ColorBarsHD().ConvertToRGB32(matrix="PC.601").propShow() would display "_ColorRange=1 (limited)", since ColorbarsHD's output is limited as well. - Studio RGB (limited) range will now be recognized (through _ColorRange=1) and utilized in conversions from RGB, such as in GreyScale, ConvertToY, ConvertToYUVxxx. When input or output would require it, rgb offset of 16 (or scaled equivalents) is used for supporting limited range rgb (similar to Y offset=16 used at limited range YUV conversions) |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|