NS_E_BAD_MARKOUT (0XC00D1B59) Fix: Mark-out > Mark-in & < Duration
This error means your mark-out time is set wrong—either before the mark-in or past the file's end. Fix it fast: adjust the out point or re-encode the file.
Had a client last week who spent an hour trying to trim a wedding video in Windows Media Encoder. Kept getting this exact error—0XC00D1B59. He was ready to throw his laptop out the window. Turns out his mark-out point was set to 3 minutes on a 2-minute clip. Classic case of fat-fingering the numbers.
The error message tells you exactly what's wrong: The mark-out time should be greater than the mark-in time and less than the file duration. It's not a mystery. It's a math problem. Let's fix it.
Step 1: Quick Check (30 Seconds) – Verify the Times
Don't start messing with settings yet. Just eyeball the timestamps first. This is 90% of the fixes I've seen in the wild.
- Find the file's total duration. Right-click the file in Windows Explorer, go to Properties > Details. Look at Length. Write it down (e.g., 0:02:34).
- Check your mark-in and mark-out times. Open your app (Windows Media Encoder, Windows Media Player, etc.) and look at the trimming controls. The mark-in is the start point, mark-out is the end point.
- Ensure mark-out > mark-in. If mark-out is before mark-in, swap them. If they're equal, change mark-out to something later.
- Ensure mark-out < file duration. If mark-out is after the file ends (e.g., mark-out = 0:03:00 on a 0:02:34 file), pull it back by at least one second past the duration.
That's it. Nine times out of ten, you just made a typo. Fix it and your error's gone.
Step 2: Moderate Fix (5 Minutes) – Re-enter Timestamps
If the eyeball check didn't work—maybe the timestamps look right but the error persists—you've got a corrupted entry or a time format issue. Here's what I do.
- Clear both mark-in and mark-out fields completely. Delete everything, not just erase the numbers. Hit Backspace until both fields are blank.
- Re-enter mark-in first. Type it in manually. Use HH:MM:SS format (e.g., 0:00:15 for 15 seconds). Don't copy-paste from somewhere else.
- Then enter mark-out. Make sure it's at least 1 second after mark-in and at least 1 second before the file's total duration.
- Apply the change. In Windows Media Encoder, click the "Apply" button (not just OK).
I've seen weird bugs where the underlying milliseconds get mangled even when the display looks fine. Clearing and re-entering forces the app to parse fresh values. Works more often than you'd think.
Step 3: Advanced Fix (15+ Minutes) – Re-encode the Source File
Okay, you checked the times, you re-entered them, and the error won't die. There's something wrong with the media file itself—probably a corrupt duration header. The fix is brutal but sure: re-encode the source file.
- Download and install FFmpeg. Get it from ffmpeg.org. It's free. You'll use the command line.
- Open Command Prompt as administrator (right-click Start > Command Prompt (Admin)).
- Run this command, replacing
input.mp4with your actual file name and path:
ffmpeg -i input.mp4 -c copy -map 0 output.mp4
This rewrites the container without recompressing the video (so it's fast and lossless). It fixes any broken duration/header metadata.
- Use the new output.mp4 as your source in the encoder. Set your mark-in and mark-out times again.
Had a radio station client last year who was getting this error on a batch of 50 audio files from an ancient recorder. Re-encoded all of them with FFmpeg in 2 minutes flat. Zero errors after that.
Why This Happens (So You Can Avoid It)
The NS_E_BAD_MARKOUT error is really a range validation fail. Windows Media Encoder expects mark-out to exist within the file's timeline. Two common triggers:
- Stale metadata: The file claims it's 10 seconds, but the last frame is actually at 8 seconds. The encoder sees the mark-out as 9 seconds and says "nope, that's past the end."
- Wrong time format: Some apps let you enter milliseconds (e.g., 0:00:15.500). If your encoder doesn't support that format, it might interpret the decimal as a value outside the range.
Real-world fix: always use whole seconds when you can. It's harder to mess up.
If you're still stuck after all three steps, you've got a broken encoder install. Uninstall Windows Media Encoder, reboot, reinstall. But honestly? I haven't seen a case where this error survived the FFmpeg re-encode.
Was this solution helpful?