<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>sda capture blog</title>
<link rel="alternate" type="text/html" href="http://nate.metroid2002.com/blog/" />
<modified>2007-10-07T08:36:42Z</modified>
<tagline>visit sda for all the video game world records! and visit my amazon.com wishlist!</tagline>
<id>tag:nate.metroid2002.com,2007:/blog//1</id>
<generator url="http://www.movabletype.org/" version="3.35">Movable Type</generator>
<copyright>Copyright (c) 2007, njahnke</copyright>
<entry>
<title>sumi-chan</title>
<link rel="alternate" type="text/html" href="http://nate.metroid2002.com/blog/archives/2007/10/sumichan.html" />
<modified>2007-10-07T08:36:42Z</modified>
<issued>2007-10-07T07:56:19Z</issued>
<id>tag:nate.metroid2002.com,2007:/blog//1.84</id>
<created>2007-10-07T07:56:19Z</created>
<summary type="text/plain">tonight saw the successful launch of my virtual multithreading solution, sumi-chan....</summary>
<author>
<name>njahnke</name>
<url>http://www.metroid2002.com/</url>
<email>njahnke@gmail.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://nate.metroid2002.com/blog/">
<![CDATA[<p>tonight saw the successful launch of my virtual multithreading solution, <b>sumi-chan</b>.</p>]]>
<![CDATA[<p>first of all, some background: right now, i own three modern computers, all of which are powered by dual core processors. the brilliant among us will have already concluded that this means i have a total of six (6) processor cores available. all the computers share storage over a gigabit lan.</p>

<p>unfortunately, the high quality deinterlacing filter mvbob() is not multithreaded. this means it can only use one core at a time. in the past i have set up multiple instances of vdub with e.g. one fourth of the total segments in a run to each, then started them all at the same time, but of course not all the segments are identical in length, so there would always be inefficiency as some vdubs would finish their deinterlacing before others.</p>

<p>avisynth is a very useful tool, and it was only a matter of time before i used it to automate a process by which any given input could be split up across a given number of threads, then automatically recombined later. i call this process <a href="/blog/sumichan.sh">sumi-chan</a> for lack of a more creative descriptor (if the name were to describe the software properly, it would be something like "avisynth filter virtual multithreading system" - so long! so boring!).</p>

<p>usage is simple - i just run sumichan.sh with the avisynth scripts' basename and the desired number of cpu cores across which to split up the work, then run the resulting batch files on each real machine (one batch file for each cpu core). thus, entering 6 for sumi-chan's second argument results in six sets of avisynth scripts and six batch files. </p>

<p>due to rounding errors, if the number of frames in the source material is not divisible by the number of cpu cores specified, a few frames will be "squeezed" to the final work unit. this is unlikely to result in any significant inefficiency, as mvbob() usually processes between 1 and 2 frames per second even in extremely complex scenes. changes in said complexity throughout each work unit will result in much more significant inefficiency (compared to a true multithreading solution whereby all cpu cores would be simultaneously busy or not busy).</p>

<p>sumi-chan will appear as an optional feature in anri-chan 3 (we're getting close to the release of 2 right now). it ought to make encoding d1 material much more realistic for most people.</p>

<p>incidentally, i'm using quantizer 1 vfw xvid (via vdub) for the nmf. i've been extremely pleased with both the cpu and disk costs associated with this codec (they are much smaller than those associated with lagarith - and it crashes less to boot!).</p>

<p>of course, i have to include <a href="/blog/sumi-chan-launch.jpg">the obligatory crap quality picture of my new virtual computer, dubbed "v6"</a>. cores 1 and 2 are in the macbook on the left, while cores 3, 4, 5 and 6 are monitored on the mac mini's screen, but are in reality split equally between v5 (my pc) and the mini. (the terminal windows lower down on the mini's screen are left over from working on the prime hunters run as discussed in <a href="http://nate.metroid2002.com/blog/archives/2007/10/diy_ds.html">the previous entry</a>.)</p>]]>
</content>
</entry>
<entry>
<title>diy ds</title>
<link rel="alternate" type="text/html" href="http://nate.metroid2002.com/blog/archives/2007/10/diy_ds.html" />
<modified>2007-10-05T22:20:40Z</modified>
<issued>2007-10-05T21:12:27Z</issued>
<id>tag:nate.metroid2002.com,2007:/blog//1.83</id>
<created>2007-10-05T21:12:27Z</created>
<summary type="text/plain">it&apos;s been almost eighteen months since i posted the ds recording guidelines, and now the first ds run has been submitted to sda....</summary>
<author>
<name>njahnke</name>
<url>http://www.metroid2002.com/</url>
<email>njahnke@gmail.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://nate.metroid2002.com/blog/">
<![CDATA[<p>it's been almost eighteen months since i posted the <a href="http://www.metroid2002.com/forum/viewtopic.php?t=4819">ds recording guidelines</a>, and now the first ds run has been submitted to sda.</p>]]>
<![CDATA[<p>DSGamer3002 followed those guidelines to the letter for his prime hunters run, and this was reflected in the quality of the recording.</p>

<p>however, the original recordings needed to be cropped in order to get rid of their useless black borders. the catch was that the cropping parameters needed to be dynamic - that is, where and how much i need to crop changed every few seconds.</p>

<p>as i'm sure you've figured out by now, i came up with a way to accomplish this in a semi-automated fashion, and the rest of this blog entry will be devoted to this methodology.</p>

<p>the first step was to locate a simple autocropping plug-in for avisynth. this came in the form of the aptly-named autocrop, found at <a href="http://avisynth.org/warpenterprises/">warpenterprises</a>. thankfully, autocrop() offers a great deal of customization of the autocropping algorithm. the user can set not only the crop/don't crop threshold, but the number of sample frames the plug-in takes into consideration within the video, as well.</p>

<p>the crop threshold is probably 8-bit luma, while the sample frames are, according to the plug-in's author, taken equidistantly from within the source video. however, no matter how many samples the plug-in uses, there will always be only one set of cropping settings per video. thus, whenever dsgamer's tired hands moved ever so slightly, the screen would no longer be contained entirely within the initially-calculated cropping values.</p>

<p>the obvious solution was to make many more, smaller videos out of dsgamer's run - enter <a href="/blog/acrop.sh">acrop</a>.</p>

<p>this bash script takes two arguments: the basename of the video and audio originals and the number of frames in the original video. the script then creates a number of avisynth scripts, each of them including a number of source declarations and autocrop() invocations for bits of the original video.</p>

<p>i call each section of video on which autocrop() operates a "window". the window size is not arbitrary, but is determined by how long a sequence of absolute black will be on screen in the source video. if any window consists entirely of black, then autocrop() will na&iuml;vely produce 0x0 video, which is a contradiction in terms - avisynth has no ability, from what i have seen, to resize a 0x0 frame. thus, even though it's all black anyway, windows consisting entirely of black must be avoided. the window size, then, should be perhaps one or two seconds longer than the longest stretch of absolute black in the source video.</p>

<p>i found taking the correct number of samples, too, to be crucial: the process will fail (producing 0x0 video) if either too many or too few are taken.</p>

<p>for convenience and efficiency of processing, i included several windows in each new script file. for this speed run i created scripts 1000 frames long, 5 200-frame windows in each. because the source video was exactly 30 fps, a 10-minute segment would correspond to around 20 individual script files.</p>

<p>it was not possible to include every script file in one master script for two reasons. one was the extremely long startup time associated with stacking multiple instances of autocrop() on top of one another. on my core 2 duo 2 ghz, it took between 10 and 20 seconds just to open one script with 5 windows in it. the other was that each window represents one directshowsource() declaration for the source video - in other words, there was one copy of the entire source video in memory for each window in the currently open script(s). avisynth is extremely ram-inefficient in this way, but you can't blame it, actually, because we're talking about windoze here.</p>

<p>of course, my default autocrop() threshold of 100 was not always optimal. in fact, i had to preview every window in vdub to make sure it was not too high or too low. many times i simply replaced every 100 with e.g. 70 because the game environment in that particular segment was darker and autocrop() was getting fooled and cropping off parts of the game screen. it was also occasionally necessary to increase the threshold when e.g. the screen went totally white, resulting in light reflecting off surrounding objects and back onto the area around the ds lite's screens, in turn resulting in autocrop() leaving in the plastic border around said screens.</p>

<p>after i determined the correct autocrop() parameters for each window of a segment, i aligned the audio (recorded separately in audacity by dsgamer via an 1/8" miniplug cable) by placing the over-the-air audio from the original source video on the left channel and the correct, line-in recorded audio on the right channel. i knew that the "new" audio was lined up when i could not distinguish that sound was coming first in either the left or the right channel. i adjusted the correct audio's delay by using delayaudio() in a master avisynth script file which loaded all of the individual pieces of the segment in question (since saved from the original scripts as lagarith-compressed new master files).</p>

<p>i would like to emphasize my success with this relatively novel method of audio realignment. in sharp contrast to the usual method when it comes to audio realignment, i did not even have to look at the video to know the audio was aligned - i literally did the work with my eyes closed.</p>

<p>and so the world's first high quality downloadable nintendo ds speed run was prepared for distribution on sda. i hope that everyone enjoys dsgamer's hard work and my automation-laced lack thereof when his run is posted on sda soon.</p>

<p>i almost forgot - here's the <a href="/blog/croptan.png">obligatory screenshot</a> of my initial autocrop() parameters discovery process.</p>]]>
</content>
</entry>
<entry>
<title>framerate decimation hell (or: deflickering revisited)</title>
<link rel="alternate" type="text/html" href="http://nate.metroid2002.com/blog/archives/2007/09/framerate_decim.html" />
<modified>2007-09-26T05:51:41Z</modified>
<issued>2007-09-26T05:28:13Z</issued>
<id>tag:nate.metroid2002.com,2007:/blog//1.82</id>
<created>2007-09-26T05:28:13Z</created>
<summary type="text/plain">i&apos;m encoding the ocarina of time 100% run for the third time right now (second time was due to a bad statid)....</summary>
<author>
<name>njahnke</name>
<url>http://www.metroid2002.com/</url>
<email>njahnke@gmail.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://nate.metroid2002.com/blog/">
<![CDATA[<p>i'm encoding the ocarina of time 100% run for the third time right now (second time was due to a bad statid).</p>]]>
<![CDATA[<p><font size="14" face="courier"><br />
F1: <font color="Blue">|</font><u>|</u><font color="green">|</font><font color="purple"><u>|</u></font><font color="red">|</font><u>|</u> <br />
<br /><br /><br />F2: <font color="Blue">|</font> <font color="green">|</font> <font color="red">|</font> <br />
<br /><br /><br />F3: <font color="Blue">|</font>  <font color="green">|</font> <br />
<br /><br /><br /></font></p>

<p>in the above picture each | represents one frame. this drawing depicts one complete cycle and only one complete cycle, so the first frame not shown is the first frame of the next cycle. it would be solid blue like the first frame of this cycle.</p>

<p>oot is d4 f3. from the f1 original i was going to f2 first, then to f3 to avoid odd (deflickered) frames (shown above with a bar through them). otherwise i have to use retard bob which does a marginal job of undoing the deflickering and takes exponentially more cpu. more on deflickering in <a href="http://nate.metroid2002.com/blog/archives/2007/01/flickerbat.html">these</a> <a href="http://nate.metroid2002.com/blog/archives/2007/01/flickerbat_ii.html">two</a> blog entries (incidentally this is the same reason i put up <a href="http://speeddemosarchive.com/yabb/YaBB.pl?board=sda_site;action=display;num=1168671803">this topic</a>).</p>

<p>the frame marked with blue is fine. the problem as i understand it is that sometimes instead of the motion happening in the green frame it happens in the purple or red frame (and gets lost as you can see on the f3 line). in these cases the pattern of motion in f1 is:</p>

<p><font face="courier"><font color="blue">K</font> <font color="black">D</font> <font color="green">D</font> <font color="purple">K</font> <font color="red">D</font> <font color="black">D</font></font> or <br />
<font face="courier"><font color="blue">K</font> <font color="black">D</font> <font color="green">D</font> <font color="purple">D</font> <font color="red">K</font> <font color="black">D</font></font> respectively, instead of <br />
<font face="courier"><font color="blue">K</font> <font color="black">D</font> <font color="green">K</font> <font color="purple">D</font> <font color="red">D</font> <font color="black">D</font></font></p>

<p>where <font face="courier">K</font> is a motion frame and <font face="courier">D</font> is a duplicate (no motion). when i was testing this i saw only sequences of the last type which are ok. but there are often sequences of the first or second type. and once this starts it apparently continues for some time, thus the long, painful stretches of f6 people are seeing.</p>

<p>so basically the game isn't dropping frames at regular intervals. sometimes it will be ok to go -> f2 -> f3 but usually not.</p>

<p>the good news is that i think i've worked out a solution with the help of donald graft's decimate():</p>

<p><font face="monaco, courier">changefps(f1/2)<br />
decimate(cycle=3)</font></p>

<p>this seems to be picking the correct frame (either green or red) from the f2 constellation, probably because it's checking to see that each frame is unique. this means i probably won't have to go back to the horrid retard bob.</p>]]>
</content>
</entry>
<entry>
<title>mac mini</title>
<link rel="alternate" type="text/html" href="http://nate.metroid2002.com/blog/archives/2007/09/mac_mini.html" />
<modified>2007-09-16T23:25:05Z</modified>
<issued>2007-09-16T21:08:00Z</issued>
<id>tag:nate.metroid2002.com,2007:/blog//1.81</id>
<created>2007-09-16T21:08:00Z</created>
<summary type="text/plain">so i bought a &quot;top of the line&quot; mac mini....</summary>
<author>
<name>njahnke</name>
<url>http://www.metroid2002.com/</url>
<email>njahnke@gmail.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://nate.metroid2002.com/blog/">
<![CDATA[<p>so i bought a "top of the line" mac mini.</p>]]>
<![CDATA[<p>it's a core 2 duo 2.0 ghz with 2 gigs of ram (it isn't "apple" ram, of course).</p>

<p>total cost was $1,017.28. cost to sda was $339.09. 1/3 of the machine was paid for with sda funds for the following reasons:</p>

<p><b>1)</b> the recent increase in the number of d1 f1 runs i need to encode for the site meant less and less idle time for my macbook. i was concerned that i would run out of cpu power to meet demand, especially after the warm reception of metroid prime 3 coupled with its length: the current estimate for an optimal any percent run is around three and half hours - not counting cutscenes. for reference, it takes about a week to encode 5 hours of d1 f1 video (deinterlacing to nmf and encoding all seven qualities) using four processor cores (assuming full speed from them all). i had been counting on most runs being d4, but this appears to be coming to an end.</p>

<p><b>2)</b> related to <b>1)</b>, i had no quick way to take 10-20 gig of content in to campus to upload while the macbook is locked down encoding.</p>

<p>only 1/3 of the cost was covered by sda because i could have gotten a better machine for the money had it not been a mac (i wanted a desktop mac because using the macbook as one was suboptimal). granted, this will help me do non-encoding work for sda more efficiently, but i feel that is a rather weak reason to take more money from our reserves in this crazy time. also, regarding <b>2)</b>, the other half of the reason i have to have the macbook on campus is school, which has yet to demonstrate decisively that it is beneficial to m2k2sda (though it has been making gains of late: some work on anri-chan was actually done as part of my on-campus job!).</p>

<p>i backed down from saving up for the next beast machine (codenamed V6) because it no longer made sense economically. there are many factors involved, but to summarize:</p>

<p><b>3)</b> i need more power right now (see <b>1)</b> and <b>2)</b>). an eight-core machine costs about $4,000. i wouldn't be able to afford that until may at the earliest.<br />
<b>4)</b> there has been no solution found for multithreaded deinterlacing. therefore i will have to write my own (already discussed as a feature for a future version of anri-chan). once i do this, it will no longer matter how many physical computers are performing the deinterlacing - the load will be divided evenly between the available number of cores.<br />
<b>5)</b> following from <b>4)</b>, continuing to pretend otherwise would mean that the macbook and V5 would be considered useless after the purchase of V6. together they have just under 50% of the theoretical power of V6, so this would be a great waste. by buying a weaker machine now and writing software to tie it together with my existing two, i can have 75% of the power of V6 right now for 1/4 of the price.</p>

<p>therefore, i now think of V5, the macbook and the new mac mini together as V6.</p>

<p>obligatory birth sequence documentation:</p>

<p><a href="/blog/mac mini/SV300002.JPG"><img src="/blog/mac mini tn/SV300002.JPG"/ ></a> <a href="/blog/mac mini/SV300003.JPG"><img src="/blog/mac mini tn/SV300003.JPG"/ ></a> <a href="/blog/mac mini/SV300004.JPG"><img src="/blog/mac mini tn/SV300004.JPG"/ ></a> <a href="/blog/mac mini/SV300005.JPG"><img src="/blog/mac mini tn/SV300005.JPG"/ ></a> <a href="/blog/mac mini/SV300006.JPG"><img src="/blog/mac mini tn/SV300006.JPG"/ ></a> <a href="/blog/mac mini/SV300007.JPG"><img src="/blog/mac mini tn/SV300007.JPG"/ ></a></p>]]>
</content>
</entry>
<entry>
<title>anri-chan and total independence</title>
<link rel="alternate" type="text/html" href="http://nate.metroid2002.com/blog/archives/2007/06/anrichan_and_to.html" />
<modified>2007-07-01T00:13:39Z</modified>
<issued>2007-07-01T00:12:29Z</issued>
<id>tag:nate.metroid2002.com,2007:/blog//1.80</id>
<created>2007-07-01T00:12:29Z</created>
<summary type="text/plain">it&apos;s been over two years since m2k2sda became monetarily self-sufficient....</summary>
<author>
<name>njahnke</name>
<url>http://www.metroid2002.com/</url>
<email>njahnke@gmail.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://nate.metroid2002.com/blog/">
<![CDATA[<p>it's been over two years since m2k2sda became monetarily self-sufficient.</p>]]>
<![CDATA[<p>money changes hands at least once every month, as i have to pay the $99 monthly m2k2sda server bill. when the google ads on the site earn us more than $99 a month, then sda requires no outside investment to continue to operate so long as it is continually updated (it's thought that otherwise, site traffic, and therefore ad revenue, would go down, while the server bill would remain the same, thereby reversing the aforementioned positive trend).</p>

<p>unfortunately, the amount of labor grenola, mike, snow, radix and i pour into sda, if paid, would equate to a sum much, much larger than $99 a month. therefore, when i declared sda monetarily self-sufficient two years ago, i was referring only to actual money earned and spent.</p>

<p>now it's time to take care of the rest.</p>

<p>for years, automating my job was a hopeless fantasy. the number of correct decisions required to encode material for the site was simply too high, and i knew of no way to have the computer make them for me. anyone who has seen the knowledge base and the tech support forum knows that asking inexperienced people to do my job as i do it is a losing proposition.</p>

<p>so i tried instead to make sda's revenue grow - to make the site pay us back for our work on it. i learned many things from my adventures trying to sell sda content on dvd, but probably the most significant was that <a href="http://nate.metroid2002.com/blog/archives/2005/11/i_started_this.html">it doesn't work</a>: sda may never generate enough revenue to pay its workers, and sometimes i think it's better that way.</p>

<p>but the fundamental problem remained: sda needs people to add new content, and if i died today, i thought to myself, would someone be there to replace me? i decided that even though i can't control my mortality, i <i>can</i> control how i will be seen after the fact.</p>

<p>little by little i chipped away at the problem, making generic.avs into a highly concentrated, library-driven block of boolean action. generating the scripts for new projects became a matter of enabling or disabling variables. now one script could do it all.</p>

<p>but there still had to be someone there to make decisions based on the content of the source video. i had automated the ntsc/pal distinction, but the rest of them seemed hopeless: how should i tell the computer to check whether every second or every third frame is the same as the previous? and even if this could somehow be done - what about the games with a varying framerate?</p>

<p>therefore, i created the concepts of d (dimensions), f (framerate) and fdp (framerate decimation paradigm) to quantify the differences between games. if a database of every game's d, f and fdp could be created, i reasoned, then surely some sort of script could be written that would take those values and configure generic.avs, reducing my job to reading numbers out of list and typing them in to a window. even if the game in question weren't yet included in the list, it could be added by any tech support staff member after seeing a brief, automatically-generated sample of the game's video. it would be the next best thing to full automation.</p>

<p>as many of you are already aware, i decided to call this script <a href="http://speeddemosarchive.com/yabb/YaBB.pl?board=sda_site;action=display;num=1178344904"><b>anri-chan</b></a> after the anime character who (like mickey and goethe before her) used magic to create numerous inferior copies of herself in a failed attempt to automate her job. thus, i am anri-chan, and anri.bat is an inferior copy of me. (when i began the project, i wasn't even aware that dgindex accepted arguments on the command line, and so i thought that automating the steps involving the user interface might be impossible, thereby dooming it all to failure.)</p>

<p>but these open source tools came through for me in the end, and so i was able to produce a proof-of-concept much more quickly than i had anticipated - and even better - it <i>worked</i>: other people were actually encoding acceptable video using anri-chan!</p>

<p>even vista couldn't stop me. </p>

<p>and as if that weren't enough, the free, open source model impressed me yet again today, as b-man in the sda forum went and wrote the anri-chan encoding settings manager for me. i have always said that it is not only me who can do this (just that i was the first to be chosen), and now i have been proven right. it really is true: if you build it, they will come.</p>

<p>i will finally make sda eternal by taking away the cost of its maintenance (at least as far as my job is concerned).</p>

<p>so now it's just a matter of writing comforting documentation ("when the program says do <i>x</i>, that's when you do <i>x</i>!") and officially releasing the software. with this i will simultaneously increase submissions, decrease my workload and therefore ensure the future of the site.</p>

<p>two years wasn't so long to wait, after all.</p>]]>
</content>
</entry>
<entry>
<title>time for lossy nmf</title>
<link rel="alternate" type="text/html" href="http://nate.metroid2002.com/blog/archives/2007/06/time_for_lossy.html" />
<modified>2007-06-24T05:13:18Z</modified>
<issued>2007-06-24T03:11:58Z</issued>
<id>tag:nate.metroid2002.com,2007:/blog//1.79</id>
<created>2007-06-24T03:11:58Z</created>
<summary type="text/plain"><![CDATA[[20:53:11] &lt;nate&gt; i've decided i'm never using lossless nmf again...]]></summary>
<author>
<name>njahnke</name>
<url>http://www.metroid2002.com/</url>
<email>njahnke@gmail.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://nate.metroid2002.com/blog/">
<![CDATA[<p>[20:53:11] &lt;nate&gt; i've decided i'm never using lossless nmf again</p>]]>
<![CDATA[<p>[20:58:18] &lt;Radix&gt; why&gt;<br />
[20:58:32] &lt;DJGrenola&gt; you had to ask didn't you<br />
[20:58:33] &lt;DJGrenola&gt; heheh<br />
[21:00:27] &lt;nate&gt; disk read locks<br />
[21:00:31] &lt;nate&gt; i have too much cpu with 2 cores<br />
[21:00:40] &lt;nate&gt; so what happens when i put a 4 core cpu in there<br />
[21:00:46] &lt;nate&gt; i buy a raid? i don't think so<br />
[21:01:00] &lt;nate&gt; more cpu just means less relative cost to decode x264 original<br />
[21:01:10] &lt;nate&gt; can't use it with interlaced stuff but that's not an issue<br />
[21:01:16] &lt;nate&gt; this is post-mvbob stuff<br />
[21:01:39] &lt;nate&gt; basically what happened is the zoid ss flv was cut off<br />
[21:01:49] &lt;nate&gt; because it was one of those times p: filled up while i was in kansas<br />
[21:01:54] &lt;nate&gt; and i only just caught it today<br />
[21:02:01] &lt;nate&gt; so now it's taking ~12 hours to reencode the flv<br />
[21:02:07] &lt;nate&gt; when it's less than half that cpu wise<br />
[21:02:33] &lt;DJGrenola&gt; I'd definitely consider looking into ffvhuff in ffdshow<br />
[21:02:39] &lt;DJGrenola&gt; I use that for everything<br />
[21:02:47] &lt;nate&gt; if it's lossless then it's too big<br />
[21:02:51] &lt;nate&gt; well<br />
[21:02:59] &lt;nate&gt; if it's anything like huffyuv anyway<br />
[21:03:04] &lt;DJGrenola&gt; it's a little smaller than huffyuv is, ~20% or so<br />
[21:03:09] &lt;nate&gt; 3:1 compression for all #000000 is pathetic<br />
[21:03:38] &lt;Radix&gt; have you tried a compressed partition?<br />
[21:04:04] &lt;DJGrenola&gt; :o<br />
[21:04:10] &lt;nate&gt; nope ... but do you really think blind compression i.e. not knowing it's compressing video will do a whole lot<br />
[21:04:19] &lt;DJGrenola&gt; that's a clever idea<br />
[21:04:27] &lt;nate&gt; certainly can't be more than the 3:1 the shit lossless ones get<br />
[21:04:32] &lt;Radix&gt; i dunno, zip compress a lossless avi and compare to huffyuv<br />
[21:04:51] &lt;Radix&gt; huffyuv was built for speed, not compression ratio<br />
[21:06:33] &lt;nate&gt; ok making a test file<br />
[21:06:39] &lt;Radix&gt; also try zip compressiong a huffyuv avi<br />
[21:06:45] &lt;Radix&gt; preferrably the same one i guess :-p<br />
[21:26:26] &lt;nate&gt; ok this is pal d1 f1<br />
[21:26:44] &lt;nate&gt; samus wearing the varia fusion suit kills the sheegoth and gets the wave beam, then leaves c.i.temple<br />
[21:33:30] &lt;nate&gt; clip is about 34 seconds long</p>

<p>1.9G    test_rgb24.avi<br />
924M    test_rgb24.avi.zip<br />
680M    test_huffyuv.avi<br />
611M    test_huffyuv.avi.zip<br />
467M    test_lagarith.avi<br />
467M    test_lagarith.avi.zip<br />
328M    test_x264.avi<br />
328M    test_x264.avi.zip</p>

<p>[22:02:54] &lt;nate&gt; quantizer 0 x264 avi it is<br />
[22:03:12] &lt;nate&gt; though it seems lagarith would come close<br />
[22:04:32] &lt;nate&gt; xp (10 megabaud) mpeg-2 original from dvd would be just over 42.5 meg<br />
[22:05:10] &lt;DJGrenola&gt; wonder if snow has a lossless mode<br />
[22:19:57] &lt;nate&gt; trying quantizer 1 etc<br />
[22:37:46] &lt;nate&gt; looks like quantizer 1 and quality 1 are similar in size to the quantizer 0<br />
[22:38:01] &lt;nate&gt; so what i'm going to do is no quantizer two pass 10 megabaud and look at the thing closely to see if i can see any artifacts<br />
[...]<br />
[23:13:42] &lt;nate&gt; the difference between the original and 10 megabaud is slight<br />
[23:13:50] &lt;nate&gt; visible ... but not necessarily bad<br />
[23:13:57] &lt;nate&gt; what it did was smooth out some areas<br />
[23:14:03] &lt;nate&gt; typical of h.264 i guess<br />
[23:14:18] &lt;nate&gt; the thing is that a lot of what it smoothed out was actually not supposed to be there in the first place<br />
[23:14:22] &lt;nate&gt; because it was artifacts from mvbob<br />
[23:14:34] &lt;nate&gt; so sometimes the lossy looks better than the lossless <i>(1, 3)</i><br />
[23:16:54] &lt;nate&gt; it's certainly better than mpeg-2!<br />
[23:17:50] &lt;nate&gt; near key frames they're almost identical <i>(2)</i></p>

<p>1: <a href="/blog/1_orig.png">original</a> | <a href="/blog/1_10000.png">10 megabaud 2-pass x264</a><br />
2: <a href="/blog/2_orig.png">original</a> | <a href="/blog/2_10000.png">10 megabaud 2-pass x264</a><br />
3: <a href="/blog/3_orig.png">original</a> | <a href="/blog/3_10000.png">10 megabaud 2-pass x264</a></p>

<p>[23:26:31] &lt;nate&gt; so <a href="/blog/test_x264_10000.avi">10 megabaud 2-pass x264 avi</a> is the new standard nmf<br />
[23:26:35] &lt;nate&gt; hurrah</p>]]>
</content>
</entry>
<entry>
<title>generic.avs grows stronger</title>
<link rel="alternate" type="text/html" href="http://nate.metroid2002.com/blog/archives/2007/03/genericavs_grow.html" />
<modified>2007-06-20T23:17:57Z</modified>
<issued>2007-03-23T05:31:36Z</issued>
<id>tag:nate.metroid2002.com,2007:/blog//1.78</id>
<created>2007-03-23T05:31:36Z</created>
<summary type="text/plain">tonight i finally got automatic (well, almost) d working in generic.avs (the script from which all other sda scripts are created). just set &quot;false&quot; to &quot;true&quot; on line 7 to enable d1 (d4 is default). pal autodetection remains in from...</summary>
<author>
<name>njahnke</name>
<url>http://www.metroid2002.com/</url>
<email>njahnke@gmail.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://nate.metroid2002.com/blog/">
<![CDATA[<p>tonight i finally got automatic (well, almost) d working in <a href="http://nate.metroid2002.com/blog/_generic.avs">generic.avs</a> (the script from which all other sda scripts are created).</p>

<p>just set "false" to "true" on line 7 to enable d1 (d4 is default). pal autodetection remains in from the last version, which i can't remember if i posted here or not. change "false" to "true" on line 23 to enable the statid (after you've finished filling out the trim(), for example).</p>

<p>additionally, you'll need to change all occurrences of "dx" to your project name, which should be the same as your index and ac3 basenames. you also may need to change your drive letter (i use p: for my project drive). finally, watch out for the path to the <a href="http://nate.metroid2002.com/blog/ntsc_d4.PNG">sda</a> <a href="http://nate.metroid2002.com/blog/ntsc_d1.PNG">logo</a> pngs in the statid subroutines (and, obviously, the LoadPlugin()s at the very top!). all the other options from lines 10-19 depend on the input video source and desired output quality.</p>

<p>enjoy!</p>]]>

</content>
</entry>
<entry>
<title>more memory is always better</title>
<link rel="alternate" type="text/html" href="http://nate.metroid2002.com/blog/archives/2007/02/more_memory_is.html" />
<modified>2007-06-20T23:17:57Z</modified>
<issued>2007-02-10T19:25:43Z</issued>
<id>tag:nate.metroid2002.com,2007:/blog//1.77</id>
<created>2007-02-10T19:25:43Z</created>
<summary type="text/plain">big thanks to radix for maxing out v5 with 3 gb (it only had 1 gb before) ram this xmas....</summary>
<author>
<name>njahnke</name>
<url>http://www.metroid2002.com/</url>
<email>njahnke@gmail.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://nate.metroid2002.com/blog/">
<![CDATA[<p>big thanks to radix for maxing out v5 with 3 gb (it only had 1 gb before) ram this xmas.</p>]]>
<![CDATA[<p>i had long suspected that the embarrassing "access violation" errors spewed by avisynth were the result of running out of memory, but this was very difficult to test, as they tended to occur randomly, even under low memory conditions. one of the reasons i suspected it was overshooting while allocating was that on my macbook, now with 2 gb of ram, i didn't see the problem on the same scale as i did on v5. the only alternative was bad ram in both of the machines (since it had happened at least once on both).</p>

<p>i finally uncovered the connection last month during a series of tests i was running for OPERATION ZWEI, an sda-related secret project some members of the sda team are working on right now (expect to see its release sometime this summer). these tests involved extremely memory-intensive avisynth scripts, and i later decided not to accomplish the effect in this way, because the avisynth system is simply broken when it comes to memory allocation (thanks, doom9 guys!). however, this situation afforded me repeated chances to see the exact same "access violation" error pop up -- again, pseudo-randomly -- but this time while watching the task manager intently.</p>

<p>i was able to distinguish two different types of access violation errors -- one thrown when the avisynth mother process reached doze's 2 gb allocation limit and another when the process would attempt to allocate memory beyond the total (3 gb) available to doze. it was at this point that i realized that radix had basically saved m2k2sda from these pesky access violations making their way into final encodes, because under normal conditions i don't use more than 1 gb of ram on v5. surely 2 gb free should be enough for any normal encode to allocate freely without the danger of running over the edge.</p>

<p>and indeed, i haven't seen or heard of a new encode afflicted with the problem since installing the new ram.</p>]]>
</content>
</entry>
<entry>
<title>more automation</title>
<link rel="alternate" type="text/html" href="http://nate.metroid2002.com/blog/archives/2007/01/more_automation.html" />
<modified>2007-06-20T23:17:57Z</modified>
<issued>2007-01-18T04:59:26Z</issued>
<id>tag:nate.metroid2002.com,2007:/blog//1.76</id>
<created>2007-01-18T04:59:26Z</created>
<summary type="text/plain">in the spirit of ballofsnow&apos;s megui-like batch files for sda, i&apos;ve created a similar xvid.bat. this batch uses the vdub.exe command line driver to encode xvid videos loading m1.vcf, m2.vcf and l.vcf -- mq first pass, mq second pass and...</summary>
<author>
<name>njahnke</name>
<url>http://www.metroid2002.com/</url>
<email>njahnke@gmail.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://nate.metroid2002.com/blog/">
<![CDATA[<p>in the spirit of ballofsnow's megui-like batch files for sda, i've created a similar <a href="http://nate.metroid2002.com/blog/xvid.bat">xvid.bat</a>. this batch uses the vdub.exe command line driver to encode xvid videos loading m1.vcf, m2.vcf and l.vcf -- mq first pass, mq second pass and lq third pass, respectively.</p>

<p>the input syntax for this batch varies slightly from the others due to the need to insert LQ in varying places in the filename depending on whether the run is segmented or not. to help me remember it (and to speed up master batch creation), i've also created a <a href="http://nate.metroid2002.com/blog/generic.bat">generic.bat</a>.</p>]]>

</content>
</entry>
<entry>
<title>flickerbat ii</title>
<link rel="alternate" type="text/html" href="http://nate.metroid2002.com/blog/archives/2007/01/flickerbat_ii.html" />
<modified>2007-06-20T23:17:57Z</modified>
<issued>2007-01-18T03:27:05Z</issued>
<id>tag:nate.metroid2002.com,2007:/blog//1.75</id>
<created>2007-01-18T03:27:05Z</created>
<summary type="text/plain">more work on the deflickering problem followed the previous entry....</summary>
<author>
<name>njahnke</name>
<url>http://www.metroid2002.com/</url>
<email>njahnke@gmail.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://nate.metroid2002.com/blog/">
<![CDATA[<p>more work on the deflickering problem followed <a href="http://nate.metroid2002.com/blog/archives/2007/01/flickerbat.html">the previous entry</a>.</p>]]>
<![CDATA[<p>working together through most of the night, grenola and i shot ideas back and forth that culminated in a new avisynth function, nate_retard_bob_2(). this function corrects the "blur polarity" problem discussed at length in the previous entry by maintaining a consistent aspect ratio in clip processing. changing the aspect ratio was resulting in the top half of the output having more or less blur than the bottom half.</p>

<p>additionally, the new function includes a sharpen() invocation to (at least superficially) recover some of the original quality in the output. this trick works best on very clean (i.e. dvd) source material. when used on material that was recorded using vhs, it tends to only draw out the many problems with such a picture.</p>

<p>inspired by this productive night, i streamlined my generic-v.avs (from which all other avisynth scripts for sda are made), collecting some other blocks of interdependent code into functions i can more easily enable and disable as required.</p>

<p>nate_retard_bob_2() is available as a part of <a href="http://nate.metroid2002.com/blog/generic-v.avs">generic-v.avs</a>.</p>]]>
</content>
</entry>
<entry>
<title>flickerbat</title>
<link rel="alternate" type="text/html" href="http://nate.metroid2002.com/blog/archives/2007/01/flickerbat.html" />
<modified>2007-06-20T23:17:57Z</modified>
<issued>2007-01-13T05:28:48Z</issued>
<id>tag:nate.metroid2002.com,2007:/blog//1.74</id>
<created>2007-01-13T05:28:48Z</created>
<summary type="text/plain">this entry is long overdue. i will now describe in detail what i know about the so-called deflickering problem and present my attempts at solving it to date....</summary>
<author>
<name>njahnke</name>
<url>http://www.metroid2002.com/</url>
<email>njahnke@gmail.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://nate.metroid2002.com/blog/">
<![CDATA[<p>this entry is long overdue. i will now describe in detail what i know about the so-called deflickering problem and present my attempts at solving it to date.</p>]]>
<![CDATA[<p>first, a brief introduction. there is a tendency of interlaced displays to "flicker" when showing rough edges or straight lines. some of you may have noticed this in ties or other articles of clothing with complex patterns worn by news anchors--the patterns will seem to move or jump about rapidly. this is a side effect of the psychological trick interlaced displays use to approximate full motion--what is not moving seems to be moving.</p>

<p>video games suffer from flickering more so than your average tv program because they contain more of the types of material that make flickering obvious, such as straight lines (usually in menus) and rough edges (usually in text). some early attempts at deflickering involved switching the hardware from d4 (half resolution) to d1 (full resolution) when navigating menus. one notable game to do this was metal gear solid. changing to full resolution allows the game console to display different information in each field. flickering is reduced as the jagged edges are reduced. for this reason, some people refer to deflickering as "antialiasing", quite similar in lineage to the methods used to hide "jaggies" from discerning gamers' eyes. (by the way, deflickering can be "experienced" firsthand by entering the super smash bros. melee options and enabling and disabling the option. what looks better on an interlaced scanning display looks worse when it comes to progressive scan.)</p>

<p>there is nothing wrong with games running in full resolution. the missing motion information can be accurately reconstructed with an advanced deinterlacing algorithm such as mvbob(). further, as previously mentioned, "hybrid" games like metal gear solid usually run at f2 (half framerate) outside of menus, so i can simply drop one of the fields to simultaneously deinterlace and de-deflicker in these cases (no mvbob() necessary!).</p>

<p>however, another type of deflickering has recently become much more common with the rise in console emulation (that is, running emulators on consoles). sonic mega collection and the mega man anniversary collection both deflicker their output. they accomplish this by blurring one field a quarter pixel up and the other a quarter pixel down. i have taken pictures of this in action:</p>

<p><img src="http://nate.metroid2002.com/blog/deflicker1.png"> <img src="http://nate.metroid2002.com/blog/deflicker2.png"></p>

<p>the right image occurs one half-frame after the left. that is, each image represents one field. if you turn your attention to the top non-black line in the left picture, you will notice that it is different from the line immediately below it. it is exactly 50% white (or, if you prefer, 50% black!) because it has been blurred with the preceding (black) line. a similar situation can be verified in the second picture by looking at its last non-black line--the only difference is that this time, the picture was blurred down, not up.</p>

<p>material that was once d4 is now effectively d1. as you can imagine, playing back this video without any form of de-deflickering will present an unacceptable level of "bobbing", if you wish to call it that. after pondering this sad situation for many hours, i concluded (with the help of grenola) that the only solution is to blur the down-blurred field up and the up-blurred field down, canceling out the deflickering (thanks go to grenola for this particular method):</p>

<pre>converttorgb32
field1=SelectEven.PointResize(640,480).addborders(0,0,0,1).bilinearresize(320,240)
field2=SelectOdd.PointResize(640,480).addborders(0,1,0,0).bilinearresize(320,240)
Interleave(field1,field2)</pre>

<p>unfortunately, things are not so simple. upon performing this so-called "retard bob" (so dubbed after "smart bob"), one field will seem clearer when it comes to certain objects, while the other will seem clearer when it comes to other objects. the exact cause of this behavior is not yet known, but one theory involves the quite imperfect horizontal analog representations of luma and chroma changes. that is, different brightness levels and colors at the source will produce different levels of blur after deflickering. the problem now moves beyond my ability to correct.</p>

<p>having said that, "retard bob" <i>has</i> improved things significantly:</p>

<p><img src="http://nate.metroid2002.com/blog/deflicker3.png"> <img src="http://nate.metroid2002.com/blog/deflicker4.png"></p>

<p>mega man's energy bar was used as a reference for attempting blur level equalization. however, rush and the cloud maker towers at the bottom of the frame are clearly more blurry in the left (blur compensated) picture than in the right one. this would seem to dictate less blur compensation. however, applying any less blur compensation results in mega man's energy bar coming out of "blur sync" and "flickering" in the final product. this "neo-flickering" (or, if you prefer, "bobbing") is considerably more noticeable at f3 (third framerate) than at f1 (full framerate) for obvious reasons. unfortunately, the divx medium and low quality as well as the h.264 low quality of all 2d runs are encoded at f3 in order to ensure playability on old hardware (can't be f1) as well as to avoid problems with 60 hz blinking in most games (can't be f2). the ability to encode at f2 would neatly solve this entire situation, as i mentioned earlier when discussing metal gear solid, and this is precisely what i did for the recent sonic 3 & knuckles and sonic 1 runs submitted by mike89 (old school sonic is very special in that it contains no salient 60 hz blinking effects).</p>

<p>using gaussresize() i have settled on a "not-so-happy medium" blur (p) of 40:</p>

<pre>converttorgb32
notblurred=SelectEven.PointResize(640,480).addborders(0,0,0,1).gaussresize(320,240,p=40)
blurred=SelectOdd.PointResize(640,480).addborders(0,1,0,0).bilinearresize(320,240)
Interleave(notblurred,blurred)</pre>

<p>("notblurred" refers to the field needing blur compensation based on mega man's energy bar.)</p>

<p>however, as shown and explained above, some "neo-flickering" or "bobbing" will be visible no matter the blur compensation. for this reason, i am recommending that emulation be completely avoided when recording speed runs. as previously discussed, there are exceptions, mario 64 and similar 3d games constituting one such class (because the games run at d4 f2, i can simply drop one of the fields to neatly solve the problem).</p>

<p>concluding, i wish to mention that all game boy advance games played using the game boy player suffer from deflickering. i have employed many solutions over the years, including old school "retard bob" in virtualdub (even field quarter scanline up, odd field quarter scanline down in the "field bob" filter) and even mvbob. however, because virtually all gba games run at f1, none of these solutions is optimal for the above explicated reasons. the jury is still out on deflickering.</p>]]>
</content>
</entry>
<entry>
<title>codecs++;</title>
<link rel="alternate" type="text/html" href="http://nate.metroid2002.com/blog/archives/2006/11/codecs.html" />
<modified>2007-06-20T23:17:57Z</modified>
<issued>2006-11-11T19:20:18Z</issued>
<id>tag:nate.metroid2002.com,2006:/blog//1.73</id>
<created>2006-11-11T19:20:18Z</created>
<summary type="text/plain">joining me this month are the windows build of xvid from koepi.org and a patched ffmpeg build that transcodes to flv....</summary>
<author>
<name>njahnke</name>
<url>http://www.metroid2002.com/</url>
<email>njahnke@gmail.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://nate.metroid2002.com/blog/">
<![CDATA[<p>joining me this month are the windows build of xvid from <a href="http://koepi.org/xvid.shtml">koepi.org</a> and <a href="http://sh0dan.blogspot.com/2006/09/command-line-flash-8-flv-encoding.html">a patched ffmpeg build that transcodes to flv</a>.</p>]]>
<![CDATA[<p>completely replacing divx with this build of xvid (as recommended by <i><b>djgrenola</b></i>) has finally liberated me from the long-standing <a href="http://forums.virtualdub.org/index.php?s=5e249b1858966a012dc2d619e95aa1f9&act=ST&f=2&t=10777">vdub randomly closing problem</a>. i don't know why it didn't occur to me to try xvid earlier, actually--i guess i was convinced i would lose <i>something</i> in the process of moving over, but that has not happened as far as i can tell. indeed, sda users have been watching xvid-encoded mq and lq avi for a while now without reporting any problems, so i have to consider this codec replacement a resounding success.</p>

<p>the new flv creation process recommended by <i><b>mike hearn</b></i> is still under evaluation, but i am encouraged by its fruits thus far. the only major sticking point for me has been that it demands that the input video be upside-down (flipped vertically), and so i must create a distinct .avs file for flv encoding now (as opposed to just using the mq mp4's), but this is really quite minor compared to never again getting shot down by one of the macromedia flash video encoder's myriad avs input bugs or having to set the video and audio bitrate every time i reboot the machine or wondering how much better quality/smaller of a file i could make had i multipass encoding--and i could go on.</p>

<p>the divx codec and the macromedia flash video encoder were dragging me down without a doubt, and i am grateful to the community for their continued support of my work.</p>]]>
</content>
</entry>
<entry>
<title>destiny</title>
<link rel="alternate" type="text/html" href="http://nate.metroid2002.com/blog/archives/2006/11/destiny.html" />
<modified>2007-06-20T23:17:56Z</modified>
<issued>2006-11-04T06:00:36Z</issued>
<id>tag:nate.metroid2002.com,2006:/blog//1.72</id>
<created>2006-11-04T06:00:36Z</created>
<summary type="text/plain">i like how i don&apos;t have to question anymore whether or not i&apos;m really dedicated to sda--obviously, if i weren&apos;t dedicated, i wouldn&apos;t still be here....</summary>
<author>
<name>njahnke</name>
<url>http://www.metroid2002.com/</url>
<email>njahnke@gmail.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://nate.metroid2002.com/blog/">
<![CDATA[<p>i like how i don't have to question anymore whether or not i'm really dedicated to sda--obviously, if i weren't dedicated, i wouldn't still be here.</p>]]>
<![CDATA[<p>of course, that's a positivist view. if i decided tomorrow that sda was not for me anymore, then suddenly i wouldn't look so dedicated, after all. but i like to force myself into the probably more realistic viewpoint that every second i spend working on sda means i'm that much more "into it".</p>

<p>things have been exciting around here lately. i'm sure y'all have noticed grenola and mike doing updates, and indeed, they are together doing the entire update process now, leaving radix to watch over his creation like a proud father and to occasionally yell, "no, no, you're doing it all wrong!" mike responds to runners, no matter how annoying, with super speed, and grenola has made short work of automating much of the remaining parts of the sda updating process. it's safe to say sda is operating better than never, ever before.</p>

<p>on the home front, i am very pleased with my new dvd recorder, an lg dr1f9h (say that five times fast!). media compatibility is far better than with my old panny, and as an added bonus, the lg writes dvd+rw without the need for a finalization step. that means that i went from using isobuster to raw read the vobs off of every dvd i recorded (because all the media i bought was incompatible with the panny) to not even needing to finalize the disc to take the vobs directly off of it in v5. and on top of all of that, the title corruption bug that precipitated "<a href="http://nate.metroid2002.com/blog/archives/2006/08/katamari_hell.html">katamari hell</a>" is nonexistent. good deal for only $200.</p>

<p>the lg has tons of other crazy features i'll probably never use (like dv in and hdmi out), but i think it's a good sign that i'm getting all these earmarks of a high-end dvd recorder at only $200 while over at walmart cheap (but still perfectly good) dvd recorders are down below $100. it's never been clearer to me that my prediction of dvd recorders meeting and then beating vcr prices will happen by this coming summer. that's significant, of course, because i plan to phase out my free vhs capture service at that time. the reason is because i must help the quality of the videos on the site in any way i can, and if that means coercing people into buying dvd recorders, then so be it. at $40 a pop they'll be less expensive than a single next generation game.</p>

<p>i'd like to take this opportunity to thank tom batchelor for his continued monetary support of sda. clearly he's not the only generous one around here, but he is obviously the one with the most money, and i appreciate his confidence in me and my operation. when other people believe in you, you often find a way to make things happen regardless of whether you share their confidence.</p>

<p>i will keep it coming.</p>]]>
</content>
</entry>
<entry>
<title>vm heaven</title>
<link rel="alternate" type="text/html" href="http://nate.metroid2002.com/blog/archives/2006/09/vm_heaven.html" />
<modified>2007-06-20T23:17:56Z</modified>
<issued>2006-09-05T16:37:55Z</issued>
<id>tag:nate.metroid2002.com,2006:/blog//1.62</id>
<created>2006-09-05T16:37:55Z</created>
<summary type="text/plain">with the help of parallels desktop for mac, i&apos;ve successfully doubled my studio&apos;s cpu capacity. running windoze xp as a guest os inside the virtual machine on my macbook, i appear to be encoding using x264 with little to no...</summary>
<author>
<name>njahnke</name>
<url>http://www.metroid2002.com/</url>
<email>njahnke@gmail.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://nate.metroid2002.com/blog/">
<![CDATA[<p>with the help of <a href="http://www.parallels.com/">parallels desktop for mac</a>, i've successfully doubled my studio's cpu capacity. running windoze xp as a guest os inside the virtual machine on my <a href="http://nate.metroid2002.com/blog/archives/2006/05/macbook.html">macbook</a>, i appear to be encoding using x264 with little to no speed penalty. (windoze is essential to my encoding process because, among other reasons, i am dependent on avisynth and its filters, specifically mvbob().)</p>]]>
<![CDATA[<p>the software is $80 us, but i'm using their free 14-day trial right now (a wise business decision on their part, to offer said trial -- who in their right mind would purchase such expensive software without definitive proof beforehand that it does what they want?). running windoze on my macbook before was never very productive, and mostly consisted of me playing civilization iv. i had virtually no space left on the cramped internal drive for it, and my 250 gig external drive is formatted hfs+, so windoze couldn't even read it. of course, with a virtual machine, the "drive" is just a file, making the host machine's filesystem irrelevant.</p>

<p>this situation (sda annexing the macbook) became necessary when i realized how vastly superior -- and therefore essential -- the mvbob() deinterlacing filter was to its alternatives. with v5 completely tied up making huffyuv <a href="http://nate.metroid2002.com/blog/archives/2006/02/revolution_to_t.html">new master files</a> of the large amount of d1 f1 runs that have come in recently, i simply needed more cpu power to work on actually <i>encoding</i> those files v5 was creating, lest i find myself still working on the same runs two weeks later, while others continue to flood in.</p>

<p>the setup isn't perfect. for one thing, the parallels "network adapter" seen by windoze xp is only 10 megabaud. this means that the huffyuv compression is just not sufficient to get the d1 f1 file over the network from v5 fast enough to saturate the macbook's cpu. however, i'm seeing about 80% average cpu use on the macbook with d1 encodes, so that's really no big problem. also, because the machine can encode mq and lq (d4) stuff more quickly than the d1 hq and iq, the cpu use goes down for those jobs, the fans spin down, and the machine gets a network-bottleneck-supplied respite from the heat. i believe that this is important, because the model of macbook i own has been shown to have a heat problem coming from a thermal paste application oversight on apple's part. i would fix the paste, but i would void my applecare warranty.</p>

<p>here's a <a href="/blog/vm.png">screenshot</a> for your viewing pleasure. note that one of the two "c" drives mounted on the os x desktop is in fact the virtual machine's c: "drive" (as broadcast via smb). transferring files back and forth is made quite easy in this way.</p>]]>
</content>
</entry>
<entry>
<title>katamari hell</title>
<link rel="alternate" type="text/html" href="http://nate.metroid2002.com/blog/archives/2006/08/katamari_hell.html" />
<modified>2007-06-20T23:17:56Z</modified>
<issued>2006-08-24T01:51:58Z</issued>
<id>tag:nate.metroid2002.com,2006:/blog//1.60</id>
<created>2006-08-24T01:51:58Z</created>
<summary type="text/plain">over the past week or so i have been trying unsuccessfully to capture and encode the latest runs on the katamari damacy series of games....</summary>
<author>
<name>njahnke</name>
<url>http://www.metroid2002.com/</url>
<email>njahnke@gmail.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://nate.metroid2002.com/blog/">
<![CDATA[<p>over the past week or so i have been trying unsuccessfully to capture and encode the latest runs on the katamari damacy series of games.</p>]]>
<![CDATA[<p>the fun started when i received a large number of tapes, perhaps between twenty and thirty of them. each tape had between one and about four or five unique runs on it. in most cases these runs were no more than two or three minutes in length. the runs were also most often scattered throughout the tape.</p>

<p>i decided to immediately (on capture) follow the instructions sent by the runners and locate each run on its tape, recording with the dvd recorder only those important parts of each tape. thus, i would use only a handful of dvds to capture the entire project, rather than the matching twenty or thirty discs to twenty or thirty tapes. this would be my first major mistake.</p>

<p>radix came calling a few days later repeating a verifier report of extreme audio desync in the verification copies of the katamari material. i was shocked and appalled, but not nearly as much as i would have been had i not already had a hell of a week trying desperately to keep the requested old material flowing into the flash encoder (but that's another story). one more thing going wrong seemed almost like the natural flow of things.</p>

<p>i quickly determined that the audio started out in sync, but actually became progressively earlier as each disc wore on. i had seen this before when i had tried to index at the same time multiple vobs created at different times, but this couldn't be the case now - the vobs were all part of the one large whole my dvd recorder seems to like to write to the disc (for all discs regardless of length or content, it writes five equal sized vobs together representing all of the material on the disc).</p>

<p>the only other viable explanation meant that i would have to somehow correct audio desync caused by so-called "title" breaks, or breaks inserted when i would press stop and then later record again on the dvd recorder to capture another run.</p>

<p>i began to experiment with various pieces of software (vob2mpg, etc) trying to change the format of the vobs so that dgindex could successfully compensate for the title breaks. none of my experiments were successful, and so i created <a href="http://forum.doom9.org/showthread.php?t=114946">this thread</a> at doom9. as a side note, my very favorite thing about using open source software is that, in cases of technical questions about the software, the author him- or herself is on hand not only to answer said questions faithfully, but also to recommend different software if the present software cannot do the job.</p>

<p>i followed neuron2's advice and used projectx (an impressive piece of work, by the way) on the katamari vobs. this produced vobs which, when indexed with dgindex, had in-sync audio!</p>

<p>but there was a problem - to make a long story short, it turned out projectx had actually deleted sections of the video to keep the audio in sync. besides being totally unacceptable from a speed running standpoint, this also caused me to have to completely remark the coordinates of all fifty something segments once again in order to get proper verification copies out to the verifiers.</p>

<p>unfortunately, i was not aware of the frame dropping issue introduced by projectx until a verifier reported it to me.</p>

<p>at this point i wondered whether i shouldn't have simply bitten the bullet and used all thirty something dvds to recapture the entire project without using more than one "title" per dvd. i immediately started recapturing the first tape in this way.</p>

<p>then i had an idea: why not get my old dvd player out (bought to test sda dvds before i sent them out way back when) and use it to make an analog copy of the dvds with the corrupted timestamp information? the resulting analog copies would be slightly inferior in terms of video quality (being mpeg-2 compressed twice), but they would each consist of only one title, eliminating all of my problems processing the material. i got out my old dvd player and began the copying process, switching over to a new spindle of dvd-rs.</p>

<p>then i found out that the new dvd-rs are incompatible with my dvd recorder.</p>

<p>at first i didn't want to believe it, because every type of high speed verbatim media i had bought before had been compatible. but all the signs were there: the long finalization process and the single, tiny vob and accompanying table of contents file that resulted.</p>

<p>not wanting to slap down $40 for new media that day, i went to take out my old dvd-rws with poor compatibility i had used with limited success in the early days of the dvd recorder.</p>

<p>but before i could attempt to copy the original katamari dvds again, i again had a thought: why not simply raw read the entire "incompatible" disc and scan the data thereon for vob headers? assuming the dvd recorder wrote the vobs in place (and being write-once media, i could imagine no differing scenario), i knew i would be able to recover the captured video regardless of the mangled table of contents file (created so because the dvd recorder couldn't read properly the media it had just written to). i had already done this once a few months before for <a href="http://www.metroid2002.com/forum/viewtopic.php?t=5072">kridly</a> using simple unix software written by djgrenola for that sole purpose.</p>

<p>this time, though, i decided to check out ballofsnow's "recovering data from unfinalized dvds" links, and in them i found the wonderful windoze program, isobuster. this program was so impressive to me (it duplicated under doze the functionality and flexibility of grenola's work without any of the manual labor that had been required with the command-line unix version of the recovery process) that i bought it ($30 us) on the spot when it asked for a registration code to complete recovery of the vobs. i figured that it was a good deal, as another spindle of dvds would cost me at least $30, and isobuster would remove in a user-friendly fashion on the encoding machine the need to have compatible media for my dvd recorder.</p>

<p>with a viable capture process notwithstanding the incompatibility of my media i finished making analog copies of the original katamari dvds with corrupt timestamp information.</p>

<p>i next tried for several hours to create a script to "realign" the segment coordinate information from either the original capture attempt or the vobs as "repaired" by projectx. (i was trying to avoid having to mark all of the segment breaks for a third time.) this was my second major mistake, as after several hours of completely fruitless effort, i discovered that the corruption of the timestamps produced desync at every title break that not only was not linear in its growth - it actually <i>went backwards</i> (became more in sync) some of the time, completely destroying the viability of an automated realignment.</p>

<p>so i set out to mark all of the segment breaks a third time. it turned out that the timestamp corruption had also somehow caused entire runs to "slip through the cracks" in the previous encoding attempts - on the second disc alone, i have now marked over twice as many segments as the disc originally appeared to contain. how this is possible i am not sure, as i remember checking the output of the vobs with corrupted timestamps several times, and every time it totaled something reasonable, something just under two hours in length ...</p>

<p>lessons learned from this fiasco are many (i no longer have to have media compatible with my dvd recorder to capture, for one), but i still get the feeling that i in fact traded one lousy situation (capturing with the all-in-wonder) for a much more lousy situation (capturing with the dvd recorder). for example, it will be necessary in the future in the case of a thirty-tape project to use thirty dvds to capture the material.</p>

<p>the quality <i>is</i> better now, and perhaps that should be all that matters in the end - but i find myself time and time again in situations where i have to spend several days "learning my way out of a wet paper bag" as it were. this isn't rocket science, but without the necessary experience, people are just going to be totally screwed when they try to do this stuff themselves - especially if they get a dvd recorder as retarded as mine in this area (and mine is still recommended in the dvd recorder thread in the sda forum!).</p>

<p>one day this community will be delivered from this sorry state of technological affairs.</p>

<p>that day is not today.</p>]]>
</content>
</entry>

</feed>