Stuttering and pixelation after commercial using custom cuts

I have not been happy with any of the automated commercial cutting, despite trying to tweak it a bit. I decided that I would use Custom Cuts to crop files perfectly when adding to my library.

The problem: After a cut commercial, the video is often stuttering and pixelated for about 5 seconds. Then it clears up and plays perfectly. Next commercial cut is often another bout of stuttering. It is an issue with video only. There is no issues whatsoever with the audio.

I use custom cuts to create my edl files, then run MCEBuddy to trim and convert to h.265. I’m not sure why using custom cuts to create my edl files would cause issues, but the problem didn’t seem to happen nearly as much when I let comskip do the job automatically (and poorly).

Ever seen this before? Any ideas?

Actually, I need to be more clear. Custom cuts sometimes has probelms opening wmv files, so I convert first.

It goes:

  • use MCEBuddy to convert file from wmv to h.265
  • Open in custom cuts and create edl
  • Run MCEBuddy to remove commercials using edl, no file conversion.

I still have this issue, and custom cuts is basically unusable because of inconsistent audio when using custom cuts. Does ANYONE have any suggestions? I see others with audio sync issues as well. If cannot use a audio offset as it happens on a random edl marker somewhere in the middle of a show being cut.

That’s usually caused by corrupted timestamps on the original video. What profile are you using?

I tried to read through other threads and the documentation to change the profile.conf to a custom config. I am happy to provide the config file for recommendations. Despite my reading and tweaking, I just haven’t been successful. I’m sure it can be resolved by someone knowledgeable, but I just don’t see it.

Always helps to post your profile. If the time stamps in the video are corrupted they need to be cleaned up. How much depends on the level of corruption, tool being used and settings.

It could also be related to GOP frames. The way video works is that not every frame is a compete frame. So if the cut takes places on a non GOP frame then you’ll see corrupted video for a few seconds until the next GOP frame comes along. The GOP frame contains the “full” picture where a cut GOP won’t have the complete information hence the corruption (or technically lack of complete information).

If you can attach your conversion log it’ll also provide more insight into what’s going.

You can try adding this to your profile

CommercialMergeTool=avidemux

The default is ffmpeg which works great for most video files but for files which have large GOP intervals it can cause the kind of issues you’re seeing where commercials are cut mid GOP. The difference is that while it may fix your stuttering the cut location will not be exactly at the point you marked. This is because it’ll wait for the next GOP frame to get a complete picture, which may be a few seconds after the identified cut point depending on how far apart the GOP frames are in your recording.

Thanks for the responses. For this particular file, I am removing commercials from a TVE recording DVRed through Channels.

Here is the profile I used yesterday.

[HEVC MP4]
Description=HEVC in MP4 (H.265/AAC) conversion. Creates a smaller file (50% smaller than H.264) with comparable quality but very slow.
order=handbrake,ffmpeg
ffmpeg-general=-threads 0
ffmpeg-video=-ss 0 -tag:v hvc1 -vf yadif=0:-1:1,hqdn3d -vcodec libx265 -preset medium -crf 26 -map 0:v -sn
ffmpeg-audio=-acodec aac -ab 192k -map 0:a
ffmpeg-audioac3=-acodec aac -ab 384k -map 0:a
ffmpeg-ext=.mp4
ffmpeg-audiodelay=skip
handbrake-general=--decomb --loose-anamorphic --verbose=2 -f mp4
handbrake-video=--start-at duration:0 -e x265 --encoder-preset medium -q 26
handbrake-audio=-E faac -R auto -B 192 -D 0 -a 1,2,3,4,5
handbrake-audioac3=-E faac -R auto -B 384 -D 0 -a 1,2,3,4,5
handbrake-ext=.mp4
handbrake-audiodelay=skip
CommercialMergeTool=avidemux
CutMP4Alternative=true

In that run I added CutMP4Alternative=true and removed PreConversionCommercialRemover=true which still had issues. The audio timing went off agaiin, but by lless than typical this time. The main issue is that with this profile, commercials are not being cut at the correct locations, where I created and EDL in Custom Cuts.
I uploaded the log under my username.

I am happy to run the a file twice if it helps. I was doing with this my work flow before. I would convert for MP4 using h.265, then I would create an EDL using Custom Cuts and just remove the commercials in a second run. That helps to not have the glitching frames at the cut. I had hoped that would remove the oddly induced several second audio delays, but it doesn’t.

I don’t see any errors as such in your conversion you’re running into the GOP framing issue.

Also please update to the latest BETA version as it has a few updates which may help you.

There are a few things we can try to get around the GOP issues, so lets start with the first:

I see that your profile doesn’t have:

PreConversionCommercialRemover=true

The CommercialMergeTool=avidemux option only works if the above option is enabled for non-TS profiles.

Try adding the above options and then re-run your conversion and if you’re having issues post your conversion log back here.

I hadn’t previously upgraded to the new version because I didn’t want to spend the money if I couldn’t fix the problem. I am happy to report that after upgrading, I am able to get much better results.

At the edl markers from custom cuts, I am getting some black screens for a couple seconds, which I assume is where the I vs P frames and timing errors occur, but when the image comes back, the audio seems to be syncing.

I will keep playing around with it now that I can get back to working on my big backlog of conversions. Thanks for your help.

Well crap. Guess I spoke too soon on the sync issues.

I was cutting commercials from a file where I had already converted to HEVC MP4, and I have audio sync issues again that occur at an edl cut point defined in Custom Cuts. I posted the log for the edl removal only run.

I’m seeing a lot of errors in the video source which is probably the cause of the your audio sync issues:

024-03-09T14:52:09 MCEBuddy.AppWrapper.FFmpeg → [mpegts @ 000001f861094b40] Non-monotonic DTS in output stream 0:1; previous: 291691043, current: 291666083; changing to 291691044. This may result in incorrect timestamps in the output file.
2024-03-09T14:52:09 MCEBuddy.AppWrapper.FFmpeg → [mpegts @ 000001f861094b40] Non-monotonic DTS in output stream 0:1; previous: 291691044, current: 291668003; changing to 291691045. This may result in incorrect timestamps in the output file.
2024-03-09T14:52:09 MCEBuddy.AppWrapper.FFmpeg → [mpegts @ 000001f861094b40] Non-monotonic DTS in output stream 0:1; previous: 291691045, current: 291669923; changing to 291691046. This may result in incorrect timestamps in the output file.
2024-03-09T14:52:09 MCEBuddy.AppWrapper.FFmpeg → [mpegts @ 000001f861094b40] Non-monotonic DTS in output stream 0:1; previous: 291691046, current: 291671843; changing to 291691047. This may result in incorrect timestamps in the output file.
2024-03-09T14:52:09 MCEBuddy.AppWrapper.FFmpeg → [mpegts @ 000001f861094b40] Non-monotonic DTS in output stream 0:1; previous: 291691047, current: 291673763; changing to 291691048. This may result in incorrect timestamps in the output file.
2024-03-09T14:52:09 MCEBuddy.AppWrapper.FFmpeg → [mpegts @ 000001f861094b40] Non-monotonic DTS in output stream 0:1; previous: 291691048, current: 291675683; changing to 291691049. This may result in incorrect timestamps in the output file.

Try this:

Also try to enable the Skip remuxing option in the Conversion Task → Expert settings page.

Thanks for your continued support.

I added:
PreConversionCommercialRemover=true
CommercialMergeTool=avidemux

Then, I checked the Skip Remuxing option. It hung multiple times on “analyzing show information” after re-merging. I went back in to uncheck the Skip Remuxing, and ran it again. The run was successful. Not sure if there is a bug or some combination of settings made it invalid? The audio is synced, for that file anyway. I will go process more and see how it goes.