![screenshot](https://i.imgur.com/ycrZQ1t.png)
This is a ridiculously complex hackjob to insert as much footage as possible from the US Blu-ray release of this movie into an HDTV recording of the Japanese version. For reference, the Japanese version is 10 minutes longer and the English dub is a complete hackjob, so this was anything but easy. The final encoding script for this file ended up being *290 lines long* and took eight hours straight to write. If anybody cares to see it, [go nuts](https://pastebin.com/GCV0jLNz).
The subtitles were translated long ago by Tatsu no Kiba Productions, and were edited to match the terminology used by Crunchyroll.
@Aergia Seriously? Like really? What a dumb fucking comment. So many choosing beggars on this site like holy shit. Imagine thinking the MPEG-2 source TS was actually better than the encode itself. Imagine someone putting effort into taking a shitty source, the only HD one available for the Japanese version, combining it with the best dub version available and complaining because the shitty source was shitty. Get a grip dude.
> The final encoding script for this file ended up being 290 lines long and took eight hours straight to write.
This isn't something to brag about. It's easily one of the most inefficient scripts I've seen in my life and could've been done in like, 40 lines, maybe less. You really need to take a python primer.
I didn’t write it to be efficient, I just went through the thing in vspreview with the videos stacked together and added an extra line every time I came across a cut. Having it written more efficiently would take a lot more work for an identical result, so why bother?
@SeaSmoke, It really wouldn’t have, because what took 8 hours was seeking frame by frame tracking down all the edits, not writing the Trim commands. I could’ve condensed it down to less lines, but it’d take a lot more work given this specific workflow (load both videos stacked together, add a line every time they go out of sync, refresh and continue looking, rinse and repeat).
@LCE I’m uploading the TS file right now, but it’s kind of enormous so it’ll take a while to get it uploaded to the seedbox.
Simply writing a couple of loops that iterate over a list of tuples/ints could've made the script vastly more readable and a lot faster to write. Efficiency isn't something that will always take *much* longer by necessity. Instead, you now have a couple hundred lines that makes things unnecessary complicated. Also some rather weird choices that make me go ??? (like, why are you doing `a+a+a+a+a+a` instead of `a*10` or whatever value you need? Why are you using `std.Trim` when simple python slicing works fine and would've been much easier to read? What is that odd `insertclip` module you're loading in, and why are you not just using `vsutil`'s `insert_clip`? Why are you running `Tweak` *3 times* with different params instead of all at once? A lot of questions keep popping up the more I read this script).
Writing code you can easily read again later is fundamental, especially if you plan on also sharing it around. Right now it looks more like you want to show off how poorly you can write scripts, and it kinda baffles me. There was a good reason I said you should be using the Python aspect it offers—It makes writing code a lot easier if you do.
@AwfulCaps Having the source available means more people have the ability to try their hand at encoding this. I don't get why you're so upset about him asking for the source files. It'd certainly help in making me understand some of the actions taken in the script he posted!
^ This pretty much
> I could’ve condensed it down to less lines, but it’d take a lot more work given this specific workflow.
Doubt. I've done similar stuff previously and never had to do something like this. I would've rewritten some of it to show you what I mean but I can barely make any sense of the code, and that's part of the problem here.
Simplest example of extra code would be:
```
video = adjust.Tweak(video,bright=0.8)
video = adjust.Tweak(video,cont=1.02)
video = adjust.Tweak(video,sat=1.2)
```
instead of:
```
video = adjust.Tweak(video, bright=0.8, cont=1.02, sat=1.2)
```
To be fair, I'd get it if he wanted to very specifically want the contrast and saturation to affect the brightness-adjusted clip and such, but uhh... you could certainly write at least a comment to indicate that! And looking at the Adjust code, I'm not even sure it really matters much besides maybe doing `sat` at the end after all, since it does perform that operation before `cont` and `bright` (which I'm also kinda ?? about, as I am with most ports of older AviSynth code, honestly).
> Why are you using std.Trim when simple python slicing works fine and would’ve been much easier to read?
Habit, I’m used to Avisynth. Insertclip is a module I adapted from avisynth, https://kyodaimax.puto.pt/insertclip.py
And honestly, the script wasn’t written with the intent to be shared, I just put it in there as a “Jesus Christ the dub was hackjobbed to ridiculous WHY” venting kind of thing.
Fair, although I think Python slicing is easy enough to adapt to that I'd recommend using that over Trim whenever possible myself (do keep in mind that it's exclusive, unlike Trim which is inclusive, but that's easy enough to used to). For reference, this is vsutil's [insert_clip](https://github.com/Irrational-Encoding-Wizardry/vsutil/blob/513576abd4bb08605f1f91ad32780ba16c7f3fea/vsutil/clips.py#L115-L136). Doesn't have an `end` param, but for that you can simply trim the clip before passing it.
```py
from adjust import Tweak
from vsutil import insert_clip as ic
src = core.ffms2.Source(r"PATH/TO/CLIP")
adj = Tweak(src, cont=2.0)
inserted_clip = ic(src, adj[:101], start_frame=100) # This replaces frames 100-199 in `src` with frames 0-100 from `adj`
```
I think we share a server or two, so if you want general VS pointers, I can help out with a simple ping if you need me to. Alternatively, some people make most of their scripts public (like [me](https://github.com/LightArrowsEXE/Encoding-Projects)!), so you could always look through their more recent scripts to see Python VS code in action.
Explains a lot, and it's especially hard with how awful the general packaging situation is with Vapoursynth. That said, there's still plenty of people around who are more up to speed with the generally good filters nowadays and what has greatly improved from older functions, so you could always ask around for pointers.
no lol. even in the mid-late 2000s (debatably the peak of fansubbing) there was a ton of shitflinging about switching codecs.
also insert "encoding isn't an important part of the fansubbing process" quote before herkz posts it
Talking about encodes is fine, being a condescending prick when someone is just trying their best is not. And I am not applying this to actual garbage stuff, like MTL releases.
I do love how the video description says "the dub is a hackjob."
It seems to be a litle known fact about Pyramid of Light that in actuality, the JAPANESE version is the dub--English was the original language, as this was a film helmed by 4Kids. Which goes a long way towards explaining why this movie feels like a bad fanfic by people who barely understood the source. Sort of like the Capsule Monster episodes (which were also a 4Kids creation).
Not hating on the uploader. You're doing the Lord's work by making sure this stuff is available. I just wanted to give a history lesson.
@Jisp If the Japanese version was a dub of the English version, then how do you explain there being scenes present in the JP version that were cut from the English one? I'm pretty sure that while 4kids commissioned the movie, the people on the JP side made it more or less how they wanted it, then 4kids took the final product and made their usual cuts and edits to it. Similar to what happened with the 3rd season for Sonic X, that was commissioned by 4kids and made its premiere in English, but later the original Uncut version surfaced on Japanese streaming sites uncensored and with more mature themes.
Comments - 30
LightArrowsEXE
louis
LCE
Aergia
Puto
AwfulCaps
LCE
SeaSmoke
Puto
SeaSmoke
AwfulCaps
Puto
LightArrowsEXE
SeaSmoke
Puto
LightArrowsEXE
Puto
SeaSmoke
Puto
LightArrowsEXE
Puto
LightArrowsEXE
Puto
SeaSmoke
DodgyAussie
ap1234
Interruptor
sarachikorita (uploader)
Jisp
victor1139