Output video wrong length

Thank you for providing the log file! I’ve reviewed it, and it gives us some good clues.

The most prominent issue I see throughout the log is this repeating error:

ERROR> 2025-07-20T15:50:04 --> StartAppWithAdminPrivilegesFromNonUISession WTSQueryUserToken failed (No logged on users) with error 1008. An attempt was made to reference a token that does not exist.
WARNING> 2025-07-20T15:50:04 MCEBuddy.AppWrapper.Comskip --> Unable to create UI Session process with Admin Privileges from NonUI Session. Is any user logged on?
WARNING> 2025-07-20T15:50:04 MCEBuddy.AppWrapper.Comskip --> Retrying process creation as a NonUI Session process with Admin privileges
WARNING> 2025-07-20T15:50:04 MCEBuddy.AppWrapper.Comskip --> Some functions like hardware encoding may not work in this mode

This error appears several times, specifically when MCEBuddy tries to run Comskip (for commercial detection) and Handbrake (for the video conversion itself), and even when querying for hardware encoding support (Intel, NVidia, AMD).

It suggests that MCEBuddy, which is running as a service (MCEBuddy Running as Service : True), is having trouble launching these external applications with the necessary administrative privileges in a non-UI session (meaning, when no user is logged into the server’s desktop). It then retries in a non-UI session, but warns that some functions like hardware encoding may not work.

The most critical part related to your issue is this:

WARNING> 2025-07-20T16:09:24 MCEBuddy.CommercialScan.Scanner --> Empty EDL File

This indicates that Comskip failed to create an EDL (Edit Decision List) file, which is what MCEBuddy uses to determine where the commercials are and, consequently, where to cut the video. Since the EDL file was empty, MCEBuddy had no instructions on how to trim the video, leading to the output file having the original (or even extended) length with “dead air” at the end.

The repeated Impaired audio track reported, likely empty channel with no audio warnings are also present, but they are less likely to be the primary cause of the incorrect video length.

Here’s what I recommend you try:

  1. Ensure a User is Logged In (for testing purposes): While MCEBuddy is designed to run as a service, as a test, try to reproduce the issue while you are actively logged into the Windows server where MCEBuddy is installed. This might bypass the “No logged on users” error for testing. If it works correctly then, it points more strongly to the service permissions.
  2. Run MCEBuddy as an Application, not a Service (for testing): Temporarily disable the MCEBuddy service and run MCEBuddy as a regular desktop application under an administrator account. This will ensure it has full access to the UI session and administrative privileges. If this resolves the issue, we can then focus on correctly configuring the service.
  3. Check Service Account Permissions:
    • Go to your Windows Services (services.msc).
    • Find the “MCEBuddy 2.x” service.
    • Right-click, go to “Properties,” then “Log On.”
    • Ensure it’s set to “This account” and use an administrator account that has full permissions to the D:\tmp directory and the network share (\\max\media2). Re-enter the password.
    • You might also try checking “Allow service to interact with desktop” (though this is less common for modern services).
  4. Update Graphics Drivers: Even though hardware encoding warnings appeared, ensuring your graphics drivers (for Intel, NVIDIA, or AMD, whichever applies to your server) are up to date can sometimes resolve unexpected issues with video processing applications.
  5. Re-install Comskip (Advanced): If the above steps don’t work, there might be an issue with the Comskip installation itself. You could try a fresh installation of MCEBuddy, which includes Comskip.

Let’s start with checking the service account permissions and trying to run it as an application to see if that bypasses the WTSQueryUserToken failed errors.