Feature Requests (For Windows GUI)

Archive of historical feature requests.
Please use the GitHub link above to report issues.
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.

*******************************
cicom3nd3z
Posts: 1
Joined: Fri Nov 30, 2007 1:47 pm

feature request

Post by cicom3nd3z »

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.
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Post by s55 »

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)

Nice idea though.
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Post by s55 »

Remember folks, You can see all the latest enhancements in this thread:
Feedback is encouraged.

Still a good number of changes / features on the todo list atm. As always feature suggestions are welcome.
amalgam
Posts: 9
Joined: Mon Dec 03, 2007 8:08 pm

.img

Post by amalgam »

Hi

I just saw that "All Supported Files" won't show *.img-files by default. Something to include perhaps? (I know you can show img-files änyway, but still.) :)
amalgam
Posts: 9
Joined: Mon Dec 03, 2007 8:08 pm

Post by amalgam »

sr55 wrote:
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)

Nice idea though.
Perhaps I'm way out of line, by hoping for a real ugly implementation, but.

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. :)
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Post by s55 »

@amalgam - img files are not supported.
Only iso, ts, mpg, mpeg iirc.


Any kind of shutdown stop code is going to be messy especially where popup confirm boxes are concerned.
amalgam
Posts: 9
Joined: Mon Dec 03, 2007 8:08 pm

still...

Post by amalgam »

... 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.)
siromega
Posts: 36
Joined: Mon Jul 02, 2007 5:06 am

Re: Feature Requests (For Windows GUI)

Post by siromega »

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).

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);
            }

        }
    }
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Re: Feature Requests (For Windows GUI)

Post by s55 »

@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.
siromega
Posts: 36
Joined: Mon Jul 02, 2007 5:06 am

Re: Feature Requests (For Windows GUI)

Post by siromega »

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...
siromega
Posts: 36
Joined: Mon Jul 02, 2007 5:06 am

Re: Feature Requests (For Windows GUI)

Post by siromega »

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?
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Re: Feature Requests (For Windows GUI)

Post by s55 »

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
siromega
Posts: 36
Joined: Mon Jul 02, 2007 5:06 am

Re: Feature Requests (For Windows GUI)

Post by siromega »

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:

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;
        }
    }
Modifications to the main form class:

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;
                }
            }
        }
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Re: Feature Requests (For Windows GUI)

Post by s55 »

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)
omegaminus
Posts: 2
Joined: Sat Feb 09, 2008 2:58 am

Re: Feature Requests (For Windows GUI)

Post by omegaminus »

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:

Image
royone
Enlightened
Posts: 124
Joined: Thu Sep 06, 2007 6:06 pm

Re: Feature Requests (For Windows GUI)

Post by royone »

omegaminus wrote:I'd like to see the queue window be tolerant of 120 DPI mode.
It's better in the upcoming version. Have a look at the beta release.
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Re: Feature Requests (For Windows GUI)

Post by s55 »

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.
tutone
Posts: 8
Joined: Wed Sep 19, 2007 1:46 pm

Re: Feature Requests (For Windows GUI)

Post by tutone »

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.
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Re: Feature Requests (For Windows GUI)

Post by s55 »

The queue is already scrollable however a small glitch in the current release is preventing it.
tutone
Posts: 8
Joined: Wed Sep 19, 2007 1:46 pm

Re: Feature Requests (For Windows GUI)

Post by tutone »

that is what i thought. Thought i was going crazy.
poprock64
Posts: 3
Joined: Mon Mar 03, 2008 4:23 pm

Re: Feature Requests (For Windows GUI)

Post by poprock64 »

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.
tutone
Posts: 8
Joined: Wed Sep 19, 2007 1:46 pm

Re: Feature Requests (For Windows GUI)

Post by tutone »

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.
StickyC
Posts: 1
Joined: Sun Mar 09, 2008 4:14 pm

Re: Feature Requests (For Windows GUI)

Post by StickyC »

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!
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Re: Feature Requests (For Windows GUI)

Post by s55 »

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).
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.
Saved presets dont get added to the Presets list like they do on the OS-X version.
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.
There's a typo in the Source/Browse/Folder window: "Select the "VIDEO_TS" folder from your DVD Drvie."
Corrected in SVN
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.
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.
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.
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)
pauleccleston
Posts: 4
Joined: Tue Nov 13, 2007 2:58 pm

Re: Feature Requests (For Windows GUI)

Post by pauleccleston »

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.
Locked