forked from sometimes-archives-things/archived-things
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSource-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS.html
More file actions
executable file
·501 lines (476 loc) · 36.3 KB
/
Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS.html
File metadata and controls
executable file
·501 lines (476 loc) · 36.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
<!DOCTYPE html>
<!-- saved from url=(0069)https://passthepopcorn.me/forums.php?action=viewthread&threadid=31622 -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1;IE=edge">
<meta name="referrer" content="no-referrer">
<meta name="referrer" content="same-origin">
<meta name="robots" content="noindex">
<title>Source vs. Encode with VapourSynth natively under Linux or macOS :: PassThePopcorn</title>
<link rel="shortcut icon" href="https://ptp.me/favicon.ico">
<link rel="apple-touch-icon" href="https://ptp.me/static/common/touch-icon-iphone.png?v=1514440441">
<link rel="apple-touch-icon" sizes="72x72" href="https://ptp.me/static/common/touch-icon-ipad.png?v=1514440441">
<link rel="apple-touch-icon" sizes="114x114" href="https://ptp.me/static/common/touch-icon-iphone-retina.png?v=1514440441">
<link rel="search" type="application/opensearchdescription+xml" title="PassThePopcorn" href="https://ptp.me/static/opensearch.xml">
<link href="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/marcel.css" rel="stylesheet" type="text/css" media="screen">
<script src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/script_start.js.download" type="text/javascript"></script>
<script src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/class_ajax.js.download" type="text/javascript"></script>
<script src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/global.js.download" type="text/javascript"></script>
<script src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/jquery.js.download" type="text/javascript"></script>
<script src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/autocomplete.js.download" type="text/javascript"></script>
<script src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/comments.js.download" type="text/javascript"></script>
<script src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/subscriptions.js.download" type="text/javascript"></script>
<script src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/bbcode.js.download" type="text/javascript"></script>
<script src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/mousetrap.min.js.download" type="text/javascript"></script>
<script src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/jquery.rangyinputs.js.download" type="text/javascript"></script>
<script src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/jquery.qtip.min.js.download" type="text/javascript"></script>
<script src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/jquery.simplemodal.1.4.4.min.js.download" type="text/javascript"></script>
</head>
<body id="forums" data-anticsrftoken="9001" style="">
<div id="wrapper">
<div id="header" class="header">
<div class="site-logo"><a class="site-logo__link" href="https://ptp.me/index.php"></a></div>
<div class="main-menu">
<ul class="main-menu__list">
<li class="main-menu__item" id="nav_index"><a class="main-menu__link" href="https://ptp.me/index.php">Home</a></li>
<li class="main-menu__item" id="nav_torrents"><a class="main-menu__link" href="https://ptp.me/torrents.php">Movies</a></li>
<li class="main-menu__item" id="nav_collages"><a class="main-menu__link" href="https://ptp.me/collages.php">Collections</a></li>
<li class="main-menu__item" id="nav_requests"><a class="main-menu__link" href="https://ptp.me/requests.php">Requests</a></li>
<li class="main-menu__item" id="nav_forums"><a class="main-menu__link" href="https://ptp.me/forums.php">Forums</a></li>
<li class="main-menu__item" id="nav_irc"><a class="main-menu__link" href="https://ptp.me/wiki.php?action=article&id=95">Chat</a></li>
<li class="main-menu__item" id="nav_top10"><a class="main-menu__link" href="https://ptp.me/top10.php">Top 10</a></li>
<li class="main-menu__item" id="nav_rules"><a class="main-menu__link" href="https://ptp.me/rules.php">Rules</a></li>
<li class="main-menu__item" id="nav_wiki"><a class="main-menu__link" href="https://ptp.me/wiki.php">Wiki</a></li>
<li class="main-menu__item" id="nav_staff"><a class="main-menu__link" href="https://ptp.me/staff.php">Staff</a></li>
</ul>
</div>
<div class="search-bar">
<ul class="search-bar__list">
<li id="searchbar_torrents" class="search-bar__search-field">
<form action="https://passthepopcorn.me/torrents.php" method="get" class="search-bar__search-field__form">
<input type="hidden" name="order_by" value="relevance">
<input id="torrentssearch" class="search-bar__search-field__input" onkeyup="autocomp.keyup(event);" onkeydown="autocomp.keydown(event);" accesskey="m" spellcheck="false" autocomplete="off" onfocus="autocomp.start('torrents');" onblur="" placeholder="Movies" type="text" name="searchstr" size="17">
<ul id="torrentscomplete" class="search-bar__results hidden"></ul>
</form>
</li>
<li id="searchbar_people" class="search-bar__search-field">
<form action="https://passthepopcorn.me/artist.php" method="get" class="search-bar__search-field__form">
<input id="artistsearch" class="search-bar__search-field__input" onkeyup="autocomp.keyup(event);" onkeydown="autocomp.keydown(event);" accesskey="p" spellcheck="false" autocomplete="off" onfocus="autocomp.start('artist');" placeholder="People" type="text" name="artistname" size="17">
<ul id="artistcomplete" class="search-bar__results hidden"></ul>
</form>
</li>
<li id="searchbar_collections" class="search-bar__search-field">
<form action="https://passthepopcorn.me/collages.php" method="get" class="search-bar__search-field__form">
<input class="search-bar__search-field__input" accesskey="c" spellcheck="false" id="collectionsearch" placeholder="Collections" type="text" name="search" size="17">
</form>
</li>
<li id="searchbar_requests" class="search-bar__search-field">
<form action="https://passthepopcorn.me/requests.php" method="get" class="search-bar__search-field__form">
<input class="search-bar__search-field__input" accesskey="r" spellcheck="false" placeholder="Requests" type="text" name="search" size="17">
</form>
</li>
<li id="searchbar_forums" class="search-bar__search-field">
<form action="https://passthepopcorn.me/forums.php" method="get" class="search-bar__search-field__form">
<input value="search" type="hidden" name="action">
<input class="search-bar__search-field__input" accesskey="f" spellcheck="false" placeholder="Forums" type="text" name="search" size="17">
</form>
</li>
<li id="searchbar_log" class="search-bar__search-field">
<form action="https://passthepopcorn.me/log.php" method="get" class="search-bar__search-field__form">
<input class="search-bar__search-field__input" accesskey="l" spellcheck="false" placeholder="Log" type="text" name="search" size="17">
</form>
</li>
<li id="searchbar_users" class="search-bar__search-field">
<form action="https://passthepopcorn.me/user.php" method="get" class="search-bar__search-field__form">
<input type="hidden" name="action" value="search">
<input class="search-bar__search-field__input" accesskey="u" spellcheck="false" placeholder="Users" type="text" name="search" size="17">
</form>
</li>
</ul>
</div>
</div>
<div id="content" class="page__main-content">
<script type="text/javascript">var ThreadID='31622';</script>
<div class="thin">
<h2 class="page__title">
<a href="https://ptp.me/forums.php">Forums</a> >
<a href="https://ptp.me/forums.php?action=viewforum&forumid=43">Encoding</a> >
Source vs. Encode with VapourSynth natively under Linux or macOS </h2>
<div class="linkbox">
<a class="linkbox__link" href="https://ptp.me/reports.php?action=report&type=thread&id=31622">[Report Thread]</a>
<a class="linkbox__link" href="https://ptp.me/forums.php?action=viewthread&threadid=31622#" onclick="SubscribeToForumTopic( this, 31622 ); return false;">[Subscribe]</a>
<a class="linkbox__link" href="https://ptp.me/forums.php?action=viewthread&threadid=31622#" onclick="ToggleSearchThreadForm( this ); return false;">[Search this Thread]</a>
</div>
<div id="searchthread" class="hidden" style="text-align: center;">
<div class="panel" style="display: inline-block; text-align: left;">
<div class="panel__body">
<form action="https://passthepopcorn.me/forums.php" method="get">
<input type="hidden" name="action" value="search">
<input type="hidden" name="threadid" value="31622">
<div class="form__group">
<input type="text" id="searchbox" name="search" size="70" placeholder="Post" class="form__input">
</div>
<div class="form__group">
<input type="text" id="username" name="user" size="70" placeholder="Username" class="form__input">
</div>
<div class="form__group">
<input type="submit" name="submit" value="Search this thread" class="form__input">
</div>
</form>
</div>
</div>
</div>
<div class="pagination pagination--top"></div>
<div class="forum_post forum-post forum-post--unread" id="post1363964">
<div class="forum-post__heading">
<span style="float:left;"><a class="forum-post__id" href="https://ptp.me/forums.php?action=viewthread&threadid=31622&postid=1363964#post1363964">#1363964</a>
by <strong><a class="username username--power-user" href="https://ptp.me/user.php?id=94358">BigMittens</a><a href="https://ptp.me/user.php?action=awards&id=94358"><img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/Rank2.png" class="award" title="Rank 2: 46 Awards"></a> (Power User)</strong>
<span class="user_title"> </span>
<span class="time" title="Jun 13 2017, 05:20">[ Jun 13 2017, 05:20 ]</span> - <a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#quickpost" onclick="Quote( '1363964', 'BigMittens' );">[Quote]</a>
</span>
<span id="bar1363964" style="float:right;">
<a href="https://ptp.me/reports.php?action=report&type=post&id=1363964">[Report Post]</a>
<a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#">↑</a>
</span>
</div>
<div class="forum-post__avatar-and-body">
<div class="forum-post__avatar"> <img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/rn651w.jpg" class="forum-post__avatar__image" alt="BigMittens's avatar" width="307" height="400">
</div> <div class="forum-post__body">
<div class="forum-post__bodyguard" id="content1363964">
Just finished with a quick script for Source vs. Encode screenshots using VapourSynth.<br>
<br>
Most of this comes from <a href="https://ptp.me/forums.php?action=viewthread&threadid=20556&postid=1112134#post1112134">keyfan from his guide</a>, so you may want to use his post as a reference for some of the things not mentioned here. I've added some minor changes to use the subtitle filter rather than the bitmap text filter and I'm reposting this because the old thread has pruned. Using the subtitle filter this should give you nearly identical results to AviSynth + AvsPmod.<br>
<br>
First, install vapoursynth and (optionally) vapoursynth-editor. Depending on your distribution or OS this may involve adding repositories or compiling from source.<br>
<br>
Then save this as a vapoursynth script:<br>
<pre class="preformatted-text--scrolled">import vapoursynth as vs<br>
import functools<br>
<br>
core = vs.get_core()<br>
<br>
# frame number and picture type<br>
def frameInfo(n, clip):<br>
clip = core.sub.Subtitle(clip, "Frame Number: " + str(n) + " of " + str(clip.num_frames)<br>
+ "\nPicture Type: " + clip.get_frame(n).props._PictType.decode())<br>
return clip<br>
<br>
source = core.ffms2.Source('path/to/source')<br>
# crop to match encode<br>
source = core.std.CropRel(source, LEFT, RIGHT, TOP, BOTTOM)<br>
# source text<br>
source = core.sub.Subtitle(source, text=[' \n \n Source'])<br>
# trim source to match encode if needed<br>
#source = core.std.Trim(source, first=FIRST, last=(encode.num_frames - 1))<br>
<br>
encode = core.ffms2.Source('path/to/encode')<br>
# encode text<br>
encode = core.sub.Subtitle(encode, text=[' \n \nEncode'])<br>
# fixes "unrecognized color primaries" errors in vsedit<br>
#encode = core.resize.Spline16(encode, matrix_in_s="709", primaries_in_s="709")<br>
<br>
# interleave source/encode<br>
res = core.std.Interleave([encode, source])<br>
# adds info to each frame<br>
res = core.std.FrameEval(res, functools.partial(frameInfo, clip=res))<br>
# for anamorphic resize (not necessarily needed for anamorphic clips)<br>
#par = source.get_frame(0).props._SARNum / source.get_frame(0).props._SARDen <br>
#res = core.resize.Spline36(res, int(res.width * par / 2) * 2, res.height)<br>
<br>
res.set_output()</pre><br>
Simply edit in the paths + crop values + optional filters, and remove comments for what you need if you're having problems. Then use the script with vsedit or vspipe, and the screenshots will end up looking like this:<br>
<strong>Source, Encode</strong>: <a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#" onclick="BBCode.ScreenshotComparisonToggleShow( this, ["Source"," Encode"], ["https:\/\/ptpimg.me\/52y7xo.png","https:\/\/ptpimg.me\/8ueq95.png"] ); return false;">Show comparison</a><br>
<br>
If this is too brief, there are many things in keyfan's post above that I didn't mention and go into greater detail. The <a rel="noreferrer" target="_blank" href="http://www.vapoursynth.com/doc/">VapourSynth documentation</a> will also be helpful as a reference. <div class="forum-post__edited">
Last edited by
<a class="username" href="https://ptp.me/user.php?id=94358">BigMittens</a> <span class="time" title="Mar 10 2018, 21:53">[ Mar 10 2018, 21:53 ]</span> </div>
</div>
</div>
</div>
</div>
<div class="forum_post forum-post forum-post--unread" id="post1364003">
<div class="forum-post__heading">
<span style="float:left;"><a class="forum-post__id" href="https://ptp.me/forums.php?action=viewthread&threadid=31622&postid=1364003#post1364003">#1364003</a>
by <strong><a class="username username--torrent-master" href="https://ptp.me/user.php?id=72201">Exemplu</a><a href="https://ptp.me/user.php?action=awards&id=72201"><img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/Rank4.png" class="award" title="Rank 4: 73 Awards"></a> (Torrent Master)</strong>
<span class="user_title"> </span>
<span class="time" title="Jun 13 2017, 08:48">[ Jun 13 2017, 08:48 ]</span> - <a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#quickpost" onclick="Quote( '1364003', 'Exemplu' );">[Quote]</a>
</span>
<span id="bar1364003" style="float:right;">
<a href="https://ptp.me/reports.php?action=report&type=post&id=1364003">[Report Post]</a>
<a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#">↑</a>
</span>
</div>
<div class="forum-post__avatar-and-body">
<div class="forum-post__avatar"> <img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/xt8824.png" class="forum-post__avatar__image" alt="Exemplu's avatar" width="309" height="400">
</div> <div class="forum-post__body">
<div class="forum-post__bodyguard" id="content1364003">
Thank you for this tutorial <img border="0" src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/smile.gif" alt=""> </div>
</div>
</div>
</div>
<div class="forum_post forum-post forum-post--unread" id="post1364277">
<div class="forum-post__heading">
<span style="float:left;"><a class="forum-post__id" href="https://ptp.me/forums.php?action=viewthread&threadid=31622&postid=1364277#post1364277">#1364277</a>
by <strong><a class="username username--power-user" href="https://ptp.me/user.php?id=94358">BigMittens</a><a href="https://ptp.me/user.php?action=awards&id=94358"><img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/Rank2.png" class="award" title="Rank 2: 46 Awards"></a> (Power User)</strong>
<span class="user_title"> </span>
<span class="time" title="Jun 13 2017, 23:27">[ Jun 13 2017, 23:27 ]</span> - <a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#quickpost" onclick="Quote( '1364277', 'BigMittens' );">[Quote]</a>
</span>
<span id="bar1364277" style="float:right;">
<a href="https://ptp.me/reports.php?action=report&type=post&id=1364277">[Report Post]</a>
<a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#">↑</a>
</span>
</div>
<div class="forum-post__avatar-and-body">
<div class="forum-post__avatar"> <img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/rn651w.jpg" class="forum-post__avatar__image" alt="BigMittens's avatar" width="307" height="400">
</div> <div class="forum-post__body">
<div class="forum-post__bodyguard" id="content1364277">
<strong>Exemplu wrote:</strong> <a rel="nofollow" href="https://ptp.me/forums.php?action=viewthread&threadid=31622&postid=1364003#post1364003"><img class="view_post" alt="View Post" src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/viewpost-right.png" style="width:12px; height:10px; vertical-align: middle" title="View Post"></a><blockquote>Thank you for this tutorial <img border="0" src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/smile.gif" alt=""></blockquote><br>
Hope it helps. </div>
</div>
</div>
</div>
<div class="forum_post forum-post forum-post--unread" id="post1465971">
<div class="forum-post__heading">
<span style="float:left;"><a class="forum-post__id" href="https://ptp.me/forums.php?action=viewthread&threadid=31622&postid=1465971#post1465971">#1465971</a>
by <strong><a class="username username--torrent-master" href="https://ptp.me/user.php?id=114674">chacalbhz</a><img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/donor.png" alt="Donor" title="Donor"><a href="https://ptp.me/user.php?action=awards&id=114674"><img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/Rank6.png" class="award" title="Rank 6: 113 Awards"></a> (Torrent Master)</strong>
<span class="user_title"> </span>
<span class="time" title="Feb 03 2018, 02:25">[ Feb 03 2018, 02:25 ]</span> - <a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#quickpost" onclick="Quote( '1465971', 'chacalbhz' );">[Quote]</a>
</span>
<span id="bar1465971" style="float:right;">
<a href="https://ptp.me/reports.php?action=report&type=post&id=1465971">[Report Post]</a>
<a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#">↑</a>
</span>
</div>
<div class="forum-post__avatar-and-body">
<div class="forum-post__avatar"> <img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/n8h9ew.png" class="forum-post__avatar__image" alt="chacalbhz's avatar" width="150" height="250">
</div> <div class="forum-post__body">
<div class="forum-post__bodyguard" id="content1465971">
<img border="0" src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/thanks.gif" alt=""> </div>
</div>
</div>
</div>
<div class="forum_post forum-post forum-post--unread" id="post1686709">
<div class="forum-post__heading">
<span style="float:left;"><a class="forum-post__id" href="https://ptp.me/forums.php?action=viewthread&threadid=31622&postid=1686709#post1686709">#1686709</a>
by <strong><a class="username username--elite" href="https://ptp.me/user.php?id=119825">DigitalJosee</a><a href="https://ptp.me/user.php?action=awards&id=119825"><img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/Rank3.png" class="award" title="Rank 3: 67 Awards"></a> (Elite)</strong>
<span class="user_title"> (Custom what?) </span>
<span class="time" title="Sep 29 2019, 20:02">[ Sep 29 2019, 20:02 ]</span> - <a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#quickpost" onclick="Quote( '1686709', 'DigitalJosee' );">[Quote]</a>
</span>
<span id="bar1686709" style="float:right;">
<a href="https://ptp.me/reports.php?action=report&type=post&id=1686709">[Report Post]</a>
<a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#">↑</a>
</span>
</div>
<div class="forum-post__avatar-and-body">
<div class="forum-post__avatar"> <img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/48yp64.jpg" class="forum-post__avatar__image" alt="DigitalJosee's avatar" width="383" height="400">
</div> <div class="forum-post__body">
<div class="forum-post__bodyguard" id="content1686709">
I'm dumb or this doesn't work?<br>
<br>
Probably the first option tho, but may I ask how to use it?<br>
Would <code>vspipe script.vpy ./</code> work?<br>
<br>
EDIT: Ok, I managed to make it work, but there's no info on the image, maybe I'm missing something?<br>
<br>
<img class="bbcode__image" onclick="lightbox.init(this,500);" alt="https://i.imgur.com/YkJV8n7.jpg" src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/YkJV8n7.jpg"><br>
<br>
nvmd, It's working, thx! <div class="forum-post__edited">
Last edited by
<a class="username" href="https://ptp.me/user.php?id=119825">DigitalJosee</a> <span class="time" title="Sep 29 2019, 21:56">[ Sep 29 2019, 21:56 ]</span> </div>
</div>
</div>
</div>
</div>
<div class="forum_post forum-post forum-post--unread" id="post1818628">
<div class="forum-post__heading">
<span style="float:left;"><a class="forum-post__id" href="https://ptp.me/forums.php?action=viewthread&threadid=31622&postid=1818628#post1818628">#1818628</a>
by <strong><a class="username username--power-user" href="https://ptp.me/user.php?id=125084">dosocat</a><a href="https://ptp.me/torrents.php?type=uploaded&userid=125084&scene=3"><img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/encoder.png" title="Encoder"></a> (Power User)</strong>
<span class="user_title"> </span>
<span class="time" title="Sep 01 2020, 15:26">[ Sep 01 2020, 15:26 ]</span> - <a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#quickpost" onclick="Quote( '1818628', 'dosocat' );">[Quote]</a>
</span>
<span id="bar1818628" style="float:right;">
<a href="https://ptp.me/reports.php?action=report&type=post&id=1818628">[Report Post]</a>
<a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#">↑</a>
</span>
</div>
<div class="forum-post__avatar-and-body">
<div class="forum-post__avatar"><div style="position: relative;"> <img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/s7ECxld.jpg" class="forum-post__avatar__image" alt="dosocat's avatar" width="150" height="200">
<img class="forum-post__avatar__partyhat" style="position: absolute; pointer-events: none;left:41px;top:-2px;width:41px;" src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/birthdayhat.png"></div></div> <div class="forum-post__body">
<div class="forum-post__bodyguard" id="content1818628">
<a href="https://ptp.me/user.php?action=search&search=BigMittens">@BigMittens</a> THANK YOU SO MUCH FOR THIS POST. I was wrestling around with AvsBmod and having absolutely no luck, but this made it super easy. You should turn this into a wiki article! so useful.<br>
<br>
Would you describe what's happening in these lines?<br>
<br>
<pre class="preformatted-text--scrolled"><br>
# for anamorphic resize (not necessarily needed for anamorphic clips)<br>
#par = source.get_frame(0).props._SARNum / source.get_frame(0).props._SARDen <br>
#res = core.resize.Spline36(res, int(res.width * par / 2) * 2, res.height)<br>
</pre><br>
<br>
I'm not sure I 100% grasp when to use it, or why.<br>
<br>
Also, is there a reason to choose Spline36 for the resizes instead of Bicubic? I only ask because the docs say that one is "default", and I want to understand more!<br>
<br>
</div>
</div>
</div>
</div>
<div class="forum_post forum-post forum-post--unread" id="post1818644">
<div class="forum-post__heading">
<span style="float:left;"><a class="forum-post__id" href="https://ptp.me/forums.php?action=viewthread&threadid=31622&postid=1818644#post1818644">#1818644</a>
by <strong><a class="username username--power-user" href="https://ptp.me/user.php?id=116773">Aicha</a> <img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/badge_gpchecker.png" title="Golden Popcorn Checker"><a href="https://ptp.me/user.php?action=awards&id=116773"><img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/Rank2.png" class="award" title="Rank 2: 36 Awards"></a> (Power User)</strong>
<span class="user_title"> </span>
<span class="time" title="Sep 01 2020, 16:10">[ Sep 01 2020, 16:10 ]</span> - <a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#quickpost" onclick="Quote( '1818644', 'Aicha' );">[Quote]</a>
</span>
<span id="bar1818644" style="float:right;">
<a href="https://ptp.me/reports.php?action=report&type=post&id=1818644">[Report Post]</a>
<a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#">↑</a>
</span>
</div>
<div class="forum-post__avatar-and-body">
<div class="forum-post__avatar"> <img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/v18e69.png" class="forum-post__avatar__image" alt="Aicha's avatar" width="150" height="150">
</div> <div class="forum-post__body">
<div class="forum-post__bodyguard" id="content1818644">
<strong>dosocat wrote:</strong> <a rel="nofollow" href="https://ptp.me/forums.php?action=viewthread&threadid=31622&postid=1818628#post1818628"><img class="view_post" alt="View Post" src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/viewpost-right.png" style="width:12px; height:10px; vertical-align: middle" title="View Post"></a><blockquote>Would you describe what's happening in these lines?<br>
<br>
<pre class="preformatted-text--scrolled"><br>
# for anamorphic resize (not necessarily needed for anamorphic clips)<br>
#par = source.get_frame(0).props._SARNum / source.get_frame(0).props._SARDen <br>
#res = core.resize.Spline36(res, int(res.width * par / 2) * 2, res.height)<br>
</pre><br>
<br>
I'm not sure I 100% grasp when to use it, or why.<br>
<br>
Also, is there a reason to choose Spline36 for the resizes instead of Bicubic? I only ask because the docs say that one is "default", and I want to understand more!</blockquote>I believe you would do something like that if you're dealing with a DVD or similar, where metadata tells the video player to stretch the frame to the given aspect ratio. If you're only working with Blu-rays or similar HD content, you should (almost) never encounter this.<br>
<br>
Bicubic is usually considered too blurry compared to Spline36. This is probably more obvious if you upscale clips. You can do this to visualize it:<br>
<pre class="preformatted-text--scrolled">spline = src.resize.Spline36(src.width * 2, src.height * 2, dither_type="error_diffusion")<br>
spline = spline.sub.Subtitle("Spline36")<br>
# mitchell is usually the go-to, iirc bicubic defaults to catmull so that the default's an interpolation filter<br>
bicubic = src.resize.Bicubic(src.width * 2, src.height * 2, dither_type="error_diffusion", filter_param_a=1/3, filter_param_b=1/3)<br>
bicubic = bicubic.sub.Subtitle("Mitchell Bicubic")<br>
out = core.std.Interleave([spline, bicubic])</pre><br>
Here's a quick rundown of bicubic resampling (spline is underneath): <a rel="noreferrer" target="_blank" href="https://guide.encode.moe/encoding/resampling.html#mitchell-netravali--bicubic">https://guide.encode.moe/encoding/resampling.html#mitchell-netravali--bicubic</a> </div>
</div>
</div>
</div>
<div class="forum_post forum-post forum-post--unread" id="post1818682">
<div class="forum-post__heading">
<span style="float:left;"><a class="forum-post__id" href="https://ptp.me/forums.php?action=viewthread&threadid=31622&postid=1818682#post1818682">#1818682</a>
by <strong><a class="username username--power-user" href="https://ptp.me/user.php?id=125084">dosocat</a><a href="https://ptp.me/torrents.php?type=uploaded&userid=125084&scene=3"><img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/encoder.png" title="Encoder"></a> (Power User)</strong>
<span class="user_title"> </span>
<span class="time" title="Sep 01 2020, 19:10">[ Sep 01 2020, 19:10 ]</span> - <a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#quickpost" onclick="Quote( '1818682', 'dosocat' );">[Quote]</a>
</span>
<span id="bar1818682" style="float:right;">
<a href="https://ptp.me/reports.php?action=report&type=post&id=1818682">[Report Post]</a>
<a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#">↑</a>
</span>
</div>
<div class="forum-post__avatar-and-body">
<div class="forum-post__avatar"><div style="position: relative;"> <img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/s7ECxld.jpg" class="forum-post__avatar__image" alt="dosocat's avatar" width="150" height="200">
<img class="forum-post__avatar__partyhat" style="position: absolute; pointer-events: none;left:41px;top:-2px;width:41px;" src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/birthdayhat.png"></div></div> <div class="forum-post__body">
<div class="forum-post__bodyguard" id="content1818682">
Much appreciated <a href="https://ptp.me/user.php?action=search&search=Aicha">@Aicha</a>!! Thanks for the in depth response and sources. </div>
</div>
</div>
</div>
<div class="forum_post forum-post forum-post--unread" id="post1818753">
<div class="forum-post__heading">
<span style="float:left;"><a class="forum-post__id" href="https://ptp.me/forums.php?action=viewthread&threadid=31622&postid=1818753#post1818753">#1818753</a>
by <strong><a class="username username--power-user" href="https://ptp.me/user.php?id=94358">BigMittens</a><a href="https://ptp.me/user.php?action=awards&id=94358"><img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/Rank2.png" class="award" title="Rank 2: 46 Awards"></a> (Power User)</strong>
<span class="user_title"> </span>
<span class="time" title="Sep 01 2020, 23:11">[ Sep 01 2020, 23:11 ]</span> - <a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#quickpost" onclick="Quote( '1818753', 'BigMittens' );">[Quote]</a>
</span>
<span id="bar1818753" style="float:right;">
<a href="https://ptp.me/reports.php?action=report&type=post&id=1818753">[Report Post]</a>
<a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#">↑</a>
</span>
</div>
<div class="forum-post__avatar-and-body">
<div class="forum-post__avatar"> <img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/rn651w.jpg" class="forum-post__avatar__image" alt="BigMittens's avatar" width="307" height="400">
</div> <div class="forum-post__body">
<div class="forum-post__bodyguard" id="content1818753">
Thank you dosocat and Aicha. I would also recommend checking out the <a href="https://ptp.me/wiki.php?action=article&id=272#section61">new wiki article's section</a> on doing comparisons with svgsfunc. </div>
</div>
</div>
</div>
<div class="forum_post forum-post forum-post--unread" id="post1818797">
<div class="forum-post__heading">
<span style="float:left;"><a class="forum-post__id" href="https://ptp.me/forums.php?action=viewthread&threadid=31622&postid=1818797#post1818797">#1818797</a>
by <strong><a class="username username--power-user" href="https://ptp.me/user.php?id=125084">dosocat</a><a href="https://ptp.me/torrents.php?type=uploaded&userid=125084&scene=3"><img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/encoder.png" title="Encoder"></a> (Power User)</strong>
<span class="user_title"> </span>
<span class="time" title="Sep 02 2020, 03:08">[ Sep 02 2020, 03:08 ]</span> - <a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#quickpost" onclick="Quote( '1818797', 'dosocat' );">[Quote]</a>
</span>
<span id="bar1818797" style="float:right;">
<a href="https://ptp.me/reports.php?action=report&type=post&id=1818797">[Report Post]</a>
<a href="https://ptp.me/forums.php?action=viewthread&threadid=31622#">↑</a>
</span>
</div>
<div class="forum-post__avatar-and-body">
<div class="forum-post__avatar"><div style="position: relative;"> <img src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/s7ECxld.jpg" class="forum-post__avatar__image" alt="dosocat's avatar" width="150" height="200">
<img class="forum-post__avatar__partyhat" style="position: absolute; pointer-events: none;left:41px;top:-2px;width:41px;" src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/birthdayhat.png"></div></div> <div class="forum-post__body">
<div class="forum-post__bodyguard" id="content1818797">
Incredible source! I've been using Handbrake, but I think I'll try an encode entirely with VS next time. <br>
<br>
Luckily my source was pretty good, so no real issues that needed filtering for this one.<br>
<br>
That link is going in my bookmarks for sure! <br>
<br>
<img border="0" src="./Source-vs.-Encode-with-VapourSynth-natively-under-Linux-or-macOS_files/thanks.gif" alt=""> </div>
</div>
</div>
</div>
<div class="pagination pagination--bottom"></div>
<h2 class="page__title">
<a href="https://ptp.me/forums.php">Forums</a> >
<a href="https://ptp.me/forums.php?action=viewforum&forumid=43">Encoding</a> >
Source vs. Encode with VapourSynth natively under Linux or macOS</h2>
</div>
<script>
function ToggleSearchThreadForm( clickedItem )
{
var searchForm = $jq( "#searchthread" );
searchForm.ToggleHC();
if ( !searchForm.hasClass( "hidden" ) )
{
$jq( clickedItem ).html( "[Hide Search]" );
$jq( "#searchbox" ).focus();
}
else
{
$jq( clickedItem ).html( "[Search this Thread]" );
}
}
var bbcodeToolbar = new BbcodeToolbar( "#quickpost" );
var youTubeQualityParameter = "";
RegisterGlobalAjaxCursorChange();
InitializeNewCommentValidator();
$jq('.forum-post__heading > span:first-of-type > a:first-of-type').next().addBack().hover(
function() {
$jq(this).parents('.forum-post').find('.forum-post__avatar__partyhat').stop().fadeTo(1000, 0.2);
},
function() {
$jq(this).parents('.forum-post').find('.forum-post__avatar__partyhat').stop().delay(300).fadeTo(1000, 1);
}
);</script>
</div>
</div>
<div id="lightbox" class="lightbox hidden" tabindex="-1"></div>
<div id="lightbox__shroud" class="lightbox__shroud hidden"></div>
<!-- Extra divs, for stylesheet developers to add imagery -->
<div id="extra1"><span></span></div>
<div id="extra2"><span></span></div>
<div id="extra3"><span></span></div>
<div id="extra4"><span></span></div>
<div id="extra5"><span></span></div>
<div id="extra6"><span></span></div>
</body></html>