How to create triple screen layouts on your videos (Windows)

Greenalink
Posts: 30
Joined: Sat Sep 22, 2012 12:04 pm

How to create triple screen layouts on your videos (Windows)

Post by Greenalink » Sat Sep 22, 2012 2:25 pm

With a forum dedicated to direct feed (3)DS footage, I might as well post some tips in producing good videos.

This post will show how to make a decent 3DS video without advance video editing software like Adobe Premiere Pro & Sony Vegas.
SM3Dlandshot.jpg
Sample of my triple screen layout.
SM3Dlandshot.jpg (149.12 KiB) Viewed 12224 times
First of all, you'll need to download

Anri-Chan, this should include Virtualdub as well Anri-Chan only works on Windows atm)
http://kb.speeddemosarchive.com/Anri-chan

and have Avisynth installed
http://www.avisynth.org/


Step one

Install the two programs I've mentioned on what to download.

Step two

Make sure you have a recorded RAW avi and save it in a new folder in the the Anrichan MPEG directory
[C:\AnrichanMPEG\NAMENEWFOLDER]

Step three
Run Anri-Chan

Anri-Chan commands:

* Select number 2 by typing 2 to start a new project

* Type in a name of your project.
In this case my video was called "World82" as a reference to the screenshot sample on this page.

This project will create a folder that is automatically saved to your Desktop.

Now these questions are taken from anri-chan, so my answers will be in blue

Is this PC recorded from screen capture software, or simply a non-console run?
Yes

Anri-chan will now ask you if you want to trim unwanted content off the video, If you wish to answer 'y', if not answer 'n'.

NOTE: To trim unwanted content, enter in a starting frame and an ending frame for each section. Each section is continuous. Such that if you end Range#1 at frame 1882 and start Range#2 at frame 2480, then the movie will play as if 2480 was right after 1882, cutting out the middle frames. You can have as many ranges as you need. Enter in 'n' when you are done. Virtual Dub will be opened to help you select the frames you wish for this process.

Set the Aspect Ratio

For the triple screen layout it's 1200/480

Open crop settings.

No

Station ID

This is used for speed runners submitting their published videos to Speed Demos Archive, a station ID is the information you'll see at the very start & end of the video, it's pretty much not required for video makers who uploads a LP or a small video such as a trick or a blooper to Youtube. So it's mostly no to this answer.

Do you want to encode these settings?

Yes, however if you choose no, you'll have to go back to the start asking if the video was PC recorded or a DVD/analogue capture card recording.

Your settings has been saved to job_PROJECTname.bat to resume the project double click that file.

Basically this setting is used if you want to start encoding the video much later on without having to answer the previous questions. If you want to encode the video as soon as possible, then answer Yes.

Read carefully here
Now comes to the quality settings. Now minimize Anri-Chan and open up the project folder (my one was World82) from your Desktop.

Find the project name_HQ file, my one is "World82_HQ". Open this file up with Notepad.

You'll usually see something like this:

Code: Select all

import("C:\Program Files\anrichan3.3\plugins\plugins.avs") 
import("World82_source.avs")
converttoyuy2
trim(19881,24485)
sourcewidth=last.width
sourceheight=last.height
DAR=1200./480 * float(last.width)/last.height * float(sourceheight)/sourcewidth
prenmfrate=last.framerate
Try{import("World82_source_nmf.avs")
nmf=true}catch(err_msg){nmf=false}
last.height > 700 ? (last.width > 480 * DAR ? lanczos4resize(sda_even(round(480 * DAR)),480) : lanczos4resize(last.width,480)) : (last.width > last.height * DAR ? lanczos4resize(sda_even(round(last.height * DAR)),last.height) : NOP)
last.height % 2 == 1 ? AddBorders(0,0,0,1) : NOP
last.width % 4 <> 0 ? AddBorders(floor((4 - last.width % 4) / 2.), 0, ceil((4 - last.width % 4) / 2.), 0) : NOP
changefps(prenmfrate/1)
statid=nate_statid(last,"\n\n\n","","")
statid=statid.AddBorders(int((statid.width * float(1200*statid.height)/float(480*statid.width) - statid.width) / 2.), 0, int((statid.width * float(1200*statid.height)/float(480*statid.width) - statid.width) / 2.), 0).Lanczos4Resize(statid.width,statid.height)
changefps(last.framerate)
assumeframebased
Now below that I insert these lines to tweak the video.

import("C:\Program Files\anrichan3.3\plugins\plugins.avs")
ChangeFPS(30)

miniScreens = last
upperScreen = Crop(0,0,400,240).BilinearResize(800,480)
lowerScreen = Crop(0,240,400,240).PointResize(800,480)

mainScreen = upperScreen

# If you want to switch the main screen display, write something like the following line instead:
# mainScreen = lowerScreen.Trim(0,630)+upperScreen.Trim(631,1414)+lowerScreen.Trim(1415,Framecount-1)

mainScreen.Stackhorizontal(miniScreens)

# Framerate reduction, if needed: ChangeFPS(FrameRateNumerator, FrameRateDenominator*2)
# If you want to blend every 2 frames, instead: AssumeFieldBased.Weave.VerticalReduceBy2
Subtitle("Greenalink",1094,215,first_frame=0,last_frame=200000, font="comic sans ms", size=30,text_color=$66FF00,lsp=10)
ConvertToYV12()



# If you want to switch the main screen display, write something like the following line instead:
# mainScreen = lowerScreen.Trim(0,630)+upperScreen.Trim(631,1414)+lowerScreen.Trim(1415,Framecount-1)


These two lines means that it's possible to change the giant left screen by showing either the top/3D screen and the touch screen. This script is VERY useful for games that changes the main screen focus for example Ocarina of Time 3D's Gameplay uses the upperscreen code and the item select should use the lowerScreen code.

A rough example would be like this

mainScreen = Upperscreen.Trim(0,630)+Lowerscreen.Trim(631,1414)+Upperscreen.Trim(1415,Framecount-1)

Here assuming the made video is 30fps, The giant left screen shows the upperscreen for exactly 21 seconds, then on the next frame it shows the lower screen that lasts for 26.1 seconds, then if you have a last screen change (Top screen for the rest of the video) then put (X,Framecount-1) assuming X is any number.

Subtitle("Greenalink",1094,215,first_frame=0,last_frame=200000, font="comic sans ms", size=30,text_color=$66FF00,lsp=10)
ConvertToYV12()


This line enables me to add simple text onto the video, in this case a simple watermark. Unfortunately I haven't figured out how to insert actual logos without the white background on Avi-Synth, I know it's possible on virtualdub.

upperScreen = Crop(0,0,400,240).BilinearResize(800,480)
lowerScreen = Crop(0,240,400,240).PointResize(800,480)

PointResize simply upscales the image, some viewers says it's better for 2D sprite based games like Mighty Switch Force.
BilinearResize not only upscales but makes the visuals less jagged, some viewers says it's better for 3D polygon based games like Super Mario 3D Land.

With the majority of the 3DS games focusing on the top screen, you'll be using this script sample a lot.

ChangeFPS(30)

I use this IF:

* You are planning to upload this video only onto Youtube, especially if the AVI raw was 60fps
* You used FRAPS to record the original AVI raw. Yeah FRAPS cannot record accurately if it is set to 30, so any 3DS recording via FRAPS will need to be set to 60FPS, make sure you have a huge space of memory as you use up ~30GB after 45 minutes of recording.

Once you have done it, save this file, then bring back up Anri-Chan that you've minimized before the edits.
Remember that you've opened up & updated the HQ version of the project file (project name_HQ), so this means that you have to say no (n) on both Low and Medium Quality questions, then say yes (y) on the High Quality question, this encodes the 3DS video with a triple screen layout and other edits thanks to the tweaks we did on the project name_HQ document.

I'll tweak this page later to make it tidier, etc.

Greenalink
Posts: 30
Joined: Sat Sep 22, 2012 12:04 pm

Re: How to create triple screen layouts on your videos (Wind

Post by Greenalink » Sat Sep 22, 2012 2:28 pm

Post reserved for making a triple screen layout of DS games that were recorded from a 3DS.

User avatar
triple_lei
Posts: 184
Joined: Fri Oct 12, 2012 3:42 am
Location: Los Angeles, California
Contact:

Re: How to create triple screen layouts on your videos (Wind

Post by triple_lei » Tue Oct 16, 2012 2:24 am

I don't know about you but I find I have to include this in my scripts:

DelayAudio(0.166)

There's a teeny tiny delay between the 3DS screen and the display on my computer, so I use DelayAudio to compensate.

I got the 0.166 figure by finding the difference between the times in VirtualDub, but it checks out with the in-game timer in Tetris Party Deluxe.

Note: I use Fraps to record at 60 fps, so your mileage may vary...
Attachments
3DS-DelayAudio1.jpg
in game: right is pressed, according to the audio
3DS-DelayAudio1.jpg (147.91 KiB) Viewed 11933 times
3DS-DelayAudio2.jpg
capture program: the piece shifts 10 frames later (60 fps)
3DS-DelayAudio2.jpg (147.87 KiB) Viewed 11933 times

User avatar
triple_lei
Posts: 184
Joined: Fri Oct 12, 2012 3:42 am
Location: Los Angeles, California
Contact:

Re: How to create triple screen layouts on your videos (Wind

Post by triple_lei » Sun Nov 18, 2012 8:48 am

After lots of testing, I was able to finally crunch the numbers to come up with an AviSynth script similar to what Greenalink does.

Code: Select all

c1=AviSource("I:\3ds_capture 2012-11-16 22-02-01-01.avi").Crop(40,0,-40,-240).DelayAudio(0.166).Trim(47868,54951)
c2=AviSource("I:\3ds_capture 2012-11-16 22-02-01-01.avi").Crop(40,240,-40,0).DelayAudio(0.166).Trim(47868,54951)

StackHorizontal
    \(
    
        \c1.Lanczos4Resize(854,640).AddBorders(0,40,0,40, color=$000000),
        
        \StackVertical
            \(
                \c1.Lanczos4Resize(426,320).AddBorders(0,0,0,40, color=$000000),
                \c2.Lanczos4Resize(426,320).AddBorders(0,40,0,0, color=$000000)
            \)
        
    \)
Later I'll explain exactly what I wanted from this script, but for now I'll just say: For Contra 4 at least, with the screens blown up as big as they were so as to fit in a 1280x720 frame (426x320 for each screen), keeping the original 4:3 aspect ratio, and adding allowing for a gap, the gap here is 80 pixels. I took screenshots in a certain area and measured the pixel distances in GIMP.
Attachments
3DS - DS view priority.jpg
3DS - DS view priority.jpg (135.13 KiB) Viewed 11690 times
Last edited by triple_lei on Mon Jan 14, 2013 7:02 pm, edited 1 time in total.

TheWon
Posts: 13
Joined: Mon Jan 07, 2013 10:18 pm

Re: How to create triple screen layouts on your videos (Wind

Post by TheWon » Thu Jan 10, 2013 5:25 am

Keep them coming guys very happy for people like me. Who just know how to turn a computer on and off! LOL Thanks!

TheWon
Posts: 13
Joined: Mon Jan 07, 2013 10:18 pm

Re: How to create triple screen layouts on your videos (Wind

Post by TheWon » Sun Jan 13, 2013 10:39 pm

"The procedure entry point wmemcpy_s could not be located in the dynamic link library MSVCR100.dll."

I seem to have a problem when trying to create the video.
I keep getting this error
avs2pipe error avs files return value is not a clip
missing operand
missing operand
< was unexpected at this time.
Any ideas?

User avatar
triple_lei
Posts: 184
Joined: Fri Oct 12, 2012 3:42 am
Location: Los Angeles, California
Contact:

Re: How to create triple screen layouts on your videos (Wind

Post by triple_lei » Mon Jan 14, 2013 5:45 pm

I don't know what kind of error that is (not without seeing your avs script, anyway)...

Did you install Xvid4PSP? That's what I use to encode, and it should install AviSynth for you. I just load my script right in the program and then encode.

TheWon
Posts: 13
Joined: Mon Jan 07, 2013 10:18 pm

Re: How to create triple screen layouts on your videos (Wind

Post by TheWon » Mon Jan 14, 2013 6:23 pm

Xvid4PSP?
I will have to find this and try it. Is there a certain why I need to install this do I use it instead of Anri-Chan?

Triple if you see this I have the software, and it seems it may work. The problem is I have no idea how to write a 3 screen script for this software. Will Green's code work or will I need to use yours, and how?
Thank You

User avatar
triple_lei
Posts: 184
Joined: Fri Oct 12, 2012 3:42 am
Location: Los Angeles, California
Contact:

Re: How to create triple screen layouts on your videos (Wind

Post by triple_lei » Mon Jan 14, 2013 7:04 pm

Well I can't help you with Anri-chan... I never used it myself. I was just writing my AviSynth scripts from scratch. It's kinda hard to use if you're just starting out, but if you copy that code I posted before and replaced it with your own video and trim points, you should be good.

When I want to output the final video, I load the script in Xvid4PSP and encode it with the Xbox 360/PS3 setting. Xvid4PSP is just the encoder and AviSynth is the editor. You're going to want AvsPmod to write/edit/preview, and VirtualDub probably wouldn't hurt too.

I guess I could make my own guide of sorts in a new thread...

TheWon
Posts: 13
Joined: Mon Jan 07, 2013 10:18 pm

Re: How to create triple screen layouts on your videos (Wind

Post by TheWon » Mon Jan 14, 2013 7:07 pm

triple_lei wrote:Well I can't help you with Anri-chan... I never used it myself. I was just writing my AviSynth scripts from scratch. It's kinda hard to use if you're just starting out, but if you copy that code I posted before and replaced it with your own video and trim points, you should be good.

When I want to output the final video, I load the script in Xvid4PSP and encode it with the Xbox 360/PS3 setting. Xvid4PSP is just the encoder and AviSynth is the editor. You're going to want AvsPmod to write/edit/preview, and VirtualDub probably wouldn't hurt too.

I guess I could make my own guide of sorts in a new thread...
That would be great! Or if you ever have the time. A script that is just 2 screens. The top, and bottom side by side. I don't really need 3 screens, but I do want the bottom screen view able. Thank You for your help!

Post Reply