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 22nd March 2024, 18:28   #1  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,568
BestSource2 - The Bestest Source with Fast Seeking

Some of you tried and used the original BestSource. Some of you complained that it was slow or was missing RFF and CFR modes. All of this has been fixed. With hardware decoding support intact.

Run your seek tests. Do your worst. This should surpass all previously released source filters with only slightly slower indexing and marginally higher ram usage.


BestSource releases
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet

Last edited by Myrsloik; 3rd April 2024 at 18:43.
Myrsloik is online now   Reply With Quote
Old 8th April 2024, 20:24   #2  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,568
R2 RC2 released. Keep testing.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 10th April 2024, 19:38   #3  |  Link
amayra
Quality Checker
 
amayra's Avatar
 
Join Date: Aug 2013
Posts: 285
thanks for i find any issues do i report it here or in github ?
__________________
I love Doom9
amayra is offline   Reply With Quote
Old 10th April 2024, 19:49   #4  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,568
Github is preferred. If it's a specific avisynth issue wait for rc3 since lots of bugs were found there
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 11th April 2024, 11:07   #5  |  Link
rgr
Registered User
 
Join Date: Jun 2022
Posts: 56
So I'll wait for RC3 with my VFR file
rgr is offline   Reply With Quote
Old 17th April 2024, 09:32   #6  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,568
And we have a proper R2 release!
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 17th April 2024, 12:22   #7  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,596
First release with fast seeking. Works completely differently from R1 and is now mostly a drop-in replacement for FFMS2.

That's a bold statement
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 22nd April 2024, 08:45   #8  |  Link
flossy_cake
Registered User
 
Join Date: Aug 2016
Posts: 635
Thanks for this source filter, I'm always interested in having more source filters available in case a file doesn't play nice with another filter so it's much appreciated.

These are the source filters I've been using so far and I feel reasonably familiar with their performance and compatibility with the files I play for realtime screening with MPC-HC (mostly MPEG2 DVD remux files (mkv and vob), x264 and x265 with the usual audio formats like AC3, DTS, AAC, MP3, FLAC).
  • LWLibavVideoSource, LWLibavAudioSource (my "go to" option)
  • FFVideoSource, FFAudioSource (StvG's fork as it fixes an issue with rffmode in the official build)
  • Mpeg2Source (DG's MPEG2 filter, only compatible with .vob MPEG2's but does them very competently)
  • DGSource (DG's Nvidia GPU decoding filter, compatible with more codecs and containers eg. MPEG2 remuxed to mkv)

And now I add to that list BSVideoSource and BSAudioSource - we shall see whether it can outdo StvG's FFMS2 fork and possibly LWLibav!

Some issues...
  1. "BSVideoSource does not have a named argument variableformat"

  2. The cachepath argument forces this new behaviour of subdirectories based on the source folder structure. As I require full control over where my index files go and their names, please could we have an option to specify file path like FFMS2 and LWlibav, eg. cachepath="C:\MyVideos\MyCacheFiles\S01E01 Hello World.bsindex". Currently I can only specify a parent folder and then BS creates its own folder substructure inside that parent folder.

  3. With this test file (MPEG2 video remuxed from DVD, contains repeat field flags that must be obeyed so please set rff=true when testing) ...for some reason BS sets the frames to FieldBased (by this I mean clip.IsFieldBased==true as reported on info(), not to be confused with the frame property called "_FieldBased").

    This means filters like for example Bob() won't do anything at all cause Bob() only operates on framebased clips (where framebased means each frame is not an individual field, according to Avisynth's definition here).

    I thought this would be an easy workaround by just calling AssumeFrameBased() in Avisynth but that function also forces the field order to bottom field first (by this I mean clip.GetParity==false as reported on info()).

    So the workaround becomes a bit convoluted: (1) get the original correct field order using clip.GetParity(), (2) call AssumeFrameBased(), (3) restore the field order from step 1 using AssumeTFF/BFF().

    However the great news is that once the field order is set correctly, BSVideoSource appears to be capable of correctly processing repeat field flags! Whereas the official FFMS2 build does not, so great work there and I am very pleased with this

  4. With the same test file as above, with BSVideoSource(rff=true) and info() in Avisynth, I observe the Avisynth field order (clip.GetParity) is changing on a per-frame basis (starting around the 16 second mark) whereas all other source filters keep a static field order for all frames. I don't believe the field order should actually be set dynamically on a per-frame basis like that as it will only confuse downstream filters (even Bob obeys it and will produce more line-bobbing artefacts than normal).

    I don't think interlaced video is supposed to have field order changes, although I'm not sure if that's by design or merely convention. I've certainly seen files where the field order changed but that seemed due to trimming the file and corrupting some of the data. I've never actually seen a "clean" MPEG2 or AVC that contained a deliberate field order change mid-stream, but I could be wrong - maybe someone more knowledgeable could comment. In any case I think it would be safer to follow the behaviour used by LWLibav, FFMS2, Mpeg2Source and DGSource.

Last edited by flossy_cake; 22nd April 2024 at 09:21.
flossy_cake is offline   Reply With Quote
Old 22nd April 2024, 09:20   #9  |  Link
flossy_cake
Registered User
 
Join Date: Aug 2016
Posts: 635
Just to notify I have added 4 to the above list
flossy_cake is offline   Reply With Quote
Old 22nd April 2024, 09:26   #10  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,568
Quote:
Originally Posted by flossy_cake View Post
...
Some issues...
  1. "BSVideoSource does not have a named argument variableformat"

  2. The cachepath argument forces this new behaviour of subdirectories based on the source folder structure. As I require full control over where my index files go and their names, please could we have an option to specify file path like FFMS2 and LWlibav, eg. cachepath="C:\MyVideos\MyCacheFiles\S01E01 Hello World.bsindex". Currently I can only specify a parent folder and then BS creates its own folder substructure inside that parent folder.

  3. With this test file (MPEG2 video remuxed from DVD, contains repeat field flags that must be obeyed so please set rff=true when testing) ...for some reason BS sets the frames to FieldBased (by this I mean clip.IsFieldBased==true as reported on info(), not to be confused with the frame property called "_FieldBased").

    This means filters like for example Bob() won't do anything at all cause Bob() only operates on framebased clips (where framebased means each frame is not an individual field, according to Avisynth's definition here).

    I thought this would be an easy workaround by just calling AssumeFrameBased() in Avisynth but that function also forces the field order to bottom field first (by this I mean clip.GetParity==false as reported on info()).

    So the workaround becomes a bit convoluted: (1) get the original correct field order using clip.GetParity(), (2) call AssumeFrameBased(), (3) restore the field order from step 1 using AssumeTFF/BFF().

    However the great news is that once the field order is set correctly, BSVideoSource appears to be capable of correctly processing repeat field flags! Whereas the official FFMS2 build does not, so great work there and I am very pleased with this

  4. With the same test file as above, with BSVideoSource(rff=true) and info() in Avisynth, I observe the Avisynth field order (clip.GetParity) is changing on a per-frame basis (starting around the 16 second mark) whereas all other source filters keep a static field order for all frames. I don't believe the field order should actually be set dynamically on a per-frame basis like that as it will only confuse downstream filters (even Bob obeys it and will produce more line-bobbing artefacts than normal).

    I don't think interlaced video is supposed to have field order changes, although I'm not sure if that's by design or merely convention. I've certainly seen files where the field order changed but that seemed due to trimming the file and corrupting some of the data. I've never actually seen a "clean" MPEG2 or AVC that contained a deliberate field order change mid-stream, but I could be wrong - maybe someone more knowledgeable could comment. In any case I think it would be safer to follow the behaviour used by LWLibav, FFMS2, Mpeg2Source and DGSource.
1. Documentation error. Avisynth doesn't support changing frame dimensions and format in a clip.
2. It's the way it is. I'd rather not implement a gazillion path modes. If an angry mob boycotts the filter maybe I'll add some option.
3&4. I have no idea what the exact conventions are but you do get an interesting problem for clips with RFF since effectively the field order does change. What are the rules? Having things like this set per clip and not per frame is to me an absurdity.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 22nd April 2024, 09:44   #11  |  Link
flossy_cake
Registered User
 
Join Date: Aug 2016
Posts: 635
Quote:
Originally Posted by Myrsloik View Post
3&4. I have no idea what the exact conventions are but you do get an interesting problem for clips with RFF since effectively the field order does change. What are the rules? Having things like this set per clip and not per frame is to me an absurdity.
The thing is that none of the other source filters (LWLibav, FFMS2, Mpeg2Source, DGSource) result in changing field order per frame like that, so I know it's wrong.

You can read about how it's supposed to work here

In laymans terms: originally 24p film was stored on DVDs as 30i with 3:2 field cadence, then they realised it's a waste of bandwidth so instead just store 24p and put a bunch of "repeat me" flags for the DVD player to read and construct the 3:2 cadence at runtime. "Great, so I'll just ignore the flags and get the 24p which is what I wanted all along". Unfortunately it doesn't work like that - the flags need to be obeyed otherwise there are sync issues (this is what DG's special "forced film" mode tries to correct, but doesn't get it quite right in my experience).

BSVideoSource appears to obey the flags correctly which is great, so it correctly reconstructs the 30i from the 24p, but for some reason it's setting Avisynth internal parity (field order) of the resulting 30i frames to some dynamically changing value which I'm sure it shouldn't be doing since none of the other source filters do it, and it confuses downstream filters like Bob or any IVTC filters which is going to mess with its decision making regarding which field to weave with.

Last edited by flossy_cake; 22nd April 2024 at 10:17.
flossy_cake is offline   Reply With Quote
Old 22nd April 2024, 10:09   #12  |  Link
flossy_cake
Registered User
 
Join Date: Aug 2016
Posts: 635
If inside BSVideoSource you have access to what LWLibav or FFMpeg thinks the field order is, just set it to that, because those filters are trustworthy.

As for the "fieldbased" issue, I would just never set fieldbased to true inside BSVideoSource, because since when do you encounter a video file where each frame is a field? Never happens, never seen it. Fieldbased is a clip property that results from Avisynth processing, it's not a property of the source file. Fieldbased is an Avisynth concept, has nothing to do with the source file. Therefore the source filter should never set it to true.

Last edited by flossy_cake; 22nd April 2024 at 10:18.
flossy_cake is offline   Reply With Quote
Old 24th April 2024, 10:15   #13  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,942
R3 test

Like FFAudioSource BSAudioSource output 32 bit int with lossless sources 24 bit
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 24th April 2024, 10:25   #14  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,568
Quote:
Originally Posted by tebasuna51 View Post
R3 test

Like FFAudioSource BSAudioSource output 32 bit int with lossless sources 24 bit
I'll take another look at it then. FFmpeg likes to call it 32 bit and then if you're lucky the actually used number of bits is revealed.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 24th April 2024, 10:31   #15  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,568
Quote:
Originally Posted by tebasuna51 View Post
R3 test

Like FFAudioSource BSAudioSource output 32 bit int with lossless sources 24 bit
Speaking of that, there's no simple way to signal how many bits are actually used for audio in Avisynth? I mean you have some 20 bit formats as well.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 25th April 2024, 10:03   #16  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,568
R4 is out to please the avs+ users.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   Reply With Quote
Old 27th April 2024, 10:10   #17  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,942
Thanks, R4 output correctly 24 bit int lossless sources
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 27th April 2024, 11:16   #18  |  Link
18fps
Registered User
 
Join Date: Oct 2008
Posts: 56
Thank you! At last I can feed dpx into avisynth while keeping the full 10 bit!
18fps is offline   Reply With Quote
Old 11th May 2024, 20:16   #19  |  Link
Zarxrax
Registered User
 
Join Date: Dec 2001
Posts: 1,223
Using R4 in Avisynth+, I can not get audio to load. It will crash whatever application I am opening the script in. I have tried both BSSource and BSAudioSource with 5+ different files including different audio codecs.
Zarxrax is offline   Reply With Quote
Old 11th May 2024, 20:52   #20  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,568
Quote:
Originally Posted by Zarxrax View Post
Using R4 in Avisynth+, I can not get audio to load. It will crash whatever application I am opening the script in. I have tried both BSSource and BSAudioSource with 5+ different files including different audio codecs.
Avs+ version?
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is online now   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 11:25.


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