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

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th June 2020, 12:04   #3881  |  Link
DJATOM
Registered User
 
DJATOM's Avatar
 
Join Date: Sep 2010
Location: Ukraine, Bohuslav
Posts: 377
Btw audioSplice is kind of broken. I tried to figure it out and seems https://github.com/DJATOM/vapoursynt...dc0ba8c53cef49 fixes it, but at some conditions it now silently crashes. I'm busy with work now and can't debug deeper.
__________________
Me on GitHub
PC Specs: Ryzen 5950X, 64 GB RAM, RTX 2070
DJATOM is offline   Reply With Quote
Old 27th June 2020, 14:22   #3882  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by DJATOM View Post
Btw audioSplice is kind of broken. I tried to figure it out and seems https://github.com/DJATOM/vapoursynt...dc0ba8c53cef49 fixes it, but at some conditions it now silently crashes. I'm busy with work now and can't debug deeper.
Must only happen with specific combinations of clips merged. I need to know the exact format and length you made it crash with. You're right that reqStartOffset is set in the wrong place and I've fixed that.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 28th June 2020, 07:26   #3883  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
A little help requested

Quote:
Originally Posted by Myrsloik View Post
You can always use the audio releases if you don't mind the bugs and lack of testing. 100% compatibility with existing scripts is retained but it's simply a bit too untested and missing a few things too many for me to unleash it on the public.

At this point you should consider the master branch (normal releases) as the stable branch with mostly bugfixes. All major development happens in the doodle1 branch (audio support, major code cleanups and and a major api revision). I expect everyone to slowly migrate over time when they feel it's worth it.

It's now been almost 8 years since the first public release and some of the original mistakes and quirks definitely should be fixed.
I have developed some plugins for Vapoursynth back in 2014. There after I have been using avisynth+ upto 2017. Recently I got a push from a youngster to upgrade to latest versions. I completed for avisynth+ and want to utilize my free time during the present lock down by upgrading for vapoursynth. It appears a lot of changes happened since then. Request guidance as to which version I should start and link to get the new header files. Also I may try for your almost ready to release version.
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Old 28th June 2020, 18:29   #3884  |  Link
Pat357
Registered User
 
Join Date: Jun 2006
Posts: 452
VS-audio-test4 : w64 headers broken again.

It seems that the latest audio-enabled version from VS (VapourSynth64-Portable-R51-audio-test4) has broken adding -w or --w64 headers to the output.

Code:
vspipe -w myaudio.vpy - | ffplay -i pipe:
does work for the previous VapourSynth64-Portable-audio-test3 (song plays), but is broken again in test4 (invalid/corrupted input reported reported by ffplay).

Code:
vspipe --wav myaudio.vpy - | ffplay -i pipe:
plays both in test3 and test4.
So WAV header added by --wav still works ok with test4.

Also with test4 :
Code:
vspipe -w myaudio.vpy test.w64     (and)
vspipe --w64 myaudio.vpy test.w64
The resulting test.w64 can not be played by any w64 aware player like Foobar, MPV, VLC, FFplay : all players report an invalid/corrupted file.
These also work perfect with test3 : all above players played the resulting test.w64 perfectly

Last edited by Pat357; 28th June 2020 at 22:28.
Pat357 is offline   Reply With Quote
Old 28th June 2020, 23:51   #3885  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by vcmohan View Post
I have developed some plugins for Vapoursynth back in 2014. There after I have been using avisynth+ upto 2017. Recently I got a push from a youngster to upgrade to latest versions. I completed for avisynth+ and want to utilize my free time during the present lock down by upgrading for vapoursynth. It appears a lot of changes happened since then. Request guidance as to which version I should start and link to get the new header files. Also I may try for your almost ready to release version.
Not much has changed, really. The API is the same and no real changes have happened. The latest headers are included (select the SDK option in the installer). Always use the latest release.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 29th June 2020, 00:52   #3886  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
The length of the 'fmt' Subchunk is wrong and the Subchunk 'data' is not found, the same w64 with previous version:

Code:
ChunkID .....: riff                               ChunkID .....: riff
RiffLength ..:  13824128                          RiffLength ..:  13824128
Container ...:  wave                              Container ...:  wave
SubchunkID ..: fmt  (Length: 40)                  SubchunkID ..: fmt  (Length: 32)   <--------
AudioFormat .:  65534 (WAVE_FORMAT_EXTENSIBLE)    AudioFormat .:  65534 (WAVE_FORMAT_EXTENSIBLE)
NumChannels .:  6                                 NumChannels .:  6
SampleRate ..:  48000                             SampleRate ..:  48000
ByteRate ....:  1152000                           ByteRate ....:  1152000
BlockAlign ..:  24                                BlockAlign ..:  24
BitsPerSample:  32                                BitsPerSample:  32
ValidBitsPS .:  32                                ValidBitsPS .:  32
MaskChannels :  63 (FL FR FC LF BL BR)            MaskChannels :  63 (FL FR FC LF BL BR)
SubType .....:  3 (Float)                         SubType .....:  3 (Float)
SubchunkID ..: data (Length: 13824000)            SubchunkID ..: ?                   <--------
Offset data .:  128
Duration ....:  12 sec., (0h. 0m. 12s.)
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is online now   Reply With Quote
Old 29th June 2020, 19:04   #3887  |  Link
Pat357
Registered User
 
Join Date: Jun 2006
Posts: 452
@tebasuna51 : What tool did you use to retrieve the info you posted from an audio file ? Seems extremely useful with detailed output. Is it public available ?

It's a bit strange that the previous version you say also causes missing info in the w64 header, while om my system ffmpeg was able to play the files.
What version do you mean by the previous version ? Can you state the date stamps from for example Vspipe ?
The version that worked for me was VapourSynth64-Portable-R50-audio3 compiled on 16/06/2020.
I believe VapourSynth64-Portable-R50-audio3 has been updated without changing the filename or download location, so it could be that I have a different "previous" version than you...

Can you try if the following simple commands work on your previous version ?
Code:
vspipe -w myaudio.vpy - | ffplay -i pipe:
vspipe --w64 myaudio.vpy - | ffplay -i pipe:
myaudio.vpy is in fact just a 2-liner :
Code:
import vapoursynth as vs
from vapoursynth import core
a1 = core.bas.Source(r"d:\test\audio\samples\mp3\Mena1.mp3", track=-1)
a1.set_output()
All the above works for me when I use the 16/06/2020 version, but is broken in the newest test4 with compile date 27/06/2020.

Last edited by Pat357; 29th June 2020 at 19:31.
Pat357 is offline   Reply With Quote
Old 29th June 2020, 21:44   #3888  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by Pat357 View Post
@tebasuna51 : What tool did you use to retrieve the info you posted from an audio file ? Seems extremely useful with detailed output. Is it public available ?
Is a very old tool than I make long time ago.

Quote:
It's a bit strange that the previous version you say also causes missing info in the w64 header, while om my system ffmpeg was able to play the files.
Don't worry about old versions, the next one was the better.
In a previous version the headers are 'simple', corrects but without the channelmask info than offer the 'WAVE_FORMAT_EXTENSIBLE' headers.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is online now   Reply With Quote
Old 2nd July 2020, 13:48   #3889  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
RGB format

Quote:
Originally Posted by Myrsloik View Post
Not much has changed, really. The API is the same and no real changes have happened. The latest headers are included (select the SDK option in the installer). Always use the latest release.
In RGB packed samples supported by avisynth the left bottom corner is the 0,0 coordinate. In the RGB24 format of vapoursynth where is this 0,0 ? I am finding in one of my plugins it to be Left Top corner, but in another Left Bottom. My code must be wrong in one of the cases. Request clarify.
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Old 2nd July 2020, 13:54   #3890  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
vaporsynth plugins do not support packed formats, packed formats are only there for compatibility with avisynth plugins.
feisty2 is offline   Reply With Quote
Old 2nd July 2020, 14:12   #3891  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by vcmohan View Post
In RGB packed samples supported by avisynth the left bottom corner is the 0,0 coordinate. In the RGB24 format of vapoursynth where is this 0,0 ? I am finding in one of my plugins it to be Left Top corner, but in another Left Bottom. My code must be wrong in one of the cases. Request clarify.
In planar RGB 0,0 is always the top left corner, just like for YUV.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 4th July 2020, 04:33   #3892  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
how do I materialize a vpy script that outputs RGB30 using ffmpeg? I'd like to encode the vpy output to r210 (uncompressed 10bpc RGB) with ffmpeg and the y4m tool does not support RGB streams.
feisty2 is offline   Reply With Quote
Old 4th July 2020, 11:18   #3893  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
this works here:

ffmpeg -f vapoursynth -i aaa.vpy -c:v r210 aaa.mov
stax76 is offline   Reply With Quote
Old 4th July 2020, 13:08   #3894  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: void
Posts: 2,633
where can I find this ffmpeg with vaporsynth extension?
feisty2 is offline   Reply With Quote
Old 4th July 2020, 13:36   #3895  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
You can find it in the Apps dialog of staxrip, it provides web, help and download URLs, in many cases it shows a mediafire folder of Patman:

https://www.mediafire.com/folder/vkt.../StaxRip_Tools

Last edited by stax76; 4th July 2020 at 13:38.
stax76 is offline   Reply With Quote
Old 4th July 2020, 17:31   #3896  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Alternatively, vspipe supports rawvideo . (In ffmpeg, gbrp10le for RGB30)

eg
vspipe RGB30.vpy - | ffmpeg -f rawvideo -pix_fmt gbrp10le -r (framerate) -s (width)x(height) -i - -c:v r210 output_r210.mov
poisondeathray is offline   Reply With Quote
Old 4th July 2020, 19:46   #3897  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,752
Also you can set up the media-autobuild suite to compile ffmpeg for you, including all the codecs and features you need. Even combinations of licenses which may not be distributed in public.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 13th July 2020, 12:54   #3898  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
Input 2 clips and output one frame

I have as input 2 clips A and B. My output C has a copy of B as base on which some new pixels are drawn. I have following questions.
1. Can I specify (ret, B = ret,...) as input string when I want the A clip also be the base for my C. Should I test if they are same and set up a flag for ArInitial, or not required? Can I specify B to be opt and if not specified make it same as ret?
2. If I need to set up a flag then can the arInitial be
// Request the source frame on the first call

vsapi->requestFrameFilter(n, d->node[0], frameCtx);
if( clipsNotSame)
vsapi->requestFrameFilter(n, d->node[1], frameCtx);

Is such construct allowed? Or there is no need to have if statement?
3. In all frames ready section should I use
if(clipsNotSame){
bkg = vsapi->getFrameFilter(n, d->node[1], frameCtx);
i
VSFrameRef *dst = vsapi->copyFrame(bkg, core);
}
else
VSFrameRef *dst = vsapi->newVideoFrame(fi, width, height, src, core);
4. out of 2 methods getting new video frame and copying with bltbit ior using copyFrame, which is preferable?
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Old 13th July 2020, 14:07   #3899  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
Quote:
Originally Posted by vcmohan View Post
I have as input 2 clips A and B. My output C has a copy of B as base on which some new pixels are drawn. I have following questions.
1. Can I specify (ret, B = ret,...) as input string when I want the A clip also be the base for my C. Should I test if they are same and set up a flag for ArInitial, or not required? Can I specify B to be opt and if not specified make it same as ret?
2. If I need to set up a flag then can the arInitial be
// Request the source frame on the first call

vsapi->requestFrameFilter(n, d->node[0], frameCtx);
if( clipsNotSame)
vsapi->requestFrameFilter(n, d->node[1], frameCtx);

Is such construct allowed? Or there is no need to have if statement?
3. In all frames ready section should I use
if(clipsNotSame){
bkg = vsapi->getFrameFilter(n, d->node[1], frameCtx);
i
VSFrameRef *dst = vsapi->copyFrame(bkg, core);
}
else
VSFrameRef *dst = vsapi->newVideoFrame(fi, width, height, src, core);
4. out of 2 methods getting new video frame and copying with bltbit ior using copyFrame, which is preferable?

1. You mean that you have a function that takes two clips and want to see if they're identical? There's no way to compare clips for equality since the pointers are only a reference object and can (and most likely will) be different for the same clip. The most correct way to solve it is to mark the clip B argument as optional and only use clip A.
Code:
Argument list:
"clipa:clip;clipb:clip:opt;"
2. It's harmless to request the same frame from the same clip twice. If you know it's the same clip it's still slightly faster to avoid doing it tough.

3. Yes, that works.

4. copyFrame, it will always copy the minimal amount of data using an effective method if you're only going to modify a small portion of the frame.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 14th July 2020, 07:17   #3900  |  Link
vcmohan
Registered User
 
Join Date: Jul 2003
Location: India
Posts: 890
Thanks. Being a novice coder, I use with avisynth the ThrowError mssage having printf format for debugging. For vapoursynth for debugging in the areAllFramesReady section what messaging code should I use so that I can see some values on screen?
__________________
mohan
my plugins are now hosted here
vcmohan is offline   Reply With Quote
Reply

Tags
speed, vaporware, vapoursynth

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 10:35.


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