commit:65a66fd245f9f717bef9080300484faa44665639
author:Chip Black
committer:Chip Black
date:Wed Apr 30 21:13:35 2008 -0500
parents:bad9a1a98ab950405c0a1c38703a0e1c8b9c11be
Fixed profiles, profile listing.
diff --git a/VFSEncoder.cs b/VFSEncoder.cs
line changes: +8/-4
index 84e5a05..36aa23f
--- a/VFSEncoder.cs
+++ b/VFSEncoder.cs
@@ -46,8 +46,8 @@ namespace VFSEncoder {
 		}
 
 		static void go_click(object obj, EventArgs args) {
-			if (profiles.ActiveText == null) {
-				Console.WriteLine("NULL!");
+			if (browse.Filename == null) {
+				status.Text = "No file selected!";
 				return;
 			}
 
@@ -55,8 +55,7 @@ namespace VFSEncoder {
 			profiles.Sensitive = false;
 			go.Sensitive = false;
 
-			Console.WriteLine(encoder_commands[profiles.ActiveText]);
-			string outfile = Path.Combine("output",Path.ChangeExtension(Path.GetFileName(browse.Filename), "mp4"));
+			string outfile = Path.Combine("output", Path.ChangeExtension(Path.GetFileName(browse.Filename), "mp4"));
 
 			Process p = new Process();
 			p.StartInfo.FileName = "ffmpeg";
@@ -86,6 +85,10 @@ namespace VFSEncoder {
 		public static int Main(string[] args) {
 			FileFilter filter;
 			load_encoder_commands();
+			if (encoder_commands.Count == 0) {
+				Console.WriteLine("Couldn't find any encoder commands. Do you have profiles.txt?");
+				return 1;
+			}
 
 			Application.Init();
 
@@ -123,6 +126,7 @@ namespace VFSEncoder {
 			profiles = ComboBox.NewText();
 			foreach (string k in encoder_commands.Keys)
 				profiles.AppendText(k);
+			profiles.Active = 0;
 			options.Attach(profiles, 1, 2, 1, 2);
 			go = new Button("Go!");
 			go.Clicked += new EventHandler(go_click);

diff --git a/profiles.txt b/profiles.txt
line changes: +2/-2
index 7ed95c9..a6e28c2
--- a/profiles.txt
+++ b/profiles.txt
@@ -1,2 +1,2 @@
-x264 lossless : -i {0} -vcodec x264 -cqp 0 {1}
-xvid q=1 : -i {0} -vcodec xvid -qscale 1 {1}
+x264 lossless : -i "{0}" -vcodec h264 -cqp 0 "{1}"
+xvid q=1 : -i "{0}" -vcodec xvid -qscale 1 "{1}"