Username:
B
I
U
S
"
url
img
#
code
sup
sub
font
size
color
smiley
embarassed
thumbsup
happy
Huh?
Angry
Roll Eyes
Undecided
Lips Sealed
Kiss
Cry
Grin
Wink
Tongue
Shocked
Cheesy
Smiley
Sad
<- 1  -   of 69 ->
--
--
List results:
Search options:
Use \ before commas in usernames
That was awesome.
Anri-chan is a great tool and all, but would it be possible to have it add some kind of IDv3 tags or somesuch to the videos? I'm an organization freak and tags are a big help for sorting and stuff.
snow, do you know about this and mp4box off the top of your head? i have no clue lol. ;-[
Don't think so, unless I'm blind and it's in the documentation somewhere.
i could have sworn mp4box supported adding metadata to files.
http://atomicparsley.sourceforge.net/mpeg-4files.html

See mp4box -h meta.

Cool... but is there no standard? That guide is about following what Apple is doing... Roll Eyes
wonder how we define standard. so like. what all players do we want it to work in. if it just works in apple crap then that's no good (apologies to sonic the hedgehog) but if it doesn't work in apple crap then that's also not good. it seems like if mp4box supports it it should work in apple crap and at least one other player. if we can establish that then we can confidently instruct anri to embed info in the file that way.
Edit history:
ballofsnow: 2010-04-24 11:33:03 am
Guess it can't hurt, something is better than nothing.

Realistically I don't know when I'll get around to implementing this in Anri 3, if it gets implemented at all (anri 4 eta? Smiley ). Right now I'm trying to get HD console footage support (avi for now), improving how aspect ratios are handled, better AVI appending through FFmpegSource, and whatever else is in the to-do list.
I'm about 90% done on HD avi footage and aspect ratio improvement. Let me know your thoughts on this process:

Scenario 1:
1. video comes in with its own sample aspect ratio, example 720x480, or 1.5:1
2. user declares the display aspect ratio, example 4/3, or 1.33:1
3. since display aspect ratio is lower than sample aspect ratio (1.33 < 1.5) the sample aspect ratio is resized to match the display aspect ratio, example 640x480.

Scenario 2:
1. video comes in with its own sample aspect ratio, example 720x480, or 1.5:1
2. user declares the display aspect ratio, example 16/9, or 1.78:1
3. since display aspect ratio is greater than sample aspect ratio (1.78 > 1.5) the sample aspect ratio is left as is.
4. a pixel aspect ratio is applied to the sample aspect ratio at the container level to meet the desired display aspect ratio, example 1.5 * 1.185 = 1.78

Note that this is per quality, so it's possible to have a HQ 720x480 with PAR for 16x9 widescreen, and LQ/MQ 428x240 without PAR (or PAR 1:1) but still 16x9 widescreen.
i don't see any problem with that right off. wonder if we could get people to beta test it before it goes on the anri page. to tell the truth though there isn't that much variation with stuff coming off dvd if it's been recorded at sp or higher like it's supposed to be.
Those scenarios were DVD, but it should apply to anything.

When I was looking at supporting HD I saw that there are HD video cameras recording resolutions such as 1440x1080, 1280x1080 and 960x720, probably to hit certain price points, and all meant to be displayed as 16x9... So I figure we won't necessarily be dealing with only 1920x1080 and 1280x720 HD video. That's why I think it's a good idea to move towards the SAR/PAR/DAR method of encoding video. Now, how often we'll see these odd resolutions.. I don't know, but at least there will be support for them.
i think it's safe to say if anything happens the amount of times anri encounters them will increase rather than decrease. i have personal experience with one of those cameras and it's p.cool. it recorded directly to ts so it was almost like a bluray recorder except using mpeg-2 standards for the container that dgindex can read.
I'm looking at the blank statID thing. The current statid code is fairly.. "static" and muxes an external silence_stereo_48000.wav file. Would there be any problems going with the more dynamic Blankclip command which can automatically adopt the properties of whatever video/audio is in the pipe?

http://speeddemosarchive.com/kb/AviSynth#Part_11:_SDA_StatID
gah i'm trying to remember why the external wav and i can't, at least not atm. i know we argued about it long, long ago so it may be on the forum ... ok searching for it pulled this up:

http://speeddemosarchive.com/forum/index.php?topic=6376.msg169827#msg169827

i'm starting to remember now ... basically what you need to check for is whether normalize() makes that silent audio generated by avisynth go to 100% volume. what's the problem with silence being at 100% volume you ask? it's easier to explain if you see the waveform but basically because most runs start out quietly with the system turning on or whatever it causes a very loud pop when the amplitude goes from max to zero. it's sort of cute but it gets old really fast, makes it seem like the video is some old analog thing or something.

looking back now this was probably because normalize() was interacting with the statid part of the script/filter graph/whatever individually, so in other words there was a bug that said normalize the statid, then the run instead of them both together. if you can check that it's no longer doing this (no pop or alternatively look at the waveform output of the script in audacity) then it should be ok to stop using that .wav. the .wav is actually enormous uncompressed compared to the other anri files so it would be good to get rid of it for that reason too.
Man, time flies..

I remember that popping noise problem. No worries though, not going to be using normalize anytime soon.
Statid is done. I combined d1/gba/gb into one function which uses the very useful blankclip command. Now possible to go with a blank statid which uses a separate png file which is all black, I figure people might want to swap it out with a custom png. Can also specify if there is audio commentary... which leads me to the following question:

Is audio commentary muxing implemented in Anri 4? If so, how?
i believe you should be able to read it because i used the same function names from anri 3. basically get the wav, get the video, encode the audio, mux. let me know if you have any questions.

edit: it's a main menu option, not integrated into the main encoding process at all.

Code:
sub audio_commentary {
	&out_cls_section($lang{SECTION_AUDIO_COMMENTARY});
	&echo("");
	
	&out_info($lang{COMMENTARY_AUDIO_PATH_TO});
	&echo("");
	print $prompt;
	while (<STDIN>) {
		chomp;
		#error codes' precedence is descending, e.g. empty string is first because it is the most serious error
		if ($_ eq '') {
			$errormsg=$lang{COMMENTARY_BAD_INPUT};
		} elsif (!m/.*\.wav$/i) {
			$errormsg=$lang{COMMENTARY_NOT_WAV};
		} elsif (! -e $_) {
			$errormsg=$lang{FILE_NOT_FOUND};
		} else {
			$audio_commentary_path = $_;
			&out_info($lang{COMMENTARY_AUDIO_LOADED_SUCCESSFULLY});
			&echo("");
			last;
		}
		&out_error($errormsg);
		print $prompt;
	}
	
	&out_info($lang{COMMENTARY_VIDEO_PATH_TO});
	&echo("");
	print $prompt;
	while (<STDIN>) {
		chomp;
		#error codes' precedence is descending, e.g. empty string is first because it is the most serious error
		if ($_ eq '') {
			$errormsg=$lang{COMMENTARY_BAD_INPUT};
		} elsif (!m/.*\.mp4$/i) {
			$errormsg=$lang{COMMENTARY_NOT_MP4};
		} elsif (! -e $_) {
			$errormsg=$lang{FILE_NOT_FOUND};
		} else {
			$video_commentary_path = $_;
			&out_info($lang{COMMENTARY_VIDEO_LOADED_SUCCESSFULLY});
			&echo("");
			last;
		}
		&out_error($errormsg);
		print $prompt;
	}
	
	#BUILD PATH INFO
	@video_commentary_path_arr = split(/\\|\//,$video_commentary_path);
	$video_commentary_video = pop @video_commentary_path_arr;
	$video_commentary_video_base = $video_commentary_video;
	$video_commentary_video_base =~ s/\.mp4$//i;
	chdir(join('/',@video_commentary_path_arr)) or warn $!;
	
	#ENCODE AUDIO TO 32 KBIT AAC MP4
	if ($os eq 'windows') {
		if(system("\"${anri_dir}/${naac}\" -br 32000 -lc -if \"${audio_commentary_path}\" -of \"${video_commentary_video_base}_track3.mp4\"")) {
			&out_error($lang{ERROR_COULD_NOT_READ_COMMENTARY_WAV});
			system($reset_color);
			<STDIN>;
			exit 0;
		}
	} else {
		###FIXME UNIX
	}
		
	#MUX
	if ($os eq 'windows') {
		system("\"${anri_dir}/${mp4box}\" -single 1 \"${video_commentary_video}\"");
		system("\"${anri_dir}/${mp4box}\" -single 2 \"${video_commentary_video}\"");
		&mv("${video_commentary_video}","${video_commentary_video_base}.backup.mp4");
		system("\"${anri_dir}/${mp4box}\" -tmp . -new -add \"${video_commentary_video_base}_track1.mp4\" -add \"${video_commentary_video_base}_track2.mp4\" -add \"${video_commentary_video_base}_track3.mp4\" -disable 3 \"${video_commentary_video}\"");
		for my $track (1..3) {
			&rm("${video_commentary_video_base}_track${track}.mp4");
		}
	} else {
		#FIXME UNIX
		#system("export DYLD_LIBRARY_PATH=\"${anri_dir}\";\"${anri_dir}/${mp4box}\" ${mp4boxnewframerate} -tmp . -new -add \"${_[1]}_video.${x264outext}\" -add \"${_[1]}_audio.${audioext}\" \"${_[1]}.mp4\"");
	}
	
	
	
	
	&echo("\n\n${white_on_gray}$lang{AUDIO_COMMENTARY_DONE}");
	system($reset_color);
	<STDIN>;
	exit 0;
}
Edit history:
ballofsnow: 2010-05-01 04:32:22 pm
That's not too bad.. I pretty much did an exact port to batch code.. though testing now. Hopefully PAR stays intact.. edit- it does, yay.

Might add some functionality, like having multiple inputs (LQ/MQ/HQ...). edit- done. Refresh my memory though, are we allowing commentary tracks in LQ?

I guess we're not allowing for more than one audio commentary track?
i always put the same commentary (32 kbit) in every file (every quality).

and no the only run i know of to ever have more than one commentary track was frezy's mario 3 (iirc) which had swedish and english. so that's not nearly common enough to warrant anri doing it unless you're just zomg so in love with doze batch that you just can't stop programming in it.
lol, good, won't bother then.
So is anri 4 dead in the water or are you still planning on making the change to perl someday? I haven't looked at it for a long long time. I was doing some stuff in perl the other day at work so I decided to stop in again. I can get rid of the need for wget.exe with perl code.
Code:
use LWP::UserAgent;
sub getWebPage{
	my ($url)=@_;
	my $ua = new LWP::UserAgent;
	$ua->agent("Mozilla/8.0"); # pretend we are very capable browser
	my $res = $ua->get($url);
	if ($res->is_success) {
		my $content = $res->content;
		return $content;
	} else { 
		print "Error: " . $res->status_line . "\n"; 
	} 
}

it just returns the web page in a string and we can parse the dfnd data from it
yeah, please don't look at anri 4 and think that's how i write perl now lol. i was actually just thinking about this the other day. perl has a "problem" (at least it's a problem in this case) where it's actually an infinite number of different languages and i happened to pick one that's not the easiest to maintain. i also just knew a lot less in fall 2008 than i do now. basically i started programming in perl for real in summer 2008 and i haven't stopped since. so that should give you some idea of how differently i would do things now.

having said that, none of this has any relevance to why i aborted anri 4. the reason i aborted it is that it doesn't really work reliably anywhere except under windows and the whole point of anri 4 was to break the dependency on windows. sure there are other things too - the extended latin characters in pathnames thing comes to mind - but snow has overcome all of them or at least made it easy for the user to overcome them in anri 3.x.

so i don't really see any reason to continue development. that's not to say others aren't welcome to continue development. far from it. i'll help in any way i can. but i can't see myself personally trying again unless i learn something new about unix video tools or (this would be far better) i write my own unix video tools that solve the problems mplayer and avidemux have. it may also just be easier to modify avidemux to stop sucking so much but then i have to learn avidemux internals and that will take time that i unfortunately do not have and may not have for years.

at some point i'm planning on getting to a point where i do have the time. everything i do in my life is building toward the point that i can effectively retire and devote a lot more time to stuff like this. but luckily we have people like snow to where i can actually move fairly quickly without having to worry about x y and z not happening because i'm not doing them.

basically anri was my idea but the credit goes to other people and that looks unlikely to change in the near term.
crap snow i was meaning to mention this but kept forgetting for the last like ... two years or something. ok basically when people submit things they have a tendency to just torrent the whole finished dir. this is fine until more than one person sends a torrent like this and then everything starts going in a single folder on my end called finished. and then when i look at that i think ok now WHAT am i receiving right now? so i have to go in there and investigate and it's a pita right now because i use one of the servers to receive torrents because my home connection is basically nonexistent. so i was wondering how easily you could look at changing that finished to something like %projdir%_finished or whatever it is. if you can't be sure you've gotten all of them then don't bother but if it's a single change or a change you can demonstrate is complete by find and replace then it might be a good idea to sort of reach out and stop these collisions before they start. not high priority obviously but something to think about at least.
Really not a problem at all to change the name of that folder. It shall be done.
Quote from nate:
yeah, please don't look at anri 4 and think that's how i write perl now lol. i was actually just thinking about this the other day. perl has a "problem" (at least it's a problem in this case) where it's actually an infinite number of different languages and i happened to pick one that's not the easiest to maintain. i also just knew a lot less in fall 2008 than i do now. basically i started programming in perl for real in summer 2008 and i haven't stopped since. so that should give you some idea of how differently i would do things now.


Some things did confuse me about how you did stuff but I guess i don't understand what you mean with you say infinite number of languages. Unless you mean different ways to go about programming in the language because of its flexibility.

So would you mind if I started to rip and tear at it slowly and make it object oriented. I've been tempted to do this ever since I first looked at the code and constantly got lost in it.