Guga
He/Him
Joined: 1/17/2012
Posts: 838
Location: Chile
The 3D Games are upscaled to 1920x1440 or are captured directly in 1920x1440? I'm talking about Mupen64, PCSX-rr and PSXjin.
Post subject: Re: 3D Games
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
ThatGugaWhoPlay wrote:
The 3D Games are upscaled to 1920x1440 or are captured directly in 1920x1440?
There are different opinions on this. For PSX, the currently used emulator (PSXjin), only supports native capture. For N64, you can capture at higher resolutions; some people like it, some people don't. For GC/Wii, there are so few accepted runs that there's no established precedent.
Post subject: Reference Frames
Guga
He/Him
Joined: 1/17/2012
Posts: 838
Location: Chile
What the reference frames actually does and help in the encoding?
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
http://en.wikipedia.org/wiki/Reference_frame_%28video%29 Higher than average reference numbers can be helpful with emulator dumps because of the synthetic repetitive nature of the clips.
Post subject: Two-pass encoding
Guga
He/Him
Joined: 1/17/2012
Posts: 838
Location: Chile
Is recommended the use of Multi-pass encoding? Because I heard that is really useful.
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
Only if you want to create small files. For uploading to YT it's probably more useful to just set a constant ratefactor.
Post subject: What is "AR correction"?
Expert player (2573)
Joined: 12/23/2007
Posts: 831
Recently Ilari mentioned that my encode was lack of AR correction. Well I haven't realized that before, so I read the Encoding Guide again but haven't got any information about AR correction, either have Googled it. Could somebody tell me what is AR correction, and what's it used for. Thank you!
Recent projects: SMB warpless TAS (2018), SMB warpless walkathon (2019), SMB something never done before (2019), Extra Mario Bros. (best ending) (2020).
Expert player (2573)
Joined: 12/23/2007
Posts: 831
And another thing, I still don't understand why are we delaying the audio while we are encoding to AAC audio. Is it due to bugs of Nero AAC Encoder or something else?
Recent projects: SMB warpless TAS (2018), SMB warpless walkathon (2019), SMB something never done before (2019), Extra Mario Bros. (best ending) (2020).
Editor, Experienced player (860)
Joined: 8/12/2008
Posts: 845
Location: Québec, Canada
Encoding guide wrote:
If you are encoding for a console intended to be displayed on a TV, you will need to determine the pixel aspect ratio (PAR)[#1] of your target console before proceeding (for handhelds, you can just use 1:1 or not specify this at all). A table of these follows for most standard resolutions. ||Resolution||Ratio|| |256x224|7:6| |256x240|5:4| |320x224|14:15| |320x240|1:1| |x by y|(4/3)*(y/x) (as an integer ratio)|
The AR is the same thing as the PAR (pixel aspect ratio) and is different for each console. If you're encoding NES games, you'll want to use a PAR of 7:6. Example: x264 --sar 7:6
Lex
Joined: 6/25/2007
Posts: 732
Location: Vancouver, British Columbia, Canada
"AR correction", as mentioned by Ilari, is a container flag which specifies an aspect ratio for playback as one would see on a 4:3 TV. This is based on the assumption that most people play NES and SNES games on 4:3 TVs which would stretch the 256×240 or 256×224 image (both of which are not 4:3) to a 4:3 width:height ratio. This can be specified in the header on video muxing. Some games' graphics are designed for 4:3. In my personal opinion, it's not really necessary since decent video players allow the viewer to override the aspect ratio to 4:3 if they want to see the distorted image. Also, I've found that most games' graphics are not designed for 4:3, including Super Mario Bros., so I don't think it's a good idea for Super Mario Bros. Also, it's far less common to be able to have the player ignore the "corrected" aspect ratio flag than it is to be able to override the aspect ratio with 4:3. "PAR" as mentioned by Nahoc above means "pixel aspect ratio". This is the ratio of a single pixel's width to its height; width:height. Without any aspect ratio flag in the container header, all video players assume a 1:1 PAR (square pixels), meaning the NES image would be 256×240, assuming it wasn't cropped. "DAR" is "display aspect ratio", meaning the ratio of the entire image's width to its height. A 256×224 image with square pixels stretched to 4:3 DAR would end up as a 298×224 (incorrectly rounded) image. These (298 and 224) are the dimensions you would find in an "AR corrected" mkv's "video display width" and "video display height" header fields, as seen in mkvmergegui's header editor. Video players use this flag to override the display aspect ratio on playback without the actual video stream data being affected.
Guga
He/Him
Joined: 1/17/2012
Posts: 838
Location: Chile
Lex wrote:
ThatGugaWhoPlay is a newbie with grammar mistakes in his name. You can safely ignore him.
Well, that was uncalled for. I'm from Chile so... I'm not so good with the english. But you are right, I use a really different way for the encode =P
Editor, Player (69)
Joined: 6/22/2005
Posts: 1050
HappyLee wrote:
And another thing, I still don't understand why are we delaying the audio while we are encoding to AAC audio. Is it due to bugs of Nero AAC Encoder or something else?
The Nero AAC Encoder is actually delaying the audio. We're removing the delay.
Current Projects: TAS: Wizards & Warriors III.
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
Expert player (2573)
Joined: 12/23/2007
Posts: 831
Dacicus wrote:
HappyLee wrote:
And another thing, I still don't understand why are we delaying the audio while we are encoding to AAC audio. Is it due to bugs of Nero AAC Encoder or something else?
The Nero AAC Encoder is actually delaying the audio. We're removing the delay.
Well, why would the encoder do that? I still don't get it...
Recent projects: SMB warpless TAS (2018), SMB warpless walkathon (2019), SMB something never done before (2019), Extra Mario Bros. (best ending) (2020).
Emulator Coder, Skilled player (1113)
Joined: 5/1/2010
Posts: 1217
HappyLee wrote:
The Nero AAC Encoder is actually delaying the audio. We're removing the delay.
Well, why would the encoder do that? I still don't get it...
Because AAC encoders insert some amount of junk samples (the number depends on encoder and settings used) in the beginning of the audio. Those samples don't just replace the first samples, those really are inserted. Thus, the audio will be late. The idea of compensation is to have the audio early, so the audio being early due to compensation and audio being late due to the delay cancel out. Some delay values: FAAC (full quality; don't use!): 1024 samples NeroAACEnc -q 0.25: 4672 samples NeroAACEnc -q 0.50: 2624 samples Itunes AAC encoder (HE-AAC): 5186 samples. Itunes AAC encoder (LC-AAC): Unknown. These delay values are measured by measuring phase shift of some periodic signals introduced by encoding and then using Chinese Remainder Theorem to compute the actual delay. Then assume the delay is small. When measuring the delay, I used square wave with periods of 127, 131, 137 samples (these all are prime). This allows computing delays up to about 20 seconds, which should be by far sufficient. Oh, and additional note about AR (aspect ratio): There are two ways to correct for the aspect ratio: - AR flagging: The encoded stream contains the information about what is the proper aspect ratio (either aspect ratio of each pixel (called SAR or PAR, used by MP4) or aspect ratio of the entiere video (called DAR, used by MKV)). The video player then resizes the video to proper resolution. Primary and 10bit444 encodes on this site use this method. Pros: Smaller videos because unscaled video compresses better Pros: User can tell the player to ignore scaling, even if the result is distorted. Cons: Requires video player support. - AR precorrection: The AR is corrected before encoding by scaling and the scaled stream is encoded. 512 and YT HD encodes on this site use this method. Pros: No player support needed. Cons: Larger videos (scaling breaks the nice patterns). Cons: No ignoring the scaling. Pretty extreme example of larger videos is Commander Keen 4. Prescaled video is almost twice the size of unscaled one (at the same quality). Pixel graphics compresses nicely unless one breaks that by scaling it. As said earlier, the SAR for NTSC NES is 7:6, since: (7/6)*(256/224)=4/3 Where 4/3 comes from the aspect ratio of old TV sets (4 units of width for 3 units of height). 256 is the width of NES output in pixels, and 224 is the height (of the part that is actually shown).
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
APPROXIMATE PIXEL ASPECT RATIOS (NTSC)

GB, GBC, GBA
1 / 1

NES, Famicom, SGB, Turbo Grafix 16
573 / 500   256 wide

SNES
573 / 500   256x224, 512x448
573 / 250   256x448
573 / 1000  512x224

Genesis
573 / 500   256 wide
573 / 625   320 wide

PSX
362 / 313   256x240, 512x480
1250 / 1351 320x240, 640x480
625 / 772   384x240
181 / 313   512x240
625 / 1351  640x240
724 / 313   256x480
2500 / 1351 320x480
625 / 386   384x480
If you see a mode which is similar but slightly different (eg 256x232 vs 256x224 vs 256x240), use the exact same PAR. I think turbografix 16 has more modes, haven't researched it...
Guga
He/Him
Joined: 1/17/2012
Posts: 838
Location: Chile
I found out that MeGUI is far more easier than using .bat files. Why we should not use it?
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
There's certainly no technical flaw in MeGUI that makes it unsuitable. As far as easy to use, I personally find that gui solutions can be easier at first, but then once you've gotten an idea of what you want to do and how you want to do it, they make you jump through needless hoops. My batch setup requires me to set up one normal avs script, one youtube avs script, and a few parameters in a project file, and then it automatically spits out: vorbis audio aac audio flac audio normal encode (original res, 4:2:0, flagged AR, dedupped) hi10 encode (original res, 4:4:4#10, flagged AR, dedupped) 512 encode (lancos resize to calculated AR, 4:2:0, no dedup) youtube encode (resize by avisynth, decimate by avisynth, 4:2:0, no dedup) normal mux (normal+vorbis in mkv) hi10 mux (hi10+vorbis in mkv) 512 mux (512+aac in mp4) youtube mux (youtube+flac in mkv) Each output file is given the project name I specified, plus its type, plus the CRF that it was encoded at. When I audition the results, if I don't like one I can just change the CRF in the project file, and it automatically redoes only what's necessary and gives me the new output (with different name by CRF) to compare with the previous one. Now, was this complex to set up? Maybe. Took a decent amount of time to hammer everything down. Now that it's done though, I'm not clickety-clacking through UIs all day. Plus it's easily extensible. Adding things like Turska's 4:4:4 mkv workaround is trivial and doesn't increase encoding effort required at all. Even a whole extra encode, say, WebM, wouldn't be that bad.
Lex
Joined: 6/25/2007
Posts: 732
Location: Vancouver, British Columbia, Canada
I agree with natt. I use MeGUI for things I haven't yet set up and just want done quickly, but when it comes to getting precise tasks done perfectly, MeGUI makes me jump through needless hoops.
Post subject: Script for NDS TAS
Guga
He/Him
Joined: 1/17/2012
Posts: 838
Location: Chile
I need the scripts for the particular way of encode of NDS.
Post subject: Re: Script for NDS TAS
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
ThatGugaWhoPlay wrote:
I need the scripts for the particular way of encode of NDS.
http://tasvideos.org/forum/viewtopic.php?t=10793 http://tasvideos.org/forum/viewtopic.php?t=10347 If you still have questions after reading those, by all means post them
Post subject: 512kb command line
Guga
He/Him
Joined: 1/17/2012
Posts: 838
Location: Chile
Everytime I try to use it, it says that "--fullrange on" is an unknown command.
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
Guide is old, syntax has changed. That being said, even with the fixed syntax, I don't think that's right. I just did a local test with JWPlayer, using a fullrange test video I have. The video in question is YUV 8 bit 4:2:0, with fullrange flag set. The JW player setup did NOT respect the fullrange flag. Anyone else have any input on this? I always do _512kb as limited range... edit: my test video. load it in something like madvr or lavf rgb output, then load it into jw player http://www.mediafire.com/?58chlf8qf194f9g (12KB)
Joined: 4/13/2009
Posts: 431
Remember that not everyone is so good with CLI. Not everyone likes CLI, either. But how long has it been since MeGUI was updated last? Last time I used it was probably some years ago, and then it was lagging behind badly.
Editor, Emulator Coder, Site Developer
Joined: 5/11/2011
Posts: 1108
Location: Murka
EEssentia wrote:
But how long has it been since MeGUI was updated last?
The last commit to the official SVN is two days ago. The last binary build available for download was posted 10 days ago. (Is there some reason you couldn't find this out yourself?)