Anri-chan/Source/lang english.pl

From SDA Knowledge Base

< Anri-chan‎ | Source
Revision as of 20:18, 15 August 2009 by Dex (Talk | contribs)

Jump to: navigation, search
#!/usr/bin/perl
use warnings;
use strict 'subs';

$lang{y} = "y";
$lang{n} = "n";
$lang{PROGRAM_START} = "ON HERMESUS LUC ARSUS ESTARIAS AUC ELTRAS LI CELES! Now, let's get to work!";
$lang{MAINMENU} = "Main";
$lang{MAINMENU_RIPDVD} = 'Rip DVD to hard drive (required for DVD material)';
$lang{MAINMENU_STARTNEWPROJECT} = 'Start new project';
$lang{MAINMENU_EXTRACTSAMPLE} = 'Extract sample';
$lang{MAINMENU_STATIDPREVIEW} = 'Station ID preview';
$lang{MAINMENU_EXIT} = 'Exit';
$lang{INVALID_INPUT} = "Invalid input";
$lang{SECTION_SAMPLE_EXTRACTION} = "Sample Extraction";
$lang{QUESTION_DVDMPEG_SOURCE} = 'DVD/MPEG source';
$lang{INFO_SAMPLE_LENGTH} = "This sample will be 300 frames long. Pick the starting frame of a scene with action.";
$lang{PRESS_ENTER_TO_CONTINUE} = "Press ENTER to continue ...";
$lang{SAMPLE_EXTRACTION_DONE} = "Finished. You will find a sample.mp4 file on your desktop. Feel free to rename it something more descriptive like nameofgame_sample.mp4.";
$lang{SAMPLE_EXTRACTION_README} = "${red_on_gray} - READ -${white_on_gray} You will see that the video has been resized vertically. ${red_on_gray}THIS IS NORMAL${white_on_gray} and will make it easier for the techies to help you.";
$lang{SECTION_PROJECT_SETUP} = "PROJECT SETUP";
$lang{PROJECT_NAME_ILLEGAL_CHARACTERS} = "You may not use spaces or the % character in the name, sorry.";
$lang{ENTER_PROJECT_NAME} = "Enter a project name. This name will be used as the basename for your encoded videos (e.g. the high quality video will be called projectname_HQ.mp4, etc.). $lang{PROJECT_NAME_ILLEGAL_CHARACTERS}";
$lang{PROJECT_FILES_APPEAR_IN} = "${white_on_gray}All files associated with this project will appear in";
$lang{PROJECT_NAME} = "project name";
$lang{MOVIE_SOURCE} = "MOVIE SOURCE";
$lang{MOVIE_SOURCE_MPEG2_HINT} = "If you used a capture card with DVD or MPEG settings, place those files in ${dvdripto_parentdir}\\foldername\\ and then answer y to the question below.";
$lang{MPEG2_SOURCE_QUESTION} = "DVD/MPEG source";
$lang{SECTION_GAME_PROPERTIES} = "GAME PROPERTIES";
$lang{PC_GAME_QUESTION} = "Is this a PC game/non-console run recorded with screen capture software? If you say no, your video will be treated as NTSC / PAL.";
$lang{DF_EXPLAIN} = "\"D\" and \"F\" are used at SDA to refer to the video dimensions and framerate. D1 is full resolution and D4 is half resolution. F1 is full framerate, F2 is half framerate and F3 is 1/3 framerate.";
$lang{DF_FIND_AT_THIS_URL} = "Find D and F for your game at this URL:";
$lang{DF_IF_NOT_FOUND_THEN_WHAT} = "If you don't see your game listed there, you can use the Extract Sample main menu option to make a sample video to post in the SDA Tech Support Forum. Someone there will look at the video and let you know what D and F are.";
$lang{QUESTION_D} = "Please enter 1 or 4 for D.";
$lang{DFND_URL} = "http://speeddemosarchive.com/kb/index.php/DF";
$lang{QUESTION_F} = "Please enter 1, 2 or 3 for F.";
$lang{QUESTION_ND} = "2D game";
$lang{QUESTION_SUBMIT_DFND_WHY} = "You didn't use the SDA games database. Does that mean that it didn't have your game? If so, we'd love it if you posted the \"D\", \"F\" and maybe \"2D Game\" info you just entered here, into our DFnD updates topic on SDA, so we can add it to the next version of the database. You don't need to register to do so and it only takes a few seconds.";
$lang{QUESTION_SUBMIT_DFND} = "Submit this game's data to SDA?";
$lang{SECTION_VIDEO_PROPERTIES} = "VIDEO PROPERTIES";
$lang{QUESTION_PROGRESSIVE_INTERLACED} = "Progressive or interlaced? If you don't know, it's most likely interlaced (answer 'n' to the question). However, if your video is a PC screen capture (made using e.g. FRAPS or Camtasia) and never touched a VCR or DVD recorder, then it may be progressive.";
$lang{FIELDORDER_VDUB_WINDOW_OPENS} = "VirtualDub will now open with a split screen of your video. Find a scene with movement and use the slider or play button to play through it to see which looks better. Enter t for top, or b for bottom. If both look good, enter t.";
$lang{VDUB_WINDOW_CAN_CLOSE_NOW} = "You may now close the VirtualDub window.";
$lang{QUESTION_VHS} = "Did you use VHS to help capture this run?";
$lang{QUESTION_1PIXEL_BOB} = "1 pixel bob ... answer y if it's jumping up and down, otherwise n.";
$lang{QUESTION_NES} = "NES";
$lang{QUESTION_GBA} = "Game Boy Advance";
$lang{QUESTION_GB} = "Game Boy";
$lang{QUESTION_DEFLICKERED} = "Deflickered (rereleased old game e.g. Mega Man AC, Sonic Mega Collection, Wii Virtual Console)";
$lang{SECTION_CONTENT_PROPERTIES} = "CONTENT PROPERTIES";
$lang{INFO_TRIM} = "Trimming lets you remove the start and end of the existing movie so you only keep the run itself.";
$lang{QUESTION_TRIM} = "Do you want to trim off unwanted content in this video?";
$lang{TRIM_VDUB_WINDOW_OPENS} = "VirtualDub will now open with a low quality temporary version of the source video. Use the slider at the bottom of the VirtualDub window to locate the first and last frame numbers of the part of the video you WANT TO KEEP.";
$lang{TYPE_N_TO_QUIT} = "  - Type n to quit -";
$lang{TRIM_MULTIPLE_RANGES} = "You can specify multiple ranges of frames. $lang{TYPE_N_TO_QUIT}";
$lang{TRIM_ILLEGAL_VALUE} = "You must enter a frame number, or type n to quit.";
$lang{TRIM_INVALID_RANGE} = "Last frame number in trim range must be equal or higher than the first frame number!";
$lang{TRIM_NO_VALUES_ENTERED} = "No values entered. Canceling trim.";
$lang{TRIM_ODD_NUMBER_OF_FRAMES} = "Odd number of frame numbers detected! All trim values erased!";
$lang{TRIM_DONE} = "Trimming done!";
$lang{TRIM_INVALID_INPUT_MUST_BE_FRAME_NUMBER} = "$lang{INVALID_INPUT}. Must be frame number.";
$lang{TRIM_POINT_LOADED_SUCCESSFULLY} = "Trim point loaded successfully:";
$lang{SECTION_STATID} = "Station ID";
$lang{STATID_INFO} = "Set the info shown on the Station ID (the clip at the start and end of an SDA video). Run the Station ID Preview program for a preview.";
$lang{QUESTION_STATID} = "Do you want to append an SDA Station ID to the front and end of this video?";
$lang{STATID_ABOUT_EACH_LINE} = "Line 1 is normally the runner's name. Line 2 (and Line 3 if necessary) normally include the game name, the type of run and the time to completion.";
$lang{STATID_LINE} = "Station ID Line";
$lang{SECTION_READY_TO_ENCODE} = "READY TO ENCODE";
$lang{SETTINGS_SAVED_TO_FILE} = "Your settings for this project have been saved. To resume the project, double-click";
$lang{QUESTION_ENCODE_NOW_OR} = "Do you want to start encoding now [Y] or save the job for a later date [N]?";
$lang{SECTION_ENCODING_OPTIONS} = "ENCODING OPTIONS";
$lang{QUESTION_CREATE_VIDEO} = "Create video?";
$lang{NOW_ENCODING} = "Now encoding ...";
$lang{SECTION_NMF} = "New Master File";
$lang{NMF_INFO} = "NMF: New Master File refers to an intermediate source video file in the encoding process, usually one saved after deinterlacing (to avoid slow deinterlacing during each pass for each quality of output).";
$lang{INFO_HQ_IQ_XQ_NMF} = "You have chosen to encode HQ, IQ and/or XQ. We can speed up the encoding process by creating a NMF. BEWARE! The new file can be extremely large, somewhere around 36 to 72 GB per hour. Make sure you have enough hard drive space.";
$lang{QUESTION_CREATE_NMF} = "Create NMF?";
$lang{NMF_SUCCESSFULLY_CREATED} = "NMF successfully created. Continuing with encoding process in 5 seconds...";
$lang{ENCODING_NMF} = "Encoding NMF ...";
$lang{SECTION_AVI_SOURCE} = "AVI SOURCE";
$lang{AVI_SOURCE_INFO} = "Enter the path to each avi file [i]ndividually or [a]utomatically. Note that if you choose automatic, Anri will load the files in an alphabetical manner. The files must have the same resolution and framerate to be joined together.";
$lang{AVI_PATH_TO} = 'Path to source video file e.g. "c:\path to\video.avi" without quotes.';
$lang{AVI_BAD_INPUT} = "You must enter a path, or type n to quit.";
$lang{AVI_NONE_ENTERED} = "You must load at least one avi file.";
$lang{AVI_NOT_AVI} = "Must be an avi file, try again.";
$lang{FILE_NOT_FOUND} = "File does not exist, try again.";
$lang{AVI_LOADED_SUCCESSFULLY} = "AVI loaded successfully!";
$lang{AVI_DIR_LOAD_INFO} = 'Enter the path to the avi folder e.g. "c:\my video folder\" without quotes.';
$lang{AVI_DIR_LOAD_MUST_ENTER_PATH} = "You must enter a path.";
$lang{AVI_DIR_LOAD_MUST_BE_FULL_PATH} = "Must be full path.";
$lang{AVI_DIR_LOAD_DIR_DOES_NOT_EXIST} = "Folder does not exist.";
$lang{AVI_DIR_LOAD_NO_AVIS_FOUND_IN_DIR} = 'No avi files found in that folder!';
$lang{QUESTION_AVI_DIR_LOAD_CONTINUE_OR_RESCAN} = 'Continue [y] or rescan [n]?';
$lang{DFND_INFO} = "The next few questions are about the game played in this video. SDA has a database of games we have seen in the past, which can answer some or all of the questions for you. However, you must be connected to the Internet to use it.";
$lang{QUESTION_USE_DFND_DATABASE} = "Do you want to use SDA's games database [Y] or enter the data yourself [N]?";
$lang{INFO_CONNECTING_TO_DFND_DATABASE} = "Anri will now attempt to connect to SDA's games database. This may take a few moments. Once complete, you will see a list of all games in the database.";
$lang{PRESS_ENTER_PAGE} = "Press ENTER to go to next page...";
$lang{DFND_MUST_CHOOSE_GAME} = "You must choose a game.";
$lang{DFND_MUST_ENTER_GAME_NUMBER} = "Please enter the number of a game.";
$lang{INVALID_SELECTION} = "Invalid selection";
$lang{DFND_COULD_NOT_CONNECT_TO_SDA} = "Could not connect to SDA!";
$lang{QUESTION_DFND_COULD_NOT_CONNECT_TO_SDA_TRY_AGAIN} = "Try again?";
$lang{SECTION_RIP_DVD} = "Rip DVD";
$lang{RIP_DVD_SOURCE_FILES_ON_HD_TIP} = "Tip: If you already have your DVD source files on your hard drive, move them into C:\\VIDEO_TS\\ and enter C as your drive letter.";
$lang{QUESTION_DVD_DRIVE_LETTER} = "What is the drive letter of your DVD drive (e.g. D)?";
$lang{QUESTION_DVD_DRIVE_PATH} = "What is the path to your DVD (e.g. /Volumes/MYDISC)?";
$lang{DVD_MUST_ENTER_DRIVE_LETTER} = "You must enter a drive letter. Enter e.g. D, not D: or D:\\.";
$lang{DVD_MUST_ENTER_DRIVE_PATH} = "You must enter a path.";
$lang{DVD_INFO_ANRI_WILL_EXTRACT_TO_DIR} = "Anri will extract to the ${dvdripto_parentdir} parent directory.";
$lang{QUESTION_DVD_RIPTO_DIR_NAME} = "Name a folder for your DVD files.";
$lang{DVD_MUST_ENTER_RIPTO_DIR_NAME} = "You must enter a folder name.";
$lang{DVD_INFO_ANRI_WILL_RIP_NOW} = "Anri will now extract everything needed from the DVD to the folder you just entered. Make sure you have enough hard drive space (up to 4.3 GB). This may take some time.";
$lang{DVD_ADVANCED_MODE} = "-advanced mode- Rip specific title numbers. Separate by spaces, or leave blank to rip all.";
$lang{DVD_TITLE_NUMBERS} = "Title numbers: ";
$lang{DVD_VIDEOTS_NOT_FOUND} = "Neither a VIDEO_TS nor a DVD_RTAV folder was found in that location. Anri is displeased.";
$lang{DVD_FINISHED_RIPPING} = "Finished ripping.";
$lang{DVD_INDEX_INFO_FILELIST} = "Here is the list of folders containing DVD/MPEG files (*.mpg, *.mpeg, *.vob, *.vro, etc.) in ${dvdripto_parentdir}. Select one or more by typing in the name or names separated by spaces. If you select more than one, the files will be joined in the order you specify.";
$lang{DVD_INDEX_WARNING} = "${navy_on_gray}Note that joining different DVD/MPEG files is only recommended if they're of the same game.  The settings you choose later in the editing phase will be applied to the whole project which can cause problems since different games will possibly need different settings.";
$lang{DVD_INDEX_NO_FOLDERS_WITH_DVD_FILES_FOUND} = "No folders with DVD files found!";
$lang{DVD_INDEX_NOW_INDEXING} = "Now indexing MPEG-2 ...";

#new as of 2008-10-24
$lang{QUESTION_DVD_DRIVE_PATH} = "Where are the DVD files you want to rip? If you're using Mac OS X, you can just drag the disc icon onto this window.";
$lang{RIP_DVD_SOURCE_FILES_ON_HD_TIP_UNIX} = "Tip: It doesn't have to be a real DVD; for example, you can also enter the path to a folder on your hard drive with a VIDEO_TS folder inside it.";
$lang{DVD_MUST_ENTER_DRIVE_PATH} = "You must enter the path to the DVD files you want to rip.";

#Added Aug 15, 2009
#keep this at the end of the file
#the newline before EOF is actually important, so keep it in your source!
$lang{COMMAND_LINE_HELP} = <<END_OF_COMMAND_LINE_HELP;
					Anri-chan Command Line Interface
SYNOPSIS
	perl anri.pl [options]
DESCRIPTION
	In general, anri.pl is a very handy tool. It lets the user choose their encoding settings easily.
	However, with time, as your encoding experience with anri gets bigger, choosing the options
	using the 'batch' interface or (in future) the GUI interface can get very tedious and take a lot
	more than it usually would. Also, neither of those let you automate tasks properly. The solution?
	Command Line Interface (referred to as CLI from here on out)! It lets you quickly set your encoding
	up, and there's nothing better for automation - just stick all the 'perl anri.pl [options]' commands
	you'd want to execute in sequence into a batch/shell file, and all the tasks will be automated. Encoding
	several segments with a bunch of commands fired off just once is really simple and easy. This help aims at
	telling what the cmdline options do.
OPTIONS
	All the options have 'short' and 'long' counterparts. Linux people will no doubt be familiar with both of those.
	'Short' options are called that because they're just single letters + the arguments for the options, and are 
	prefixed with a single '-'. They exist to make the CLI usage faster for the people that know the options well.
	Also, they can be bundled. Say, instead of doing '-C -o -i', you can do '-Coi' for an equivalent effect.
	'Long' options are designed for readability. They are usually much more descriptive and longer than a single letter.
	However, they take a long time to write, so a person savvy with the short options can do the tasks much quicker.
	If you're just beginning your CLI usage, stick to the long options. They will be a lot more readable. They are
	prefixed with '--'. Also, note that if your <arg> contains a space, you should enclose it in " ".

	Also, if you want to set some option from within anri (trim makes the most sense)? No problem.
	Just don't use those args. Anri will ask to fill in the missing info. If you don't want to be asked to trim, you have
	to use --no_trim.

	So, here go the possible anri options (-short/--long <args, if any>. Different ways to pass args will be
	separated with |, like <way to pass args 1>|<way to pass args 2>):
	
	-1/--statid1 <statid string>
		Sets the first line of the statid as <statid string>.

	-2/--statid2 <statid string>
		Sets the second line as <statid string>.
	
	-3/--statid3 <statid string>
		Sets the third line as <statid string>.

	-s/--statid_lines <line1>,<line2>,<line3>
		Set all the statid lines at once. Separated by commas.

	-S/--spec d<d of the source>f<f of the source><dimension of the source>d
		Set the encoding settings, specifically the d, f and whether the source is 2d or 3d. Extremely important 
		on console sources. For example, --spec d1f13d will set d=1, f=1 for a 3d game. So will -S d1f13d

	-t/--trim <framepoint 1>,<framepoint 2>,<...>,<framepoint n>.
		Set trimming points, separated by commans. Has to be an even number of trimpoints. 
		NOTE: "-t/--trim 500,1000,2225,2255" will leave frames from 500 to 1000 and from 2225 to 2255 in the video.

	-r/--rip <drive letter>:<dir to rip to>
		DVD ripping settings. Rips from <drive letter> to <dir to rip to>.

	-p/--gb_crop <left>,<top>,<right>,<bottom>
		Cropping settings for GB cropping, self explanatory.

	-P/--gba_crop <left>,<top>,<right>,<bottom>
		Cropping settings for GBA cropping.

	-l/--language <lang>
		Obvious. Sets the language of anri-chan.

	-q/--qualities <list>|<decimal up to 127>|0b<7 digits in binary>
		This lets you tell anri what qualities to encode. 3 different ways to do this:
		<list>: This is the readable one, but a lengthy one if you encode many qualities. The list is comma separated,
		and it includes all the qualities you want to encode. Possible qualities: xq,iq,hq,mq,lq,mqavi,lqavi
		For example, --qualities mq,lqavi will encode a 512kbps mp4 and a 128kbps avi.
		NOTE!!!: must be lowercase for now.
		As you can see, that is quite lengthy if you encode many qualities, so...
		<decimal up to 127>: if you are familiar with linux permissions you'll know this one. The qualities are assigned
		'values': xq - 64, iq - 32, hq - 16, mq - 8, lq - 4, mqavi - 2, lqavi - 1. To get the decimal number to use as an
		option, just add the values of desired qualities. For example, you want to encode just mq? -q 8.
		xq, mq, lq, lqavi? -q 77. All qualities? -q 127. Handy, no? But, as you might notice, the values are pretty binary,
		and indeed...
		<7digits in binary>: Alternative to decimal, just as readable as a list but usually more concise. 
		0b[digit for xq][for iq][for hq][for mq][for lq][for mqavi][for lqavi]. For example, -q 0b1001101 will encode xq,
		mq, lq, lqavi.

	-n/--projectname <name>
		Name of the project and also the folder the videos will be saved to...
	
	-d/--avidir <dir>
		Path to the <dir> with the videos to join.

	-f/--avifile <file>
		Path to the <file> to encode. NOTE: can be called multiple times, the videos will then be joined in sequence.
		Like, --avifile C:/blah.avi --avifile C:/blahblah.avi will result in a video that is blah.avi followed by blahblah.avi.

	-D/--dvdsource <list of folders separated by commas>
		Folders with the ripped stuff. For example "-D rippin,game", you know the drill.

	-x/--sample_extraction <starting frame>
		Extract a sample, starting at <starting frame>.

	--database 
		Uses the database to get d, f and dimensions. Pretty useless, since if you're using the CLI you likely know
		the settings already, but for completeness..
 	
	-g/--gb
		GameBoy source.

	-G/--gba
		GameBoy Advance source.

	-N/--nes
		Nintendo Entertainment System (NES) source.

	-v/--vhs
		VHS source.

	-F/--deflickered
		Deflickered source.

	-R/--progressive
		Progressive source.

	-L/--field_order
		If used, will switch to the BOTTOM video from the anri-chan test.

	-b/--pixelbob
		If used, will set onepixel bob to true.

	-m/--nmf
		Create NMF.

	-o/--no_statid
		Force no statid.

	-i/--no_trim
		Force no trim.

	-a/--maxaudbitrate
		For completeness. Does this even do anything?

	-C/--pcgame
		PC source!

	-Q/--quietmen
		Quiet mencoder.

	-h/--help
		This!

	-c/--config <filename>
		One of the most useful of all, it loads the config file specified with <filename>. Remember about the extension 
		of the file! The file can be any extension, but I recommend .ini or .anr personally.
		
		The config files have a similar syntax to the LONG options of the CLI. Consider the config in EXAMPLES.

EXAMPLES
	The sample config:
		#this is a comment line, ignored
		statid1=wee
		statid2=waa
		statid3=woo
		pcgame=1
		avidir=D:/anritest/
		projectname=test_of_config
		qualities=mq,lqavi,iq
		trim=400,800,1200,1400
	
	Same options as the CLI, but only long ones. Boolean args have to be called with their value (1 is true, 0 is false).

	The config file will generate the same vid as this: 
		perl anri.pl --statid1 wee --statid2 waa --statid3 woo --pcgame --avidir D:/anritest/ --projectname test_of_cli --qualities mq,lqavi,iq --trim 400,800,1200,1400

	Or as this:
		perl anri.pl -s wee,waa,woo -Cq 13 -t 400,800,1200,1400 -d D:/anritest -n test_of_cli

	
	Also, the CLI takes precedence over config. Say, the config file presented here was 'example.anr'. You can do:
		perl anri.pl -c example.anr --statid1 "changed the first line"
	
	to change that particular setting from the config. Makes it easy to use skeleton configs for easy automation:
		perl anri.pl -c config_with_most_settings --avifile segment1.avi
		perl anri.pl -c config_with_most_settings --avifile segment2.avi

	Save that as .bat and execute to automate both of those with the settings in 'config_with_most_setting'.
END_OF_COMMAND_LINE_HELP


Personal tools