Posts for creaothceann


creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Then you'd need command-line knowledge and a different container (.mkv/.mp4)...
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
  • get and install Lagarith or the CamStudio codec
  • start emulator
  • set audio sample rate to 48kHz
  • load game & pause emulator
  • start AVI recording (select file (e.g. 00.avi) and codec)
  • select "play movie" and load the file
  • unpause & wait until TAS & ending is finished
  • stop AVI recording
  • edit .avi in VirtualDub if necessary ("Video|Direct Stream Copy")
  • convert video to h264 and audio to MP3 (e.g. via x264vfw & LAME ACM codec & VirtualDub) ("Video|Fast Recompress" & "Streams|Stream List|" + right-click stream + "Full Processing Mode" + right-click + "Compression" + select "Lame MP3" and bitrate, e.g. 256kbps)
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
arkiandruski wrote:
After watching the first video of the youtube encode, I would like to ask if at all possible that that commentary be added to the final encode.
There could even be a "director's commentary" included in the SMV file format, which is then displayed at the specified times. Of course the easier option would be to just create an .ass file that can be applied to the encode, either via hardsub (VSFilter.TextSub) or softsub.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
First of all I'd half the resolution to 400x300, for hard-to-compress videos it'd be justified unless there's important details like text. Then just adjust the h264 bitrate/rate factor to get a comfortable file size, and the preset to get a comfortable encoding time.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
I did get that error at first, but now it's working for me...
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Last time this came up byuu said 315/88*6000000 / 1364 / 262, which is 60.098477556112263192919547153838. 315/88*6000000 = 21477272.72(72...) is the master clock frequency, 1364 is the number of master clock cycles per scanline, 262 is the number of scanlines per frame.
Post subject: Re: Morbid curiosity led me to 4chan
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Vykan12 wrote:
Worst minute of my life. I want it back.
Try /u/.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
partyboy1a wrote:
Does it actually help to have all layers separated from each other?
No, because it's not possible to stitch them back together exactly like the hardware does.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
YV12 has half the color resolution. Do you want to encode in RGB?
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
nanogyth wrote:
What is the arm-pumping? Part of the running animation?
It's when Samus points up or down every other frame. ("arm pumping" may be just my term) EDIT: I just encoded the Super Metroid test video above with HalfWink, and it looks very good (except for the blinking stars; I'd suggest an encoder would use the normal TASBlend for these sections). So, would anybody object to have these functions be made official as TASBlend_blur and TASBlend_HalfWink? (names not final)
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
New function on doom9: http://forum.doom9.org/showthread.php?p=1524289#post1524289 Unfortunately it seems to not detect much of Samus' arm-pumping, at least with the tweaking as-is.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
It's Lagarith.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
If HD is for Youtube quality reasons then leave it as is, imo. It also loads faster. Otherwise I'd encode at double resolution to compensate for the YV12 quality loss.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
What I found interesting is that shots get sometimes duplicated. :) EDIT: another fun screenshot
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Here's a recording of cpadolf's SNES Super Metroid "any%, glitched", with some edits to keep the file size below 200 MB. Encoded with ZMBV (included with DOSBox & ffdshow), no audio: http://www.mediafire.com/?n4q7bs4nd3d1spw I think nanogyth's algorithm shows the best results:
AVISource("#2223 - cpadolf's SNES Super Metroid ''any%, glitched''.avi").ConvertToRGB32

v1 = TASBlend    .PointResize(512, 448)
v2 =              PointResize(512, 448).ConvertToYUY2.TASBlend_nanogyth.ConvertToRGB32
v3 = TASBlend_Vit.PointResize(512, 448)

StackHorizontal(v1.Subtitle("TASBlend"         ),
\               v2.Subtitle("TASBlend_nanogyth"),
\               v3.Subtitle("TASBlend_Vit"     ))




function TASBlend_nanogyth(clip c)  {
        c
        Assert(!IsRGB, "TASBlend_nanogyth: clip cannot be RGB")
        Interleave(SelectEven.dbz.SelectEvery(4, 0),
        \          SelectOdd .dbz.SelectEvery(4, 1))
}
function dbz(clip c)  {
        super        = c.MSuper(pel=2)
        backward_vec = MAnalyse(super, isb=true)
        forward_vec  = MAnalyse(super, isb=false)
        MFlowFps(c, super, backward_vec, forward_vec, num=60, den=1, ml=100)
}



function TASBlend_Vit(clip c, float "ratio")  { 
        # reduces framerate to 1/2 but leaves flicker effects partly visible 
        # blends frame pairs with alternating opacity (default is 2/3 + 1/3;1/3 + 2/3) 
        # optional "ratio" is the opacity of the first frame out of the four 
        ratio   = default(ratio, 2.0/3) 
        opacity = round(ratio * 257) 
        # blend flicker to half-rate
        c.SelectEvery(4, 1, 0, 2, 3)
        blend = Layer(SelectEven, SelectOdd, level=opacity)
        # determine flicker is a simplistic way - compare each pixel with the previous and next two frames
        similar2   = 1  # how similar current pixel must be to the same pixel 2 frames forwards and backwards
        different1 = 8  # how different current pixel must be from the same pixel 1 frame forwards and backwards
        mask_f2 = Overlay(c, c.SelectEvery(1, 2), mode="difference", pc_range=true).Greyscale.Levels(128 + similar2  , 1.0, 129 + similar2  , 0, 255, false).Invert
        mask_f1 = Overlay(c, c.SelectEvery(1, 1), mode="difference", pc_range=true).Greyscale.Levels(128 + different1, 1.0, 129 + different1, 0, 255, false)
        mask_b1 = Overlay(c, c.SelectEvery(1,-1), mode="difference", pc_range=true).Greyscale.Levels(128 + different1, 1.0, 129 + different1, 0, 255, false)
        mask_b2 = Overlay(c, c.SelectEvery(1,-2), mode="difference", pc_range=true).Greyscale.Levels(128 + similar2  , 1.0, 129 + similar2  , 0, 255, false).Invert
        mask_f  = Overlay(mask_f1, mask_f2, mode="multiply", pc_range=true)
        mask_b  = Overlay(mask_b1, mask_b2, mode="multiply", pc_range=true)
        mask    = Overlay(mask_f,  mask_b,  mode="multiply", pc_range=true).SelectEven
        # only use blend where detected flicker
        Layer(c.SelectEven, blend.mask(mask))
}
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Resizing it to 2x would help a bit with the colors...
AVISource(...)
PointResize(Width * 2, Height * 2)
ConvertToYUY2
Test


function Test(clip c)  {
	Interleave(c.SelectEven.dbz.SelectEvery(4, 0),
	\          c.SelectOdd .dbz.SelectEvery(4, 1))
}
function dbz(clip c)  {
	super        = c.MSuper(pel=2)
	backward_vec = MAnalyse(super, isb=true)
	forward_vec  = MAnalyse(super, isb=false)
	MFlowFps(c, super, backward_vec, forward_vec, num=60, den=1, ml=100)
}
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Why not detect flickering pixels and apply TASBlend only to those pixels? -Vit- posted this code:
function TASBlend(clip c, float "ratio")  { 
        # reduces framerate to 1/2 but leaves flicker effects partly visible 
        # blends frame pairs with alternating opacity (default is 2/3 + 1/3;1/3 + 2/3) 
        # optional "ratio" is the opacity of the first frame out of the four 
        ratio   = default(ratio, 2.0/3) 
        opacity = round(ratio * 257) 
        # blend flicker to half-rate
        c.SelectEvery(4, 1, 0, 2, 3)
        blend = Layer(SelectEven, SelectOdd, level=opacity)
        # determine flicker is a simplistic way - compare each pixel with the previous and next two frames
        similar2   = 1  # how similar current pixel must be to the same pixel 2 frames forwards and backwards
        different1 = 8  # how different current pixel must be from the same pixel 1 frame forwards and backwards
        mask_f2 = Overlay(c, c.SelectEvery(1, 2), mode="difference", pc_range=true).Greyscale.Levels(128 + similar2  , 1.0, 129 + similar2  , 0, 255, false).Invert
        mask_f1 = Overlay(c, c.SelectEvery(1, 1), mode="difference", pc_range=true).Greyscale.Levels(128 + different1, 1.0, 129 + different1, 0, 255, false)
        mask_b1 = Overlay(c, c.SelectEvery(1,-1), mode="difference", pc_range=true).Greyscale.Levels(128 + different1, 1.0, 129 + different1, 0, 255, false)
        mask_b2 = Overlay(c, c.SelectEvery(1,-2), mode="difference", pc_range=true).Greyscale.Levels(128 + similar2  , 1.0, 129 + similar2  , 0, 255, false).Invert
        mask_f  = Overlay(mask_f1, mask_f2, mode="multiply", pc_range=true)
        mask_b  = Overlay(mask_b1, mask_b2, mode="multiply", pc_range=true)
        mask    = Overlay(mask_f,  mask_b,  mode="multiply", pc_range=true).SelectEven
        # only use blend where detected flicker
        Layer(c.SelectEven, blend.mask(mask))
}
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Flygon wrote:
I came up with this idea earlier. My idea involved dumping 32-bit PNG image strips of every layer and then blending the ones when appropriate manually. It isn't perfect, but it's better than doing the whole frame.
There are some problems due to how some consoles render the screen. Here's the table for the SNES:
BGMode  front -> back  condition
-----------------------------------
0        3AB2ab1CD0cd
1        3AB2ab1C 0c   BG3_Top == 0
1       C3AB2ab1  0c   BG3_Top == 1
2        3A 2B 1a 0b
3        3A 2B 1a 0b
4        3A 2B 1a 0b
5        3A 2B 1a 0b
6        3A 2  1a 0
7        3  2  1a 0    EXTBG == 0
7        3  2B 1a 0b   EXTBG == 1


0..3    = sprites with that priority
ABCD    = BG1..BG4 tiles with priority bit == 1
abcd    = BG1..BG4 tiles with priority bit == 0

BGMode  = register $2105 bits 0..2
BG3_Top = register $2105 bit 3
EXTBG   = register $2133 bit 6
Note how layer "B" is drawn in front of layer "2" in BG modes 0 and 1, but not in the others. And games can change the BG mode after each scanline. Also, for some reason sprites with a lower index are always in front of sprites with a higher index, regardless of their priority. So you could have sprite #1 (priority set to 3) on top of BG1, but where sprite #0 (priority set to 0) overlaps sprite #1, only BG1 is visible.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Just saw these comments on Youtube...
MUGG wrote:
So this is the first time I see the blurrying caused by TASblend. I think my simple 25 FPS solution was better since it was almost unnoticeable.
I think 25 FPS just causes too much jerky motion - the less frames omitted, the better. Besides, blur occurs normally too, even on handhelds (e.g. Link's Awakening credits).
Brandon wrote:
I've defaulted to using TASBlend on all of my new encodes regardless to flicker.
If the games don't use 30Hz flicker and if there are no other sprite flickering problems (too many sprites per line) then it's better to just drop every other frame. Looks cleaner and reduces the file size. There's a sample script on the TASBlend page that shows how to apply the effect only to hand-selected sections.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
You need to put yadif.dll in a separate directory, then put "yadif.avsi" into the plugins directory which contains the line
LoadCPlugin("path_to_separate_directory\yadif.dll")
There are some problems with the code though... - it results in a 256x896 clip - Yadiv also works with YUY2, which is slightly better - temp2_1 and temp2_2 are unused - there's no need for an external image
AVISource("00.avi", audio=false)
PointResize(Width, Height * 2)
ConvertToYUY2
src = last

even     = SelectEven
odd      = SelectOdd
MaskClip = Get_BlackWhitePattern(Width, Height)
temp1    = even.Overlay(odd , mask=MaskClip, opacity=0.7).SelectEven
temp2    = odd .Overlay(even, mask=MaskClip, opacity=0.3).SelectOdd
result1  = Interleave(temp1, temp2.SelectOdd).Yadif(order=1).PointResize(256, 896)

src.DeleteFrame(0)
even2    = SelectEven
odd2     = SelectOdd
temp2_1  = even2.Overlay(odd2 , mask=MaskClip, opacity=0.7)
temp2_2  = odd2 .Overlay(even2, mask=MaskClip, opacity=0.3)
result2  = Interleave(temp1, temp2).Yadif(order=1).PointResize(256, 896)

Overlay(result1, result2, mask=StackVertical(MaskClip, MaskClip)).Yadif(order=1)




function Get_BlackWhitePattern(int xRes, int yRes)  {
        BlankClip(10000, xRes, 1, "YUY2", 30, color=$FFFFFF)
        Add_BlackWhiteLines(yRes)
}


function Add_BlackWhiteLines(clip c, int yRes)  {
        return (c.Height==yRes)  ?  c  :  ((c.Height % 2) == 0)  ?  c.AddBorders(0, 0, 0, 1, $FFFFFF).Add_BlackWhiteLines(yRes)
        \                                                        :  c.AddBorders(0, 0, 0, 1, $000000).Add_BlackWhiteLines(yRes)
}
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
partyboy1a wrote:
Someone on IRC had the following idea: take odd lines from frame 1, merge with even lines from frame 2 ---> frame 1 take even lines from frame 3, merge with odd lines from frame 4 ---> frame 2 ... and so on. I tested how it looks like, but it wasn't good. I did the following: take line 1 from frame 1, line 1 from frame 2, line 2 from frame 1, line 2 from frame 2, line 3 from frame 1, line 3 from frame 2, ... -> frame 1 take line 1 from frame 4, line 1 from frame 3, line 2 from frame 4, line 2 from frame 3, line 3 from frame 4, line 3 from frame 3, ... -> frame 2 (blackwhite-test.png is a 1x224 picture consisting of a white pixel followed by a black pixel followed by a white pixel followed by a black pixel ...) That's the AVIsynth code to do that (given the input video is 256x224)
original = AVIsource("test-blend.avi").pointresize(256,448).killaudio()
even = original.selecteven()
odd = original.selectodd()
maskclip1 = ImageReader("blackwhite-test.png",1,10000,30).pointresize(256,224)
maskclip = stackvertical(maskclip1, maskclip1)

temp1 = even.overlay(odd, mask=maskclip, opacity = 0.7)
temp2 = odd.overlay(even, mask=maskclip, opacity = 0.3)
return interleave(temp1.selecteven(), temp2.selectodd())
What do you think about the result for 70% / 30% or the result with 100% / 100% with deinterlacer ?
Is this what the code should look like? Movement looks too jumpy, imo.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Just use the title screen of the game?
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Wasn't that already discussed here? I'd say, if you include the border then display it in 4:3, otherwise 1:1.
creaothceann
He/Him
Editor, Experienced Forum User
Joined: 4/7/2005
Posts: 1874
Location: Germany
Wouldn't you just have to play the translation and do the same storyline actions as in the TAS? This won't help with status messages, but it seems they aren't important for the subtitles anyway.