Introducing WMC mini-mods
- IT Troll
- Posts: 1234
- Joined: Sun Nov 27, 2011 9:42 am
- Location: Edinburgh, UK
- HTPC Specs:
A new mod suggestion. It is possible to set a default time pad value for scheduled recordings, however the only options available are for “x minutes after, when possible”. When setting the options for a specific recording it is possible to select “10 minutes after”, which forces a fixed time pad. It would be great if the default setting included the “10 minutes after” fixed length option. Further recent discussion on this and why the setting is useful, can be found here:
viewtopic.php?t=14558
This is a long standing issue.
viewtopic.php?t=14100
viewtopic.php?t=12192
viewtopic.php?t=14558
This is a long standing issue.
viewtopic.php?t=14100
viewtopic.php?t=12192
Are you a Recorded TV HD user or want to give it a try? Check out the community-made update; Recorded TV HD v2.1.1
- Kevin Chalet
- Posts: 190
- Joined: Mon Oct 08, 2018 12:00 pm
- Location:
- HTPC Specs:
I took a look at that a while ago and it should be easy to mod. I'll take a look tomorrowIT Troll wrote: ↑Wed Feb 28, 2024 10:45 pm A new mod suggestion. It is possible to set a default time pad value for scheduled recordings, however the only options available are for “x minutes after, when possible”. When setting the options for a specific recording it is possible to select “10 minutes after”, which forces a fixed time pad. It would be great if the default setting included the “10 minutes after” fixed length option. Further recent discussion on this and why the setting is useful, can be found here
-
- Posts: 120
- Joined: Wed Jun 05, 2013 6:09 pm
- Location:
- HTPC Specs:
awesome...look forward to the results.
- Kevin Chalet
- Posts: 190
- Joined: Mon Oct 08, 2018 12:00 pm
- Location:
- HTPC Specs:
New 2.3.0 release:
ehshell.dll patches:
Option to configure the default hard pre-padding and post-padding for TV recordings:
Windows Media Center supports two types of pre and post-paddings for TV recordings:
To allow users to configure a hard pre or post-padding, WMC mini-mods 2.3.0 patches RecordHelper.DefaultHardPrePadding and RecordHelper.DefaultHardPostPadding:
For consistency with the existing/built-in RecordingSoftPrePadding and RecordingSoftPostPadding settings, I named the new hooks RecordingHardPrePadding and RecordingHardPostPadding and decided to use the same value format... even if it's not super user-friendly:
- For RecordingHardPostPadding, it's easy, the value stored in the registry is the number of seconds that will be added to the recording. E.g for a 10-minute post-padding: 600 (in decimal).
- For RecordingHardPrePadding, it's a bit more complicated, as the formula "4294967295 - [number of seconds to add] + 1" must be used to compute the final registry value. E.g for a 10-minute pre-padding: 4294966696 (in decimal).
Edit: for those interested, here's the logic used by WMC for one-time recording requests:
And here's the logic used to compute the actual start/end times:
Note: configuring a default hard pre or post-padding doesn't override the paddings used for existing recording requests if you specified a non-default value.
Thanks IT Troll for the idea
ehshell.dll patches:
Option to configure the default hard pre-padding and post-padding for TV recordings:
Windows Media Center supports two types of pre and post-paddings for TV recordings:
- A soft padding, that will cause the recording to be extended beyond the original start/end time unless a program is scheduled before (for a pre-padding) or after (for a post-padding) the current recording.
- A hard padding, that works the same way but ignores the fact a program is scheduled before (for a pre-padding) or after (for a post-padding). Said differently, the current recording is always extended even if a program is scheduled immediately before or after the current recording.
To allow users to configure a hard pre or post-padding, WMC mini-mods 2.3.0 patches RecordHelper.DefaultHardPrePadding and RecordHelper.DefaultHardPostPadding:
Code: Select all
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using ehiProxy;
using Microsoft.MediaCenter.Debug;
using Microsoft.MediaCenter.Guide;
using Microsoft.MediaCenter.Playback;
using Microsoft.MediaCenter.Pvr;
using Microsoft.MediaCenter.TV.Tuners;
using Microsoft.Win32;
namespace MediaCenter.Video
{
// Token: 0x02000D71 RID: 3441
internal sealed partial class RecordHelper : IDisposable
{
// Token: 0x17001E9E RID: 7838
// (get) Token: 0x06007972 RID: 31090 RVA: 0x0002A28D File Offset: 0x0002848D
public TimeSpan DefaultHardPrePadding
{
get
{
using var key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Media Center\\MiniMods");
if (key is not null && key.GetValue("RecordingHardPrePadding") is int value)
{
return TimeSpan.FromSeconds(-value);
}
return TimeSpan.Zero;
}
}
}
}
Code: Select all
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using ehiProxy;
using Microsoft.MediaCenter.Debug;
using Microsoft.MediaCenter.Guide;
using Microsoft.MediaCenter.Playback;
using Microsoft.MediaCenter.Pvr;
using Microsoft.MediaCenter.TV.Tuners;
using Microsoft.Win32;
namespace MediaCenter.Video
{
// Token: 0x02000D71 RID: 3441
internal sealed partial class RecordHelper : IDisposable
{
// Token: 0x17001E9F RID: 7839
// (get) Token: 0x06007973 RID: 31091 RVA: 0x0002A28D File Offset: 0x0002848D
public TimeSpan DefaultHardPostPadding
{
get
{
using var key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Media Center\\MiniMods");
if (key is not null && key.GetValue("RecordingHardPostPadding") is int value)
{
return TimeSpan.FromSeconds(value);
}
return TimeSpan.Zero;
}
}
}
}
- For RecordingHardPostPadding, it's easy, the value stored in the registry is the number of seconds that will be added to the recording. E.g for a 10-minute post-padding: 600 (in decimal).
- For RecordingHardPrePadding, it's a bit more complicated, as the formula "4294967295 - [number of seconds to add] + 1" must be used to compute the final registry value. E.g for a 10-minute pre-padding: 4294966696 (in decimal).
You should be able to configure both a soft and a hard (pre or post) padding, but in this case, the hard padding must always be less than the soft one.Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\MiniMods]
"RecordingHardPrePadding"=dword:fffffda8
"RecordingHardPostPadding"=dword:00000258
Edit: for those interested, here's the logic used by WMC for one-time recording requests:
Code: Select all
request = Scheduler.CreateOneTimeRequest(scheduleEntry, channel);
request.UpdateAndSchedule(delegate
{
request.KeepLength = keepUntil;
request.Quality = quality;
request.PrePaddingRequested = DefaultSoftPrePadding - hardPrePadding;
request.PrePaddingRequired = hardPrePadding;
request.PostPaddingRequested = softPostPadding - hardPostPadding;
request.PostPaddingRequired = hardPostPadding;
request.AnyLanguage = DefaultAnyLanguage;
}, Scheduler);
Code: Select all
internal void GetTimes(ScheduleEntry scheduleEntry, out DateTime contentStartTime, out DateTime contentEndTime, out DateTime requiredStartTime, out DateTime requiredEndTime, out DateTime requestedStartTime, out DateTime requestedEndTime)
{
if (scheduleEntry == null)
{
throw new ArgumentNullException("scheduleEntry");
}
contentStartTime = scheduleEntry.StartTime;
contentEndTime = scheduleEntry.EndTime;
requiredStartTime = contentStartTime - PrePaddingRequired;
requiredEndTime = contentEndTime + PostPaddingRequired;
requestedStartTime = requiredStartTime - PrePaddingRequested;
if (requestedStartTime > requiredStartTime)
{
requestedStartTime = requiredStartTime;
}
requestedEndTime = requiredEndTime + PostPaddingRequested;
if (requestedEndTime < requiredEndTime)
{
requestedEndTime = requiredEndTime;
}
TimeSpan timeSpan = TimeSpan.FromSeconds((requiredEndTime - requiredStartTime).TotalSeconds * OverlapAllowanceRatio);
if (timeSpan > OverlapAllowanceDuration)
{
timeSpan = OverlapAllowanceDuration;
}
DateTime dateTime = Min(requiredStartTime + Max(timeSpan, TimeSpan.FromSeconds(100.0)), requiredEndTime - TimeSpan.FromSeconds(60.0));
if (PrototypicalScheduleEntry != null && scheduleEntry != null && PrototypicalScheduleEntry.Id == scheduleEntry.Id && dateTime < CreationTime)
{
dateTime = CreationTime;
}
requiredStartTime = dateTime;
}
Thanks IT Troll for the idea
You do not have the required permissions to view the files attached to this post.
Last edited by Kevin Chalet on Fri Mar 01, 2024 6:22 pm, edited 1 time in total.
-
- Posts: 120
- Joined: Wed Jun 05, 2013 6:09 pm
- Location:
- HTPC Specs:
- Kevin Chalet
- Posts: 190
- Joined: Mon Oct 08, 2018 12:00 pm
- Location:
- HTPC Specs:
-
- Posts: 120
- Joined: Wed Jun 05, 2013 6:09 pm
- Location:
- HTPC Specs:
I had written something that was out of context...lol
- Kevin Chalet
- Posts: 190
- Joined: Mon Oct 08, 2018 12:00 pm
- Location:
- HTPC Specs:
Ah!
When you have a moment, please give the 2.3.0 version a try and see if the new mod does what you want
When you have a moment, please give the 2.3.0 version a try and see if the new mod does what you want
Last edited by Kevin Chalet on Fri Mar 01, 2024 6:22 pm, edited 1 time in total.
- IT Troll
- Posts: 1234
- Joined: Sun Nov 27, 2011 9:42 am
- Location: Edinburgh, UK
- HTPC Specs:
Ooh, I shall give this a try this weekend. I'm sure others will find it useful too.Kevin Chalet wrote: ↑Fri Mar 01, 2024 3:08 pm Option to configure the default hard pre-padding and post-padding for TV recordings:
I had hoped that it would be possible to patch (unlock) more options into the dropdown of default settings, but can appreciate that would be more difficult.Kevin Chalet wrote: ↑Fri Mar 01, 2024 3:12 pm (note: as usual with the WMC mini-mods project, configuration is only made via the registry, the GUI hasn't been updated to support that)
So to be clear. If I have a default GUI setting of "10 minutes after, when possible" and set RecordingHardPostPadding to 600 this should give the 10 minutes of hard padding. But does this mean that when looking at the recording options for a given recording/series it will still state "10 minutes after, when possible"? In which case does that mean it is then impossible to override the 10 mins hard padding on a specific recording to revert to 10 mins soft padding?
Are you a Recorded TV HD user or want to give it a try? Check out the community-made update; Recorded TV HD v2.1.1
-
- Posts: 120
- Joined: Wed Jun 05, 2013 6:09 pm
- Location:
- HTPC Specs:
is there anyway to patch that into the GUI?
- Kevin Chalet
- Posts: 190
- Joined: Mon Oct 08, 2018 12:00 pm
- Location:
- HTPC Specs:
Note: I re-versioned 2.2.2 as 2.3.0 (as there was no fix in that release)
What's crazy is that it's even able to list non-standard values. Here's an example with a hard 7-minute post-padding configured via the registry:
Nothing is impossible, but updating the GUI is not trivial. And in this case, tweaking these settings via the registry is a lot more flexible, as you can combine both a soft and a hard padding (something you couldn't do with the single dropdown offered by the GUI).
No, WMC will list "10 minutes after" as the selected option and will offer "10 minutes after, when possible" (i.e a soft 10-minute post-padding) as an alternative option:IT Troll wrote: ↑Fri Mar 01, 2024 6:16 pm So to be clear. If I have a default GUI setting of "10 minutes after, when possible" and set RecordingHardPostPadding to 600 this should give the 10 minutes of hard padding. But does this mean that when looking at the recording options for a given recording/series it will still state "10 minutes after, when possible"? In which case does that mean it is then impossible to override the 10 mins hard padding on a specific recording to revert to 10 mins soft padding?
What's crazy is that it's even able to list non-standard values. Here's an example with a hard 7-minute post-padding configured via the registry:
You do not have the required permissions to view the files attached to this post.
- IT Troll
- Posts: 1234
- Joined: Sun Nov 27, 2011 9:42 am
- Location: Edinburgh, UK
- HTPC Specs:
Ah, that's excellent then. I was worried it would be confusing for my partner.Kevin Chalet wrote: ↑Fri Mar 01, 2024 6:45 pm No, WMC will list "10 minutes after" as the selected option and will offer "10 minutes after, when possible" (i.e a soft 10-minute post-padding) as an alternative option:
Are you a Recorded TV HD user or want to give it a try? Check out the community-made update; Recorded TV HD v2.1.1
-
- Posts: 120
- Joined: Wed Jun 05, 2013 6:09 pm
- Location:
- HTPC Specs:
not trying to make more work for you, but how about a stand alone gui front end, like EPG123 that combines all the tweaks?
- Kevin Chalet
- Posts: 190
- Joined: Mon Oct 08, 2018 12:00 pm
- Location:
- HTPC Specs:
Why not. That said, it's not something I'd use myself - I have too many WMC machines to make that efficient (I use PowerShell remoting to tweak all the machines at once) - so there would need to be a strong demand from the community
-
- Posts: 120
- Joined: Wed Jun 05, 2013 6:09 pm
- Location:
- HTPC Specs:
I would guess most of the people left here are just the hard core people who are tech savy.
I only manage 2 WMC machines, but constant poking around in the registry doesn't really blow my skirt up.
It requires remembering what i did last time.
I can barely remember what i had for lunch yesterday, let alone what i changed in the registry 2 months ago.
I only manage 2 WMC machines, but constant poking around in the registry doesn't really blow my skirt up.
It requires remembering what i did last time.
I can barely remember what i had for lunch yesterday, let alone what i changed in the registry 2 months ago.
- Kevin Chalet
- Posts: 190
- Joined: Mon Oct 08, 2018 12:00 pm
- Location:
- HTPC Specs:
Well, WMC is no longer the super-easy plug-and-play solution it used to be (tho' in many cases, you still had to tweak a few things manually, even when it still was officially supported software): "mettre les mains dans le cambouis" as we say here is pretty much required to keep using WMC in 2024
That said, using PowerShell to tweak the registry is definitely not reserved to specialists since even a PowerShell noob like me can use it
To simplify things a bit, I decided in 2.0 to regroup all the mini-mods-related hooks under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\MiniMods.The Mac wrote: ↑Fri Mar 01, 2024 7:44 pm I only manage 2 WMC machines, but constant poking around in the registry doesn't really blow my skirt up.
It requires remembering what i did last time.
I can barely remember what i had for lunch yesterday, let alone what i changed in the registry 2 months ago.
To configure WMC mini-mods with PowerShell, you only need 3 commands:
- To create the registry key (required only once, after running the installation script):
Code: Select all
New-Item 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\MiniMods'
- To configure a specific mod (e.g the hard post-padding):
Code: Select all
Set-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\MiniMods' -Name RecordingHardPostPadding -Value 1200
- To display all the configured values:
Code: Select all
Get-Item 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\MiniMods'
Last edited by Kevin Chalet on Fri Mar 01, 2024 8:16 pm, edited 1 time in total.
-
- Posts: 120
- Joined: Wed Jun 05, 2013 6:09 pm
- Location:
- HTPC Specs:
No, not complicated at all. Very simple in fact.
I have no issues "Getting my hands dirty." (2 years of high school french there...lol..i did have to look up cambouis, i initially thought it was something else...)
I have no issues "Getting my hands dirty." (2 years of high school french there...lol..i did have to look up cambouis, i initially thought it was something else...)
- Kevin Chalet
- Posts: 190
- Joined: Mon Oct 08, 2018 12:00 pm
- Location:
- HTPC Specs:
Haha, did you think it was something... spicy?
New 2.4.0 release:
ehshell.dll patches:
Option to extend the content size correction workaround introduced in KB974324 to support 4K UHD displays:
(this one took me a while... )
In 2009, Microsoft released a fix/workaround to remove the flickering pixels that could appear on the right side of 1080p screens on certain configurations (Intel HD platforms were particularly affected at the time): http://web.archive.org/web/201503290047 ... /kb/974324
Sadly, that fix only works for 1920x1080 displays, excluding 4K UHD. This was no big deal in 2009 but 4K UHD monitors/TV sets are now much common and multiple users reported that fix doesn't, indeed, work with 4K displays: viewtopic.php?t=9622. A workaround was eventually found - setting LogicalWidth to 3839 in the registry - but it unfortunately doesn't work when disabling the exclusive fullscreen mode via WMC mini-mods (something users of recent Intel or AMD platforms have to do since these platforms exhibit major issues with WMC's traditional fullscreen mode).
WMC mini-mods 2.4.0 addresses that by introducing a new EnableExtendedContentSizeCorrection hook that allows applying the same exact workaround Microsoft added 15 years ago to 4K displays. Unlike the LogicalWidth trick, it works whether WMC uses the exclusive or the non-exclusive fullscreen mode:
Code: Select all
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel.Design;
using System.Runtime.InteropServices;
using System.Threading;
using ehiExtCOM;
using EHMedia;
using MediaCenter.Extensibility;
using MediaCenter.ListMaker;
using Microsoft.MediaCenter.Debug;
using Microsoft.MediaCenter.Hosting.Infrastructure;
using Microsoft.MediaCenter.Interop;
using Microsoft.MediaCenter.Playback;
using Microsoft.MediaCenter.Shell;
using Microsoft.MediaCenter.UI;
using Microsoft.MediaCenter.UI.Drawing;
using Microsoft.MediaCenter.UI.VideoPlayback;
using Microsoft.MediaCenter.Utility;
using Microsoft.Win32;
namespace ServiceBus.UIFramework
{
// Token: 0x02000B4F RID: 2895
internal sealed partial class PageBasedUCPService : UCPService, IUsageLogger, IUIVideoStreamBroker
{
// Token: 0x060067BE RID: 26558 RVA: 0x001A7F98 File Offset: 0x001A6198
private void UpdateContentSize(Size logicalSize, Size physicalSize)
{
if (this._rootGadget != null)
{
Rectangle rectangle = new Rectangle(0, 0, logicalSize.Width, logicalSize.Height);
SizeF sizeF;
if (this.ComputeUsableArea(ref rectangle, out sizeF, this.Form.WindowState, false))
{
float num = Math.Min(sizeF.Width, sizeF.Height);
Vector3 vector = new Vector3(num, num, num);
this.NotificationPanel.IdealLeft = rectangle.Left;
this.NotificationPanel.IdealTop = rectangle.Top;
Size size = rectangle.Size;
Size size2 = new Size((int)Math.Round((double)((float)size.Width / vector.X)), (int)Math.Round((double)((float)size.Height / vector.Y)));
if (this.Form.WindowState == FormWindowState.Maximized && size2.Width == 1365 && size2.Height == 768)
{
if (size.Width == 1920 && size.Height == 1080)
{
size2.Width = 1366;
}
else
{
using var key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Media Center\\MiniMods");
if (key is not null && key.GetValue("EnableExtendedContentSizeCorrection") is 1)
{
if (size.Width is 3840 && size.Height is 2160)
{
size2.Width = 1366;
}
}
}
}
bool flag = this.IsWidescreen();
this.NotificationPanel.IdealWidth = size2.Width;
this.NotificationPanel.IdealHeight = size2.Height;
if (ListMakerUtility.ProgressBar != null)
{
ListMakerUtility.ProgressBar.Apply16X9();
}
bool flag2 = this.IsWidescreen();
if (flag != flag2)
{
Microsoft.MediaCenter.UI.Environment environment = Microsoft.MediaCenter.UI.Environment.Get(this._session);
if (environment != null)
{
environment.SetWidescreen(flag2);
}
if (this.IsWidescreenChangedHandler != null)
{
this.IsWidescreenChangedHandler(flag2);
}
}
if (!logicalSize.IsEmpty)
{
if (physicalSize != logicalSize)
{
vector.X *= (float)physicalSize.Width / (float)logicalSize.Width;
vector.Y *= (float)physicalSize.Height / (float)logicalSize.Height;
}
this._session.OutputDevice.FlushFontCache();
this._sizefContentScale = new SizeF(vector.X, vector.Y);
this.NotificationPanel.Scale = vector;
if (this.Form.WindowState == FormWindowState.Maximized)
{
this.RootGadget.ToolbarRoot.IdealWidth = size2.Width;
this.RootGadget.ToolbarRoot.IdealHeight = size2.Height;
this.RootGadget.ToolbarRoot.Margin = this.UserConfig.OverscanMargins;
this.RootGadget.ToolbarRoot.Scale = vector;
this.Toolbars.TwoFootToolBar.ToolBarData.EnableMiniTransportToolbar = false;
this.Toolbars.TwoFootToolBar.ToolBarData.AllowItvToolbar = true;
}
else
{
float num2 = 0.85f;
Vector3 vector2;
if (vector.X >= num2)
{
vector2 = vector;
}
else
{
vector2 = new Vector3(num2, num2, num2);
}
this.RootGadget.ToolbarRoot.IdealWidth = (int)Math.Round((double)((float)physicalSize.Width / vector2.X));
this.RootGadget.ToolbarRoot.IdealHeight = (int)Math.Round((double)((float)physicalSize.Height / vector2.Y));
this.RootGadget.ToolbarRoot.Margin = Inset.Empty;
this.RootGadget.ToolbarRoot.Scale = vector2;
if (physicalSize.Width < 790)
{
this.Toolbars.TwoFootToolBar.ToolBarData.EnableMiniTransportToolbar = true;
}
else
{
this.Toolbars.TwoFootToolBar.ToolBarData.EnableMiniTransportToolbar = false;
}
if (physicalSize.Width < 850)
{
this.Toolbars.TwoFootToolBar.ToolBarData.AllowItvToolbar = false;
}
else
{
this.Toolbars.TwoFootToolBar.ToolBarData.AllowItvToolbar = true;
}
}
if (this.IdealSizeChangedHandler != null)
{
this.IdealSizeChangedHandler(this.NotificationPanel.IdealWidth.Value, this.NotificationPanel.IdealHeight.Value);
}
}
}
this._rcUsableContent = rectangle;
}
}
}
}
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\MiniMods]
"EnableExtendedContentSizeCorrection"=dword:00000001
Note: if you decide to enable this mod, I'd recommend reverting LogicalWidth to the original value.
You do not have the required permissions to view the files attached to this post.
- IT Troll
- Posts: 1234
- Joined: Sun Nov 27, 2011 9:42 am
- Location: Edinburgh, UK
- HTPC Specs:
I installed the mod today and all seems to be working fine; with RecordingHardPostPadding set to 10 minutes, I get "10 minutes after" (hard padding) for new recordings.
I then realised that my recording default was set to "5 minutes after, when possible", which is perhaps not a good idea:
Or am I missing something?
I then realised that my recording default was set to "5 minutes after, when possible", which is perhaps not a good idea:
I can see that this would potentially create a negative value, which might not calculate correctly. But even if this results in a null value (which I guess is the likely outcome), the logic still seems to work.Kevin Chalet wrote: ↑Fri Mar 01, 2024 3:08 pm You should be able to configure both a soft and a hard (pre or post) padding, but in this case, the hard padding must always be less than the soft one.
Or am I missing something?
You do not have the required permissions to view the files attached to this post.
Are you a Recorded TV HD user or want to give it a try? Check out the community-made update; Recorded TV HD v2.1.1
- Kevin Chalet
- Posts: 190
- Joined: Mon Oct 08, 2018 12:00 pm
- Location:
- HTPC Specs:
Nope, you got it right: WMC includes built-in logic to avoid the case you describe (I included it in the post you quoted).
When I said the hard padding must always be less than the soft one, it's not because it'll lead to incorrect results but simply because it makes no sense in practice: the soft padding value will never be used
On the other hand, the opposite scenario - i.e a hard padding that is less than the soft one - can be quite useful: it guarantees that the recording will be extended for at least the configured hard padding (if another program before or after the current one is going to be recorded). When no other program is scheduled, the recording will be extended for the configured soft padding.