Commercial Break View Bar

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Commercial Break View Bar

MLaF
Hello,

I really like that Recorded TV HD can show when commercial breaks are if using ShowAnalyzer (or comskip in my case). However, it doesn't seem to integrate as smoothly as it could. I have a few suggestions:

1. The timeline bar appears to be covered by a lookalike bar that shows commercial breaks in red. This bar blocks using a mouse to skip around the show. Instead of having a duplicate bar (but with commercial info) pop on top of the normal timeline, could you have bars above the timeline so it's not covering it. These bars would only be where commercials are, instead of having a whole second timeline show above the built-in one.

2. The commercial timeline bar does not use the UITimeout specified in the registry for Media Center. I have set mine to two seconds, so when I do replay, the timeline doesn't stay up and cover the part I rewinded to see. Could you have RecordedTV HD read the UITimeout value?

3. The color of the commercial breaks should be dark gray or something less obtrusive.

4. I know you've already worked on this, as I saw it in the release notes for a beta. However, even with the current beta, the commercial view still takes a couple seconds to display. I have a core i5 2500k and my machine is not slow at all. If you used suggestion 1 above, this may not be as unpolished looking, but obviously a more responsive UI is better.

Thanks for your great work!
Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MJT Software
Administrator
Thank you for your input... here are my responses:

1. There is no way for me to put my commercial breaks on top of the actual Media Center scrub bar and no way for me to actually create an accurate scrub bar that would mimic the actual one. When I launch my "Commercial Break Viewer" there is no way to keep the standard Media Center scrub bar on the screen.

2. I will look into using the actual timeout from the registry. Not a problem.

3. I may setup an option for the users to select the color of the commercial breaks.

4. I think I have probably made the commercial break viewer as fast as I can. It simply depends on how fast your Media Center can launch the 3rd party plugin when asked to at that given time. I do as much of the processing as possible in the background before the plugin is launched.

Obviously if I have any bright ideas I will work on continuing to improve the commercial break viewer.

Thank you for your input and suggestions!
Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MLaF
Thanks for the reply!

As for number one, since there is no way to avoid making the mouse sporadic on it's ability to click the scrub bar, would you be able to make the commercial view only come up when you hit a certain button?

I like being able to see an overview of where the commercials are, so I have an idea, but I don't always need it to pop up. Plus it doesn't always seem to pop up when you expect it to. So, it would be nice if I could set it so it only pops up when the show is paused, or maybe if you hit some button (I know it's a pain to hijack media center buttons).

Speed-wise, I imagine I'm seeing it as fast as it can get (about a 2 second delay sometimes). My hardware is pretty good for an HTPC, so I don't think that's an issue. Core i5 2500k, 8 gigs of CAS 7 memory, Corsair Force GT SSD for the system disk and a Geforce GTX 680.

Thanks again for the great plugin!
Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MLaF
In reply to this post by MJT Software
I was rereading my first question, item number 1. What I meant to ask is:

Can you put the commercial breaks above or below the Media Center scrub bar? That way the scrub bar is still the original transport and media center will handle mouse clicks. I think it could look very nice if you have about a 5-10 pixel height color bars below the standard transport that represent the color.

For instance, imagine the top dashes are the Media Center Transport and the bottom dashes are from your Commercial Break Viewer Addin:

-----------------------------------------------------------------------------------------
     -----------                ------------                    -----                   ----------
Also,

I know that Recorded TV HD is paid software, so there is no releasing the source, but is there anyway you could release the source code for the Commercial Break Viewer?
Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MLaF
Another question,

Are you using a MSAS sink for finding when to display the commercial break bar, or are you polling to see if the transport is visible?
Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MJT Software
Administrator
In reply to this post by MLaF
To clarify. When I do what I do with the Commercial Break Viewer, there is no way to keep Media Center's scrub bar on the screen. It simply disappears so what I did was recreate the whole thing from scratch to look as much like the Media Center one as possible.

I do not plan on releasing the source code, but I will explain how I did it.

The Commercial Break Viewer is a separate Media Center addin that I call from a Media Center Background addin at certain points. The background addin monitors for PlayState changes and when the transport position changes past a certain point and then I launch the Commercial Break Viewer.

The Commercial Break Viewer addin simply has the BackgroundMode set to Video and put images and ColorFills in specific positions on the screen to mimic the scrub bar and to show where the commercial breaks are.
Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MLaF
Thanks for the explanation--that makes sense. I haven't delved deep into Media Center GUI programming yet. I do remember reading somewhere about displaying video in an addin by setting it as the background.

One thing I have noticed while working with the DTBAddin source code, is that while the commercial viewer addin is active (enabled in the recorded tv settings), it handles keyhooks also. I was tweaking the way DTBAddin skips back and noticed that it wasn't doing what I programmed when you hit the forward or back button. I had to disable the commercial viewer for now, but would love to have them both working.

The way I personally like the forward and back key to work is:

Forward skips to the end of the next commercial always. This is the way it works already.

Back currently skips to the begging of the last commercial. Instead, I have it where back find the nearest commercial end and commercial start, whichever is closer, it goes to. If you hit the back button, within 3 seconds of a commercial start or end, it skips back to the second closes comm start or end. This way I get fine controls going back to get right to where I want on a commercial.

Another problem I noticed, which is why I really started tweaking the DTBAddin is that whether the commercial viewer addin was enabled or not, the back button did not work after the last commercial. This was a problem since sometimes comskip would classify the "On the next episode" part at the end of the show as a commercial. So I would want to skip back to see that. The reason DTBAddin was doing this is because it looks to see if there are any commercial ends greater than the current position, if not the method returns. So after the last commercial, there were no more commercial ends, so it would ignore even the back button. I have fixed that now.

I apologize if I'm off thinking that the commercial viewer addin does its own key processing when pressing back or forward. But if it doesn't, I'm not sure why it's behaving the way it does, since it still does something when you hit the buttons, just not what DTBAddin is programmed to do.

Thanks and sorry for the long write up!

Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MLaF
Could you confirm if your commercial break viewer does indeed handle key presses? If so, is there a way to disable it? Also, is there a way to configure how long the commercial bar stays visible?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MJT Software
Administrator
Yes, when a Media Center addin is visible it handles the key presses. There is no way for me to pass them on while the commercial break viewer is on the screen.

The length of visibility is defined the same as the standard scrub bar. You can adjust it here:

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Settings\VideoConstants\UITimeout
Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MLaF
I remember now making a suggestion for using the registry value, I forgot that you were going to change that.

As for passing the key press on, I don't think it needs to pass it on because the DTBAddin is using the Win32 API to get the raw input as opposed to catching the event on the application thread. I though what was happening is that both device are changing the location, but the Commecial Break Viewer get the last change. The only way I could test this is if I could disable the key handling in the commercial break viewer.

Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MLaF
Is there any chance you could make the key handling a user settable option? Or could I get an install with it disabled? I really like the commercial viewer, but I use DTBaddin to handle the actual skipping--which I imagine a lot of people do.

I'd really appreciate it if you could allow the user to disable the key handling.

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MJT Software
Administrator
While the Commercial Skip Viewer is up, there is no way to turn off key handling. It is a completely separate Media Center addin that I've packaged in there just like Recorded TV HD and since it is visible Media Center sends the keystrokes to my addin, which I have to handle. I cannot pass them on.
Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MLaF
What I'm saying is I don't think DTBAddin needs the keys passed to it. It's using the Win API to grab key strokes sent to the process. So it should still work regardless if your addin is visible and the current active thread.

If you could disable the key handling and send me a copy, I'll give it a shot. I've already paid for a full license for Recorded TV HD, so you won't be giving anything away for free.

Also, there are issues with the way the commercial viewer handles the back key. It would be nice it if would go back to the nearest commercial end/start (whichever is closer), and then if you hit the back key within 3 seconds, it goes back to the next closes commercial end/start. However, the problem is if people set their UI Timeout to less than 3 seconds and your commercial break addin is no longer the active page in Media Center.

All of this could be solved if DTBAddin could handle the keys, which doesn't require it being the active page. So weather your addin is up, or any other addin, it will still get the key press. But if your commercial break viewer is handling the keypress, I don't think DTBAddin will. Now, I'm not sure if even if DTBAddin gets the keystroke, if it will be able to change the transport since your addin is the active page. But, if you disable it and let me try, I'll let you know right away.

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MLaF
In reply to this post by MJT Software
I'm curious if there is any chance you will create an option to allow the user to disable your commercial break viewer addin's key handling?
Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MLaF
Still wondering, bud. Throw me a bone if you don't mind.
Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MJT Software
Administrator
I just took a look at my code again. The Commercial Break Viewer portion only handles certain keys through MCML. I HAD to do this because the skip forward/back keys DID NOT do anything when pressed while my Commercial Skip Viewer addin was visible.

The only keys that I am handling through MCML are skip back, skip forward, right, left, 1, and 3. The other keys, such as stop, pause, fast forward, play, etc do go though automatically. I had to add left, right, 1, & 3 (I use 1&3 to skip through commercial breaks forward and back) to skip through the commercial breaks manually while the Commercial Skip Viewer was visible because they DID NOT pass through to DVRMSToolbox and nothing happened when I pressed those keys. So I had to program the skipping.

I honestly would not have added the key handling if it passed through anyway. That would have just added extra work for me. I've created a version that has disabled the key handling on the Commercial Skip Viewer so you can see what I'm talking about. If you are running the alpha you will have to uninstall it first because I don't think I changed the version number since the latest alpha.

http://www.recordedtvhd.com/download/alpha/RecordedTVHDSetup-NoCSVKeys.msi
Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MLaF
I appreciate you checking. I just got back from vacation, so I can give the alpha a shot--although, I do trust you.

Since DTBaddin doesn't do the key handling, would you be willing to revamp the way your addin handles the back and forward button?

I have disabled it for a bit, so I'm trying to remember its exact behavior, but having a hard time. I think the forward button works proper as jumping to the end of commercial breaks, but the back button doesn't work as expected. I don't think it works after the last commercial break either (neither did the DTBAddin until I worked with the author).

To me, I think it's best if the back button skips to every commercial end or start, depending on which one is closer, and then if you hit back again within 3 seconds of a commercial start or end, it goes to the next nearest one. If you're at the very first commercial start, and you hit back within 3 seconds, it should go to the beginning of the show.

I have created code that does this in the DTBAddin and can send it to you if you'd like. It's not that big and I commented the heck out of it, so it's easy to see my thought process.

Please let me know if you'd like that or if I can help in any way,

J
Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MJT Software
Administrator
I'll put "customizing back and forward button actions" on my feature request list. Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

MLaF
Sounds good. Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Commercial Break View Bar

kmp14
In reply to this post by MLaF
Along the lines of what has been discussed, it would be great if the commercial break viewer would come up when I hit PLAY on the remote.  Here is the use-case:  

Watching a show, a commercial is coming, hit PLAY to look at where the commercials are marked to see if it looks accurate...or....often I just want to see how the commercial detection looks, and since PLAY brings up the time bar, it would be nice if Commercial Break Viewer came up.

Thanks!

12