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 20th September 2024, 04:42   #1  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 125
vspreview: Wrong Length in Time

I got a problem. When I entered a video in vspreview, it lasted for 18 minutes, but when I played it in a regular video player, it lasted for 23 minutes. How do I fix it do get the correct length of time?
jay123210599 is offline   Reply With Quote
Old 20th September 2024, 14:05   #2  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,462
1. try a different source filter
2. try (re-)muxing the video with mkvoolnix to mkv
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 21st September 2024, 04:17   #3  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 125
Quote:
Originally Posted by Selur View Post
1. try a different source filter
2. try (re-)muxing the video with mkvoolnix to mkv
1. I am currently using core.lsmas.LWLibavSource. What other sources should I use?
2. The video is already a mkv file.
jay123210599 is offline   Reply With Quote
Old 21st September 2024, 08:42   #4  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,462
Quote:
1. I am currently using core.lsmas.LWLibavSource. What other sources should I use?
FFMS2, BestSource depending on the content and your GPU DGSource.
Quote:
2. The video is already a mkv file.
Does not matter, unless you already used mkvtoolnix/mkvmerge to create the file.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 21st September 2024, 13:17   #5  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 125
Quote:
Originally Posted by Selur View Post
FFMS2, BestSource depending on the content and your GPU DGSource.

Does not matter, unless you already used mkvtoolnix/mkvmerge to create the file.

Cu Selur
Here's the information of my video. Which source should I use?

Code:
Format                                   : Matroska
Format version                           : Version 1
File size                                : 160 MiB
Duration                                 : 23 min 3 s
Overall bit rate                         : 973 kb/s
Frame rate                               : 23.976 FPS
Encoded date                             : 2008-10-08 17:28:25 UTC
Writing application                      : mkvmerge v2.2.0 ('Turn It On Again') built on Mar  4 2008 12:58:26
Writing library                          : libebml v0.7.7 + libmatroska v0.8.1

Video
ID                                       : 1
Format                                   : MPEG-4 Visual
Format profile                           : Advanced Simple@L5
Format settings                          : BVOP2
Format settings, BVOP                    : 2
Format settings, QPel                    : No
Format settings, GMC                     : No warppoints
Format settings, Matrix                  : Default (H.263)
Codec ID                                 : V_MS/VFW/FOURCC / XVID
Codec ID/Hint                            : XviD
Duration                                 : 23 min 3 s
Bit rate                                 : 634 kb/s
Width                                    : 640 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 4:3
Frame rate mode                          : Constant
Frame rate                               : 23.976 (23976/1000) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 0.086
Stream size                              : 105 MiB (65%)
Writing library                          : XviD 1.1.0 Beta1 (2005-01-16)
Language                                 : Japanese
Default                                  : Yes
Forced                                   : No
BPS                                      : 23.9762
jay123210599 is offline   Reply With Quote
Old 21st September 2024, 14:27   #6  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,462
Try both FFMS2 and BestSource.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 21st September 2024, 15:55   #7  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 125
Quote:
Originally Posted by Selur View Post
Try both FFMS2 and BestSource.
How do I try both at the same time with Vapoursynth?
jay123210599 is offline   Reply With Quote
Old 21st September 2024, 16:02   #8  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,468
Quote:
Originally Posted by jay123210599 View Post
How do I try both at the same time with Vapoursynth?
You try one at time . If the first one works ok, there is no need to try the other
poisondeathray is offline   Reply With Quote
Old 21st September 2024, 18:34   #9  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 125
Quote:
Originally Posted by poisondeathray View Post
You try one at time . If the first one works ok, there is no need to try the other
It said: AttributeError: There is no function named FFMS2. Same goes for Best Source.

clip = core.lsmas.FFMS2(path to video)
clip = core.lsmas.BestSource(path to video)

Last edited by jay123210599; 21st September 2024 at 20:21.
jay123210599 is offline   Reply With Quote
Old 21st September 2024, 23:59   #10  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,468
Quote:
Originally Posted by jay123210599 View Post
It said: AttributeError: There is no function named FFMS2. Same goes for Best Source.

clip = core.lsmas.FFMS2(path to video)
clip = core.lsmas.BestSource(path to video)
Load the plugins(s)

Either put ffms2.dll / BestSource.dll in the plugins64 directory to autoload, or load them in the script with core.std.LoadPlugin

http://www.vapoursynth.com/doc/funct...std.LoadPlugin
poisondeathray is offline   Reply With Quote
Old 22nd September 2024, 00:06   #11  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 125
Quote:
Originally Posted by poisondeathray View Post
Load the plugins(s)

Either put ffms2.dll / BestSource.dll in the plugins64 directory to autoload, or load them in the script with core.std.LoadPlugin

http://www.vapoursynth.com/doc/funct...std.LoadPlugin
There are already in the directory, now how do I autoload them? If not, how do I load them with my video?
jay123210599 is offline   Reply With Quote
Old 22nd September 2024, 00:51   #12  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,468
It should be

Code:
core.ffms2.Source
not "core.lsmas.FFMS2" ; lsmas is the namespace for L-Smash
poisondeathray is offline   Reply With Quote
Old 22nd September 2024, 00:51   #13  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 322
Quote:
Originally Posted by jay123210599 View Post
It said: AttributeError: There is no function named FFMS2. Same goes for Best Source.

clip = core.lsmas.FFMS2(path to video)
clip = core.lsmas.BestSource(path to video)
Those lines are wrong, you are either trying to use one of these.
Code:
core.ffms2.Source()
core.bs.VideoSource()
core.lsmas.LibavSMASHSource()
Are_ is offline   Reply With Quote
Old 22nd September 2024, 01:40   #14  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 125
@Are_ @poisondeathray @Selur Neither sources worked. I still haven't reach the full 23 minutes with the video. I also keep getting this:

"WARNING: Video Node 1: Had to assume these props which were unspecified or non-valid for preview <"_Matrix, _Primaries, _Transfer>"

Last edited by jay123210599; 22nd September 2024 at 01:45.
jay123210599 is offline   Reply With Quote
Old 22nd September 2024, 02:05   #15  |  Link
_Al_
Registered User
 
Join Date: May 2011
Posts: 346
That is vspreview warning most likely because like any other previewer, it has to change vs.VideoNode (your clip) into rgb. So if those values are not in props (they were not read from a source plugin) it has to guess and default. To default, understand, means it might be wrong. Like in your case, where resolution is 640x480, it might guess matrix as BT601. To get rid of this warning set manually in your scirpts those props:
clip = clip.std.SetFrameProps(_Matrix=6, _Primaries=6, _Transfer=6)
or if your video is BT709 then:
clip = clip.std.SetFrameProps(_Matrix=1, _Primaries=1, _Transfer=1)

Also a previewer might have a choice to set a delay between frames or hard code fps for preview, look for it if it is there.

Last edited by _Al_; 22nd September 2024 at 02:10.
_Al_ is offline   Reply With Quote
Old 22nd September 2024, 13:27   #16  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 125
Quote:
Originally Posted by _Al_ View Post
That is vspreview warning most likely because like any other previewer, it has to change vs.VideoNode (your clip) into rgb. So if those values are not in props (they were not read from a source plugin) it has to guess and default. To default, understand, means it might be wrong. Like in your case, where resolution is 640x480, it might guess matrix as BT601. To get rid of this warning set manually in your scirpts those props:
clip = clip.std.SetFrameProps(_Matrix=6, _Primaries=6, _Transfer=6)
or if your video is BT709 then:
clip = clip.std.SetFrameProps(_Matrix=1, _Primaries=1, _Transfer=1)

Also a previewer might have a choice to set a delay between frames or hard code fps for preview, look for it if it is there.
It got rid of the warning, but it still doesn't fix the length.
jay123210599 is offline   Reply With Quote
Old 22nd September 2024, 15:58   #17  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,462
Did you try to remux the file?
'mkvmerge v2.2.0 ('Turn It On Again') built on Mar 4 2008 12:58:26', maybe current source filters have some issues with how 'mkvmerge v2.2.0' muxed stuff back then.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 22nd September 2024, 18:56   #18  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,468
What does

Code:
clip = core.text.ClipInfo(clip)
say about the length (frame count), and fps ?
poisondeathray is offline   Reply With Quote
Old 26th September 2024, 13:53   #19  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 125
Quote:
Originally Posted by Selur View Post
Did you try to remux the file?
'mkvmerge v2.2.0 ('Turn It On Again') built on Mar 4 2008 12:58:26', maybe current source filters have some issues with how 'mkvmerge v2.2.0' muxed stuff back then.
How do I remux a mkv file?
jay123210599 is offline   Reply With Quote
Old 26th September 2024, 14:18   #20  |  Link
jay123210599
Registered User
 
Join Date: Apr 2024
Posts: 125
Quote:
Originally Posted by poisondeathray View Post
What does

Code:
clip = core.text.ClipInfo(clip)
say about the length (frame count), and fps ?
How do I use that for my vspreview script?
jay123210599 is offline   Reply With Quote
Reply

Tags
vapoursynth, video comparison, video player

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 13:38.


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