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 10th September 2019, 19:39   #3521  |  Link
Jukus
Registered User
 
Join Date: Jul 2019
Location: Russia
Posts: 87
Quote:
Originally Posted by jackoneill View Post
There is some documentation: http://www.vapoursynth.com/doc/
Thank you, I know. But I'm interested, for example, the sequence of applications of filters, I think it is not always obvious. Changing the brightness and color need before QTGMC or after, maybe there is no difference? And other nuances of video processing that I don't know about.
Jukus is offline   Reply With Quote
Old 10th September 2019, 23:18   #3522  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 894
That sounds a bit more than a guide, but more of lesson(s) (of being an encoder).

QTGMC is a deinterlacer so it always comes at early stage (probably after delogo, but that depends also.)

And to us, we never change brightness and color of a mastered work (e.g. when backing up bluray discs). But if it's your own recording, things can be a lot different.
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median
MeteorRain is offline   Reply With Quote
Old 12th September 2019, 04:09   #3523  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
I've been studying some tutorials at realpython.com and noticed the tutorial and vs code format code like so:

Code:
def foo(a=1, b=1):

foo(a=1, b=1)
In staxrip there is much avs/vs code that use spaces:

Code:
def foo(a = 1, b = 1):

foo(a = 1, b = 1)
What is more common? Is both OK or is one officially discouraged and what about AviSynth?
stax76 is offline   Reply With Quote
Old 12th September 2019, 08:29   #3524  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
This looks like the official style guide https://www.python.org/dev/peps/pep-0008/

Seems like def foo(a=1, b=1, ...) is recommended.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 12th September 2019, 08:51   #3525  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,554
Quote:
Originally Posted by stax76 View Post
I've been studying some tutorials at realpython.com and noticed the tutorial and vs code format code like so:

Code:
def foo(a=1, b=1):

foo(a=1, b=1)
In staxrip there is much avs/vs code that use spaces:

Code:
def foo(a = 1, b = 1):

foo(a = 1, b = 1)
What is more common? Is both OK or is one officially discouraged and what about AviSynth?
Use whatever you like as long as you're consistent.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 13th September 2019, 15:58   #3526  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 478
Gonna post this here as I don't think it deserves it's own thread, but what happen to Stephen R. Savage's post about his optimized MVTools?
aegisofrime is offline   Reply With Quote
Old 13th September 2019, 16:16   #3527  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,554
Quote:
Originally Posted by aegisofrime View Post
Gonna post this here as I don't think it deserves it's own thread, but what happen to Stephen R. Savage's post about his optimized MVTools?
It got merged into normal mvtools and will be in the next release.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 18th September 2019, 13:20   #3528  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Does get_read_array() return only "video data" without "meta data or something"?

I was comparing different source filters (ffms2, d2vsource, lsmash, dgdecnv) and noticed something strange with VOB files. I save every hash in a list. If the video file passes the "seek-test" the hashes of every source filters should the same. This was the case with many files.
But for vob files the hashes differ with every source filter. Is there something special with VOB files? I mean they can only be decoded in "one correct" way, right? They look all ok in vsedit...

example log
Code:
Seek linear order (hash, PicType, n-Frame)
d653d648d8e6407e507c6eaa0116ebe5 I 0
30ad6c41b89dfd8880a12bde6952e7b2 B 1
5e0cb8bad4ba2ec37b4f4db0d4a65691 P 2
...
Code:
#from seek-test.py
def hash_frame(frame):
    md5 = hashlib.md5()
    for plane in range(frame.format.num_planes):
        for line in frame.get_read_array(plane):
            md5.update(line)
    return md5.hexdigest()
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 18th September 2019, 13:47   #3529  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,554
Quote:
Originally Posted by ChaosKing View Post
Does get_read_array() return only "video data" without "meta data or something"?

I was comparing different source filters (ffms2, d2vsource, lsmash, dgdecnv) and noticed something strange with VOB files. I save every hash in a list. If the video file passes the "seek-test" the hashes of every source filters should the same. This was the case with many files.
But for vob files the hashes differ with every source filter. Is there something special with VOB files? I mean they can only be decoded in "one correct" way, right? They look all ok in vsedit...

example log
Code:
Seek linear order (hash, PicType, n-Frame)
d653d648d8e6407e507c6eaa0116ebe5 I 0
30ad6c41b89dfd8880a12bde6952e7b2 B 1
5e0cb8bad4ba2ec37b4f4db0d4a65691 P 2
...
Code:
#from seek-test.py
def hash_frame(frame):
    md5 = hashlib.md5()
    for plane in range(frame.format.num_planes):
        for line in frame.get_read_array(plane):
            md5.update(line)
    return md5.hexdigest()
It's not strange at all. It wasn't until h.264 the standard required (or even specified for that matter) how the DCT transforms should be done in a bit exact manner.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 18th September 2019, 13:54   #3530  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Quote:
Originally Posted by Myrsloik View Post
It's not strange at all. It wasn't until h.264 the standard required (or even specified for that matter) how the DCT transforms should be done in a bit exact manner.
Aha, ok good to know.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 18th September 2019, 14:17   #3531  |  Link
Jukus
Registered User
 
Join Date: Jul 2019
Location: Russia
Posts: 87
What is the difference between ffms2 and lsmas?
I already realized that for mpeg 2 need to use only d2v.
Jukus is offline   Reply With Quote
Old 18th September 2019, 15:31   #3532  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Quote:
Originally Posted by Jukus View Post
What is the difference between ffms2 and lsmas?
I already realized that for mpeg 2 need to use only d2v.
Both are based on ffmpeg. In addition lsmash has GPU support and can open MP4, MOV, ISO Base Media without creating an extra index.
From experience I would say lsmash is more often frame accurate then ffms2.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 18th September 2019, 22:13   #3533  |  Link
Jukus
Registered User
 
Join Date: Jul 2019
Location: Russia
Posts: 87
How to specify the path to create the index file for ffms2 and lsmas? That is, if I mount the ISO, then I can not write anything in the same directory.

Last edited by Jukus; 18th September 2019 at 22:21.
Jukus is offline   Reply With Quote
Old 18th September 2019, 22:43   #3534  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Quote:
Originally Posted by Jukus View Post
How to specify the path to create the index file for ffms2 and lsmas? That is, if I mount the ISO, then I can not write anything in the same directory.
It's all explained in the readme https://github.com/FFMS/ffms2/blob/m...ynth.md#source

ffms2.Source("video.mp4", cachefile="video.mp4.ffindex")

I think lsmash does not support a custom cache file path.

EDIT
Seems to be supported https://github.com/HolyWu/L-SMASH-Wo...er/VapourSynth
Code:
cachefile (default : source + ".lwi")
                    The filename of the index file (where the indexing data is saved).
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 19th September 2019, 19:36   #3535  |  Link
Jukus
Registered User
 
Join Date: Jul 2019
Location: Russia
Posts: 87
@ChaosKing
Unfortunately, it’s still not clear how this should work, can a specific example be provided?
Jukus is offline   Reply With Quote
Old 19th September 2019, 19:41   #3536  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Quote:
Originally Posted by Jukus View Post
@ChaosKing
Unfortunately, it’s still not clear how this should work, can a specific example be provided?
Code:
import vapoursynth as vs
core = vs.core
clip = core.lsmas.LWLibavSource(source=r"D:\video.mkv", cachefile=r"C:\folderxy\myCacheFile.iwi")
clip.set_output()
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 19th September 2019, 19:47   #3537  |  Link
Jukus
Registered User
 
Join Date: Jul 2019
Location: Russia
Posts: 87
@ChaosKing
Quote:
vapoursynth.Error: LWLibavSource: Function does not take argument(s) named cachefile
Jukus is offline   Reply With Quote
Old 19th September 2019, 19:56   #3538  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Quote:
Originally Posted by Jukus View Post
@ChaosKing
Use this version https://github.com/HolyWu/L-SMASH-Works/releases
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 19th September 2019, 20:19   #3539  |  Link
Jukus
Registered User
 
Join Date: Jul 2019
Location: Russia
Posts: 87
Quote:
Originally Posted by ChaosKing View Post
Ok, thanks. But is it possible to make an index without Vapour, as it is done for d2v?
Jukus is offline   Reply With Quote
Old 19th September 2019, 20:29   #3540  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
Quote:
Originally Posted by Jukus View Post
Ok, thanks. But is it possible to make an index without Vapour, as it is done for d2v?
Only ffms2 has an indexer: ffmsindex.exe
Latest version: https://forum.doom9.org/showthread.p...05#post1883905
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing 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 14:25.


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