Feature Requests (For Windows GUI)
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.
*******************************
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.
*******************************
-
- Posts: 1
- Joined: Fri Nov 30, 2007 1:47 pm
feature request
Possibility to cancel shutdown from the shutdown window.
At the moment i'm using "shutdown -a" from the command line, but I would like to have this feature inside the pop-up message box.
At the moment i'm using "shutdown -a" from the command line, but I would like to have this feature inside the pop-up message box.
This isn't possible. The pop-up you see with the countdown is not generated by handbrake. This is the Windows Shutdown alert box. It's mainly used by network admins to notify users that the machine is getting shut-down (hence they should save their work and log off)At the moment i'm using "shutdown -a" from the command line, but I would like to have this feature inside the pop-up message box.
Nice idea though.
Perhaps I'm way out of line, by hoping for a real ugly implementation, but.sr55 wrote:This isn't possible. The pop-up you see with the countdown is not generated by handbrake. This is the Windows Shutdown alert box. It's mainly used by network admins to notify users that the machine is getting shut-down (hence they should save their work and log off)At the moment i'm using "shutdown -a" from the command line, but I would like to have this feature inside the pop-up message box.
Nice idea though.
What about a pop-up message box generated by Handbrake that ends the shutting down? Just in case you usually set Handbrake to shutting Windows down and forget the "shutdown -a" command... Perhaps to ugly for your liking.
still...
... it has worked with every img-file I've tried. (Of course they've all been movie images.)
Btw, in Raxco's program PerfectDisk, the solution I mentioned earlier - the shutdown stop code - is implemented. Seen from user perspective it's a great (perhaps not GREAT, but still a) relief. (I'm not sure if it's exactly the same solution, but it works in the same way.)
Btw, in Raxco's program PerfectDisk, the solution I mentioned earlier - the shutdown stop code - is implemented. Seen from user perspective it's a great (perhaps not GREAT, but still a) relief. (I'm not sure if it's exactly the same solution, but it works in the same way.)
Re: Feature Requests (For Windows GUI)
Progress meter and getting rid of the DOS box....
But don't worry SR55, I'm half way done writing the code for it
I've got a few things left still (parse FPS counter and update the form, etc).
But don't worry SR55, I'm half way done writing the code for it
I've got a few things left still (parse FPS counter and update the form, etc).
Code: Select all
class CLI
{
/// <summary>
/// CLI output is based on en-US locale,
/// we use this CultureInfo as IFormatProvider to *.Parse() calls
/// </summary>
static readonly public CultureInfo Culture = new CultureInfo("en-US", false);
Process hbProc = new Process();
Regex rParseProgress;
public CLI()
{
rParseProgress = new Regex(@"^Encoding:\stask\s(\d)\sof\s(\d),\s(.*)%\s?(.*)$", RegexOptions.Compiled & RegexOptions.IgnoreCase & RegexOptions.IgnorePatternWhitespace);
}
public void RunCLI(Object sender, DoWorkEventArgs args)
{
// Get this thread
BackgroundWorker encControlThread = sender as BackgroundWorker;
// Recover the parameters
string query;
bool useShellExec;
bool noWindow;
Array a = args.Argument as Array;
query = a.GetValue(0) as string;
useShellExec = a.GetValue(1).Equals(true); // cant cast to bool
noWindow = a.GetValue(2).Equals(true); // cant cast to bool
// Prepare + Start CLI
string handbrakeCLIPath = Path.Combine(Application.StartupPath, "HandBrakeCLI.exe");
string logPath = Path.Combine(Path.GetTempPath(), "hb_encode_log.dat");
string strCmdLine = String.Format(@"cmd /c """"{0}"" {1} 2>""{2}"" """, handbrakeCLIPath, query, logPath);
ProcessStartInfo cliStart = new ProcessStartInfo("CMD.exe", strCmdLine);
cliStart.RedirectStandardOutput = true;
cliStart.UseShellExecute = useShellExec;
hbProc = Process.Start(cliStart);
// Retrieve standard output and report back to parent thread until the process is complete
String line;
TextReader stdOutput;
stdOutput = hbProc.StandardOutput;
int thisPass;
int totalPass;
float pctProgress;
while (!hbProc.HasExited)
{
Thread.Sleep(100);
//line = stdOutput.ReadToEnd();
line = stdOutput.ReadLine();
// Parse line - get pass # of # and percentage to figure out how far along we are...
if (rParseProgress.IsMatch(line))
{
Match m = rParseProgress.Match(line);
thisPass = int.Parse(m.Groups[1].ToString());
totalPass = int.Parse(m.Groups[2].ToString());
pctProgress = float.Parse(m.Groups[3].ToString());
encControlThread.ReportProgress((int) pctProgress);
}
System.Diagnostics.Debug.WriteLine(line);
}
}
}
Re: Feature Requests (For Windows GUI)
@siromega - I already have code that allows a progress bar in both Queue and main window. The problem is it's not any use. .NET based code can't handle sub-second inputs without causing process stalls on the CLI which in turn leads to mild to moderate corruption through the video.
Your welcome to try this, however I don't think it'll work. Easiest way to test for corruption issue is to convert a few DVD's to ISO and just run them through. You should be able to see corruption from a short single chapter encode.
There was a discussion about it in the Development forum a few months ago.
See http://forum.handbrake.fr/viewtopic.php ... it=Windows for details.
Your welcome to try this, however I don't think it'll work. Easiest way to test for corruption issue is to convert a few DVD's to ISO and just run them through. You should be able to see corruption from a short single chapter encode.
There was a discussion about it in the Development forum a few months ago.
See http://forum.handbrake.fr/viewtopic.php ... it=Windows for details.
Re: Feature Requests (For Windows GUI)
Hmm, thats really disappointing. I'll finish and double check my output and see if it gets corrupted.
MS Always has these kinds of problems with stuff... I run into this stuff at work all the time. I suppose I shouldn't expect anything different here...
MS Always has these kinds of problems with stuff... I run into this stuff at work all the time. I suppose I shouldn't expect anything different here...
Re: Feature Requests (For Windows GUI)
Crapola!! Four from DVD (via DVD43) worked perfect. The first ISO is frought with artifacts. Crap crap and more crap. I doubt there is anyway to fix this on the CLI side is there?
Re: Feature Requests (For Windows GUI)
I don't think so.
To make matters worse, its not a consistent problem. I find ISOs and direct rips are the worst offenders. with 3 outa 4 times on the same source failing. Probably because there is no DVD drive bottleneck.
You can direct pipe from the CLI straight into a text file fine however the CLI holds exclusive access to the file until its done meaning you can't open it read only. (thats how i've done the activity logging window) Dump to file and display only when the encode is done. It's a damned pain but there isn't much that I know that'll fix that. It'd be nice if the GUI could get read only access to the file. That way the standard output with the encode progress could be piped to and read in that way in read only mode.
Meh, The joys of .NET programming
To make matters worse, its not a consistent problem. I find ISOs and direct rips are the worst offenders. with 3 outa 4 times on the same source failing. Probably because there is no DVD drive bottleneck.
You can direct pipe from the CLI straight into a text file fine however the CLI holds exclusive access to the file until its done meaning you can't open it read only. (thats how i've done the activity logging window) Dump to file and display only when the encode is done. It's a damned pain but there isn't much that I know that'll fix that. It'd be nice if the GUI could get read only access to the file. That way the standard output with the encode progress could be piped to and read in that way in read only mode.
Meh, The joys of .NET programming
Re: Feature Requests (For Windows GUI)
So after being sick for a few days I had time to think. I tried something tonight and I was able to both encode a DVD and an ISO. The tactic was to copy the logfile and then read the copy, then destroy it. Its not elegant (its downright ugly), but its worked for me twice now...
CLI Class:
Modifications to the main form class:
CLI Class:
Code: Select all
class CLI
{
/// <summary>
/// CLI output is based on en-US locale,
/// we use this CultureInfo as IFormatProvider to *.Parse() calls
/// </summary>
static readonly public CultureInfo Culture = new CultureInfo("en-US", false);
Process hbProc = new Process();
Regex rParseProgress = new Regex(@"^Encoding:\stask\s(\d)\sof\s(\d),\s(.*)%\s?(.*)$", RegexOptions.Compiled & RegexOptions.IgnoreCase & RegexOptions.IgnorePatternWhitespace);
long filePos = 0;
public Process runCli(object s, string query, bool stderr, bool stdout, bool useShellExec, bool noWindow)
{
try
{
string handbrakeCLIPath = Path.Combine(Application.StartupPath, "HandBrakeCLI.exe");
string logPath = Path.Combine(Path.GetTempPath(), "hb_encode_log.dat");
string strCmdLine = String.Format(@"cmd /c """"{0}"" {1} >""{2}"" """, handbrakeCLIPath, query, logPath);
ProcessStartInfo cliStart = new ProcessStartInfo("CMD.exe", strCmdLine);
hbProc = Process.Start(cliStart);
// Set the process Priority
switch (Properties.Settings.Default.processPriority)
{
case "Realtime":
hbProc.PriorityClass = ProcessPriorityClass.RealTime;
break;
case "High":
hbProc.PriorityClass = ProcessPriorityClass.High;
break;
case "Above Normal":
hbProc.PriorityClass = ProcessPriorityClass.AboveNormal;
break;
case "Normal":
hbProc.PriorityClass = ProcessPriorityClass.Normal;
break;
case "Low":
hbProc.PriorityClass = ProcessPriorityClass.Idle;
break;
default:
hbProc.PriorityClass = ProcessPriorityClass.BelowNormal;
break;
}
}
catch
{
MessageBox.Show("Internal Software Error. Please Restart the Program");
}
return hbProc;
}
public float CheckLogFile()
{
if (File.Exists(Path.Combine(Path.GetTempPath(), "hb_encode_log.dat2"))) return -1;
// Create copy of logfile
File.Copy(Path.Combine(Path.GetTempPath(), "hb_encode_log.dat"), Path.Combine(Path.GetTempPath(), "hb_encode_log.dat2"));
StreamReader reader = new StreamReader(Path.Combine(Path.GetTempPath(), "hb_encode_log.dat2"));
reader.BaseStream.Seek(filePos, SeekOrigin.Begin);
filePos = reader.BaseStream.Length;
string newtxt = reader.ReadToEnd();
string lastline = newtxt.Substring(newtxt.LastIndexOf("\r") + 1);
// Get info and notify parent thread
Match m = rParseProgress.Match(lastline);
float pctProgress = 0;
if (m.Groups.Count > 1)
{
int thisPass = int.Parse(m.Groups[1].ToString());
int totalPass = int.Parse(m.Groups[2].ToString());
pctProgress = float.Parse(m.Groups[3].ToString());
}
// Close and delete copy
reader.Close();
File.Delete(Path.Combine(Path.GetTempPath(), "hb_encode_log.dat2"));
return pctProgress;
}
}
Code: Select all
public delegate void UpdProg(object pct);
public void UpdateProgress(object pct)
{
lbl_encode.Text = pct.ToString();
}
private void procMonitor(object state)
{
// Make sure we are not already encoding and if we are then display an error.
if (hbProc != null)
MessageBox.Show("Handbrake is already encoding a video!", "Status", MessageBoxButtons.OK, MessageBoxIcon.Warning);
else
{
hbProc = process.runCli(this, (string)state, false, false, false, false);
while (!hbProc.HasExited)
{
Thread.Sleep(10000);
float prog = process.CheckLogFile();
this.Invoke(new UpdProg(UpdateProgress), prog);
}
hbProc.WaitForExit();
setEncodeLabel();
hbProc = null;
// Do something whent he encode ends.
switch (Properties.Settings.Default.CompletionOption)
{
case "Shutdown":
System.Diagnostics.Process.Start("Shutdown", "-s -t 60");
break;
case "Log Off":
ExitWindowsEx(0, 0);
break;
case "Suspend":
Application.SetSuspendState(PowerState.Suspend, true, true);
break;
case "Hibernate":
Application.SetSuspendState(PowerState.Hibernate, true, true);
break;
case "Lock System":
LockWorkStation();
break;
case "Quit HandBrake":
Application.Exit();
break;
default:
break;
}
}
}
Re: Feature Requests (For Windows GUI)
This is something I'll have a look at after 0.9.3 goes out the door. We are effectivly feature frozen at the moment whilst working out a number of bugs however onces thats done i'll take a look at this.
I wonder why file copy can open the file for reading to copy it but file read can't (even when in read only mode)
I wonder why file copy can open the file for reading to copy it but file read can't (even when in read only mode)
-
- Posts: 2
- Joined: Sat Feb 09, 2008 2:58 am
Re: Feature Requests (For Windows GUI)
I'd like to see the queue window be tolerant of 120 DPI mode. That's what I use, and this is what the queue window looks like:
Re: Feature Requests (For Windows GUI)
It's better in the upcoming version. Have a look at the beta release.omegaminus wrote:I'd like to see the queue window be tolerant of 120 DPI mode.
Re: Feature Requests (For Windows GUI)
The newer design should indeed work better however it's untested on the 120dpi display testing.
I'm not sure what actually causes the system to incrrectly draw the screen. It should be identical on both.
I'm not sure what actually causes the system to incrrectly draw the screen. It should be identical on both.
Re: Feature Requests (For Windows GUI)
It would be nice to be able to scroll the que with a scroll bar. It would also be nice to have numbers next to each encode so you know how many there are left and which number a particular encode is the que.
Re: Feature Requests (For Windows GUI)
The queue is already scrollable however a small glitch in the current release is preventing it.
Re: Feature Requests (For Windows GUI)
that is what i thought. Thought i was going crazy.
Re: Feature Requests (For Windows GUI)
Is there any way that gui would support external subtitles (srt. etc.) because I would like to transcode foreign mpeg2 movies from DVB-S satellite PC card? Thanks.
Re: Feature Requests (For Windows GUI)
I would love to be able to export or save my que and then be able to import it or load it back again. There are times when i create a large que and then i need to restart my computer. If I restart I lose the que.
Re: Feature Requests (For Windows GUI)
Handbrake doesn't seem to like loading files from UNC paths (Windows shares), this'd be a very very nice feature to have (or at least a better error message - it uses the generic "No Title(s) found. Please make sure you have selected a valid, non-copy protected source. Please refer to the FAQ (see Help Menu)." message now).
Saved presets dont get added to the Presets list like they do on the OS-X version.
There's a typo in the Source/Browse/Folder window: "Select the "VIDEO_TS" folder from your DVD Drvie."
Thanks!
Saved presets dont get added to the Presets list like they do on the OS-X version.
There's a typo in the Source/Browse/Folder window: "Select the "VIDEO_TS" folder from your DVD Drvie."
Thanks!
Re: Feature Requests (For Windows GUI)
I've added an error message for this. HandBrake is running under cygwin so it can't handle UNC filepaths like a native application can.Handbrake doesn't seem to like loading files from UNC paths (Windows shares), this'd be a very very nice feature to have (or at least a better error message - it uses the generic "No Title(s) found. Please make sure you have selected a valid, non-copy protected source. Please refer to the FAQ (see Help Menu)." message now).
Been on the todo list for a while. It will eventually happen when I complete the revamp of the presets system either for 0.9.3 or the release after that.Saved presets dont get added to the Presets list like they do on the OS-X version.
Corrected in SVNThere's a typo in the Source/Browse/Folder window: "Select the "VIDEO_TS" folder from your DVD Drvie."
Not a windows GUI feature request. SRT's in HandBrake have already been requested before. As it stands, it'll take someone outside the project to write a patch for this to be included otherwise this won't happen any time soon.Is there any way that gui would support external subtitles (srt. etc.) because I would like to transcode foreign mpeg2 movies from DVB-S satellite PC card? Thanks.
There is already a button which generates a batch script. Basically that exports the queue straight to a script. If you run that script, it'll simply run through each encode, one by one. (With no need to load it back into HandBrake)I would love to be able to export or save my que and then be able to import it or load it back again. There are times when i create a large que and then i need to restart my computer. If I restart I lose the que.
-
- Posts: 4
- Joined: Tue Nov 13, 2007 2:58 pm
Re: Feature Requests (For Windows GUI)
my feature request is fairly simple, an option to allow handbrake to read a series based dvd and generate a queue list for all of the titles, this could also be controlled by specifying the minimum length of the title to prevent ripping non series related stuff (dvd menu's etc), so for instance a box to insert 5 mins as the minimum title length, this would be really great and would def save time for people who encode lots of series dvd's.
paul.
paul.