Tuesday, August 6, 2024

Editing in AviSynth, then encoding in HandBrake

Why am I ditching MeGUI*?

While MeGUI does do x265, it's not the GPU-accelerated kind, so good quality (i.e. "Slowest" speed and 2000 kbps) on a 24-minute video takes literally about a day. As in 24 hours. Zero complaints on quality, but it's just impractical! And I have other videos to encode that are longer than that. No thank you. NVENC would only take 15 minutes to encode a 24-minute video. 

HandBrake does do GPU-accelerated encoding with H.265 NVENC, but it doesn't load AviSynth scripts directly. There's lots of outdated info out there, but I figured it out. Some links:

  • The latest AviSynth+. The installer seems to install both 32-bit and 64-bit, and you have the option to install one or the other or both. Choose both anyway; it won't hurt. I ran into "cannot load 32-bit dll in 64-bit AviSynth" errors in my search for a solution but if you're on Windows 11, you're only really using 64-bit. You won't run into any problems with VirtualDub either if you use VirtualDub2 and stick with VirtualDub64.exe in the archive.
  • AV FileSystem, aka AVFS. Apparently there are plenty of programs called "AVFS" and many sites refer you to the older version of the program which is no longer updated and will not solve the problem. Requires:

My entire D drive is raw captures and templates. so I put AVFS there. To get started, I open Command Prompt. From here, I type in D: to change directories, then avfs "template.avs" and hit Enter. The virtual avi is created almost instantly in C:\Volumes. Windows Explorer says the 24-minute virtual AVI is 336 GB, but it doesn't take up any space. And HandBrake will load it up no problem!

Still, the consensus is GPU encoding isn't as good as CPU encoding, even if the speed is amazing. But my counter to that is, remember what we had to do with the old x264 standard: 2-pass Very Slow encoding and 12000 kbps would be damn near lossless, but would also take forever to encode and they would be huge! So if I have to bump up the bit rate a bit, well then, okay. We're still already at over 50% savings in file reduction anyway. This other guy on reddit, has more faith in the quality of NVENC, and you know what? I'll take his side.

I started encoding just animation at 2500 kbps and it looked good; it's already a higher bit rate than those old One Piece rips with multiple languages, which I consider the gold standard. But then my live action captures looked good too at this setting so I guess I'm staying at 2500 kbps, with Encoder Preset at Slowest and rc-lookahead=32. I think 3000 kbps was the lowest I would go for x264 captures at 720p, so doing 2500 kbps for 1080p is a great savings. 

Also learned a neat term from all of this: JND (just-noticeable difference). 

Those One Piece settings, by the way, are: 

Format                         : Matroska
Format version                 : Version 4
File size                      : 235 MiB
Duration                       : 23 min 50 s
Overall bit rate               : 1 380 kb/s
Frame rate                     : 23.976 FPS
Encoded date                   : 2019-03-06 23:55:59 UTC
Writing application            : mkvmerge v9.2.0 ('Photograph') 64bit
Writing library                : libebml v1.3.3 + libmatroska v1.4.4
Attachments                    : OpenSans-Semibold.ttf
Video
ID                             : 1
Format                         : HEVC
Format/Info                    : High Efficiency Video Coding
Format profile                 : Main@L5.1@Main
Codec ID                       : V_MPEGH/ISO/HEVC
Duration                       : 23 min 50 s
Bit rate                       : 1 278 kb/s
Width                          : 1 920 pixels
Height                         : 1 080 pixels
Display aspect ratio           : 16:9
Frame rate mode                : Constant
Frame rate                     : 23.976 (24000/1001) FPS
Color space                    : YUV
Chroma subsampling             : 4:2:0
Bit depth                      : 8 bits
Bits/(Pixel*Frame)             : 0.026
Stream size                    : 218 MiB (93%)
Default                        : Yes
Forced                         : No
Audio
ID                             : 2
Format                         : AAC LC
Format/Info                    : Advanced Audio Codec Low Complexity
Codec ID                       : A_AAC-2
Duration                       : 23 min 50 s
Bit rate                       : 96.0 kb/s
Channel(s)                     : 2 channels
Channel layout                 : L R
Sampling rate                  : 44.1 kHz
Frame rate                     : 43.066 FPS (1024 SPF)
Compression mode               : Lossy
Delay relative to video        : 22 ms
Stream size                    : 16.7 MiB (7%)
Language                       : Japanese
Default                        : Yes
Forced                         : No
Text #1
ID                             : 3
Format                         : ASS
Codec ID                       : S_TEXT/ASS
Codec ID/Info                  : Advanced Sub Station Alpha
Duration                       : 23 min 31 s
Bit rate                       : 103 b/s
Frame rate                     : 0.209 FPS
Count of elements              : 295
Compression mode               : Lossless
Stream size                    : 17.9 KiB (0%)
Title                          : English
Language                       : English
Default                        : Yes
Forced                         : No
Menu
00:00:10.500                   : en:Opening Theme
00:02:40.660                   : en:Recap
00:03:11.942                   : en:Part A
00:16:17.186                   : en:Part B
00:23:15.687                   : en:Next Episode Preview

*I'm not completely ditching MeGUI because HandBrake crashes when I try to include chapter data. HandBrake has its own method, completely incompatible with the way I've done it for nearly two decades, which is a text file that MeGUI can accept even before encoding:

CHAPTER01=00:00:00.000
CHAPTER01NAME=1 - Cold Open
CHAPTER02=00:01:16.977
CHAPTER02NAME=2 - Title Sequence
CHAPTER03=00:02:47.017
CHAPTER03NAME=3 - Sponsors A
CHAPTER04=00:02:59.429
CHAPTER04NAME=4 - Act 1
CHAPTER05=00:09:29.969
CHAPTER05NAME=5 - Eyecatch A
CHAPTER06=00:09:37.994
CHAPTER06NAME=6 - Eyecatch B
CHAPTER07=00:09:43.900
CHAPTER07NAME=7 - Act 2
CHAPTER08=00:21:27.153
CHAPTER08NAME=8 - Credits
CHAPTER09=00:22:58.377
CHAPTER09NAME=9 - Post-Credits
CHAPTER10=00:23:59.438
CHAPTER10NAME=10 - Preview
CHAPTER11=00:24:14.436
CHAPTER11NAME=11 - Sponsors B

So after I let HandBrake encode, I run it through MeGUI again (One-Click > Advanced Config > Don't encode video) and it'll only take seconds for a lossless copy to be created, this time with chapter selection.

Sunday, June 30, 2024

More Vita Troubleshooting

I can't install VPKs. (Error 0x80010002)

This is not a memory card issue or a motherboard issue. You just need to let your Vita or PSTV format the contents of a (preferably blank) Vita memory card in Settings, then copy your entire memory card (ux0) via FTP, and then FTP it all back to your SD2Vita (ux0), choosing to overwrite in your FTP program when asked. 

Other than your FTP program, there is no longer any need for Windows and viewing hidden files! I believe this allowed me to format my SD card in VitaDeploy as well, skipping any formatting done on PC. (original Github thread


Sharkf00d keeps crashing.

The only reason you should bother with this is VitaDB Downloader, which as I understand is better than Vita Homebrew Browser. So instead of gambling with its extremely poor installation success rate, just download this guy's libshacccg.skprx and put it in ur0/data manually. I had to create the directory myself. 

Don't forget to download Autoplugin 2 for SharpScale, DolcePolce, and other must-have plugins. (original reddit thread)


I get a read-only message in Content Manager.

This just means QCMA on your PC isn't pointing to the right directories.  But even after you change them, you still have to click Refresh Database. Then you should be good to go!


PS Store and other sign-in methods immediately kick me out. 

Since official firmware doesn't seem to be updated anymore, I prefer to stay on the latest (3.74) and just use the browser hack (jailbreak.psp2.dev). As such, there was probably no need for iTLS-Enso which was a featured app within VitaDeploy. Once I got rid of it, I could sign in. 

EDIT: Actually, reVita, one of the more essential plugins for PSTV doesn't work on newer firmwares, so back to 3.65 Enso it is. I was tired of Chovy-sign breaking all the time anyway. 


I enabled two-factor authentication (2FA) but it's still confusing.

I like to set this up on a browser. When you enable it, you're making unique passwords for unique devices, and when you log into those devices (e.g. PS3, Vita, or PSTV), you're using those unique passwords, not your "real" password as you would on your PS4 or PS5.

In fact, when jailbreaking my PSTV, I had formatted and deactivated plenty of times, but the unique password I had made specifically for that device a year ago still worked.


Downloads and Transfers always stop 

Seems like you can't rely on the Vita's memory card formatting after all. In my experience, a game stopped transferring, and when I tried outright downloading it, the download stalled at a similar point in the progress bar. I will try what this commenter said on a video:

Format your SD card on your PC as EXFat with 64 KB clusters; 128 KB clusters for 128GB cards and smaller. I use 1 TB cards in my Vita & they work great.

I do the whole zzblank / Win32DiskImager thing first, to be safe. 

EDIT: Seems you CAN properly format on just the Vita alone with UX0 to SD CloneTool Vita. But in my experience, you definitely want to install and enable YAMT first (Settings > Devices > Storage Devices , leave all defaults). 

I thought UX0 to SD CloneTool would just clone the contents of the memory card, but it mounted too, and I wanted YAMT to do that since YAMT is nicely integrated into the Settings menu. But on this particular Vita, I didn't have YAMT installed first. If you use UX0 to SD CloneTool first without YAMT, the app will mount, but then YAMT will be broken. What I did was run UX0 to SD CloneTool a third and final time with YAMT enabled and both YAMT options set to default. UX0 to SD CloneTool will give you a warning about exiting if your setup is working and that starting will reset, but this is what you want. When you do this, your system will restart. Then in the YAMT system settings, set ux0 to SD2Vita and uma0 to... well, I hope this doesn't actually matter, but I set it to Internal Storage because this Vita is a 2000 with the built-in memory.

Trying this again with a (more or less) fresh Vita TV, I got stuck in a bootloop with the UX0 to SD CloneTool after running it once and restarting, but holding the power button to go in safe mode and restore & delete, I tried the old way (download VitaDeploy, install YAMT lite, restart, go in Settings > Storage Devices, check Use YAMT, ux0: SD2Vita, uma0: Default)... and no freeze, so the SD2Vita card isn't broken. So maybe stick with the old ways after all, like Grandma always said!

Monday, March 4, 2024

ExtremeRate Joy-Con replacement shells for Nintendo Switch

Just did this mod myself. Highly, highly recommended over spending 2x or 3x for a pre-modded one on Etsy. If you can keep track of screws, you're in good shape. So just get an ice cube tray or something.


I'd say the d-pad is good / very good, if not a little stiff. It's better than the stock Joy-con, as good as the d-pads of the NDS and 3DS,  and as good as or better than the d-pad on the Vita (which everyone says it's "the best" but I think is only better than average). My test is, if I can rub out a Shoryuken without any effort at all, it's good, and this d-pad lets you do that. I had less success doing a Shoryu Reppa, so it's not as good as my favorite d-pads (PSP-3000 and PS4). But it's perfectly adequate for shmups. With a Pintendo grip or similar, you can shmup without compromise in handheld mode.

EDIT: Got another one by some professional modder (overpriced, don't do this) and the d-pad was even less stuff. But let me be clear: none of these give the Joy-con a pivot. I should've just gotten this 3D-printed one after all: https://www.youtube.com/watch?v=Hx8ziW64xo4

Friday, December 15, 2023

Survivor 45 - 4512 - "The Ex-Girlfriend at the Wedding"

Oh, man. Why oh why didn't Austin give his idol to Drew?? I blame Dee for not spilling the beans to Austin, like Austin spilled the beans to Dee. 

Not super-thrilled Jake has an idol either. He's not unlikeable, but I just like everyone else more!... except maybe Julie.

As I'm typing this I see the season finale will air on 12/20. Looks like I could've eased my binge-watching just a little bit. But I don't regret bingeing! I think bingeing two episodes a day for at least three days straight is the way to go because I'll have a hard time remembering peoples' names and caring about them otherwise. 

Survivor 45 - 4511 - "This Game Rips Your Heart Out?"

I was right to ship Austin and Dee! But maybe Austin wasn't, since he told Dee. But maybe he had to, in order to keep up trust with Dee and flush out the idol he gave Julie. I forget if people other than Drew know Austin has an idol for himself. 

So Emily goes. Sigh... I was rooting for her too.  Not sure who I want to throw my support to now, but it sure isn't Julie!

Thursday, December 14, 2023

Survivor 45 - 4510 - "How Am I the Mobster?"

Saw some raw emotion here. Emily upon winning the reward challenge. Katurah's surprise at being picked. Katurah again after panicking from the water, and everyone helping her get over that. Jake hitting the Survivor Wall and Bruce helping him get over that. 

GJ Bruce. For everything. 

Tuesday, December 12, 2023

Survivor 45 - 4509 - "Sword of Damocles"

Bruce won again, huh? Huh.

Austin's cool factor is back up, is all I have to say. He even recognized that he had to be quick writing the name at Tribal Council. Smart, smart, smart.  

Jake survives yet again, but we're running out of fat to trim here. 

By the way, I ship Austin + Dee as Kendra suggested.