Why Is mcebuddy Cutting first 10 seconds of every encode?


#1

Hi,

I have removed the previous beta and installed the latest beta but mcebuddy is still cutting the first 10 seconds of each file I convert?

I have tried enabling cut start and setting that to 1 second but it make no difference at all, still losing 10 seconds at the start of each video.

Also I have the ad remover set to none and detect and optimize video quality disabled but the log is full of comskip and ffmpeg entries where the file is being remuxed and scanned so it seems mcebuddy is ignoring these options being disabled?

I have attached logs and hope someone can take a look…

I am using mcebuddy to automate my old handbrake methods so just want a CC21 straight encode with a max width of 1280

Many Thanksmcebuddy.conf (7.3 KB)
profiles.conf (102.4 KB)
300 Rise Of An Empire 2014 720p BRrip ac3 DiVERSiTY.avi-My HEVC MKV-2018-10-24T06-47-25.8936679 01-00.log (836.3 KB)
300.mkv-My HEVC MKV-2018-10-24T05-52-41.4468237 01-00.log (936.1 KB)


(Goose) #2

Your logs are showing the correct duration right upto just before handbrake starts encoding, and then at the end it shows 10 seconds less. The command line looks fine. I’ve noticed that you’re using hardware encoding (NVidia).

My only guess could be that the graphics driver is dropping the first 10 seconds due to corruption or it can’t handle it.

Try to turn off hardware encoding and see the software encoder still has the same issue. You could also try removing the --start-at duration:0 from the handbrake-video line in your profile which could be messing with your conversion due to timestamp corruption.


#3

Hi @Goose

I am not using hardware encoding (terrible quality) please see the attached config screen.

so I will try removing the parameter you mentioned

Any idea also why my videos get analysed as well? I have disabled all of that but each file goes through slow remuxing / fast remuxing etc…

Capture

Many Thanks


(Goose) #4

You’re right, sorry about that. It’ using software x265 encoder. I see this in your logs:

2018-10-24T06:49:35 MCEBuddy.AppWrapper.Handbrake --> [06:49:35] sync: first pts audio 0x100 is 0
2018-10-24T06:49:35 MCEBuddy.AppWrapper.Handbrake --> [06:49:35] sync: first pts video is 430

Possibly the video is corrupted. Couple of things you can try:

  1. Removing the --start-at duration:0 from the handbrake-video line in your profile
  2. Use ffmpeg instead of handbrake (change the order in your profile)
  3. Download the latest nightly build of handbrake and replace it in your handbrake folder (it could be a issue in handbrake with the x265 encoder not being able to handle the video stream)

#5

Hi @Goose

The videos are not corrupt as mcebuddy does this on all videos, I am using the same version of Handbrake as in mcebuddy and that does not skip the 1st 10 seconds, would prefer to stick with Handbrake but am willing to try ffmpeg but first will remove that parameter and report back :slight_smile:

Again, many thanks!


#6

Hi @Goose

switching to ffmpeg has cured the issue… the quality does not seem as good as handbrake? maybe it is me? I have the same CC21 as handbrake


(Goose) #7

I was suggesting the timestamps on the initial video frames may be corrupted which is why handbrake is skipping the first 10 seconds.

Handbrake and ffmpeg use similar libraries (infact the next build of handbrake will use the same library as ffmpeg). You can tweak the profile settings and filters being used for ffmpeg if you’re familiar with ffmpeg.

You can also play with the quality slider on the Conversion Task, try to increase it and that should help as well.


#8

Many thanks @Goose do you think the handbrake issue will be fixed?


(Goose) #9

You can download the nightly CLI build of handbrake from their website and replace the one that ships with MCEBuddy and see if that fixes the issue.


#10

Hi @Goose

I have replaced the cli with the latest nightly (HandBrakeCLI-20181023173755-177c1e3-master-win-x86_64)

Still cutting off the 1st 10 seconds of each video?

I have created a short test file which encodes fully using handbrake standalone app and have attached my profile & logs for this short video, any other ideas?

Many Thanks

The Ant Bully (2006)5.mkv-My HEVC MKV-2018-10-26T15-21-18.1262191 01-00.log (488.6 KB)
mcebuddy.conf (7.9 KB)
profiles.conf (102.5 KB)


(Goose) #11

The source video timestamps are corrupted at the beginning. Looking at your logs, even Comskip is having trouble with the timestamps at the beginning of the recording.

2018-10-26T15:22:06 MCEBuddy.AppWrapper.CCExtractor --> Found large gap(684) in PTS! Trying to recover …
2018-10-26T15:22:06 MCEBuddy.AppWrapper.CCExtractor --> 3% | 00:00
2018-10-26T15:22:06 MCEBuddy.AppWrapper.CCExtractor --> Found large gap(691) in PTS! Trying to recover …
2018-10-26T15:22:06 MCEBuddy.AppWrapper.CCExtractor --> Found large gap(689) in PTS! Trying to recover …
2018-10-26T15:22:06 MCEBuddy.AppWrapper.CCExtractor --> Found large gap(686) in PTS! Trying to recover …

You may want to check your recording source (if it’s a tuner it could be a issue with the firmware or the driver or it could be an issue with the transmission itself).

Handbrake isn’t able to compensate for the timestamp errors so it’s skipping it, looks like ffmpeg is able to recover it so if you can’t fix the source then your best bet is to use ffmpeg.


#12

Hi @Goose

Sorry I really don’t understand this?

I have tested with a blu-ray rip, DVD Rip, TV Recording and downloaded file and always the first 10 seconds (Exactly 10 seconds) is removed, if I encode all those same files in handbrake (Windows 10) they encode perfectly, I cannot see how all those files from different sources can have the same corruption for the same 10 seconds?


(Goose) #13

Whatever program is being used to create your MKV file (looks like a web ripper or some web encoder) is having issue while creating the timestamps. This is what I can see from your MKV file

matroska,webm

MCEBuddy remuxes the MKV to TS for easier processing since not all underlying programs support other formats. It’s possible that handbrake is having issue reading the TS file vs the MKV file.

If you want to avoid remuxing from MKV to TS as intermediary file you can check the Skip remuxing option in your Conversion task -> Expert settings page:

Now the original MKV will be passed to handbrake, while it may work it doesn’t solve your root cause of the issue.


#14

Hi @Goose

I have tried skipping the remuxing of files which has solved all my problems! no more cutting off the first 10 seconds and also immediately starts encoding without any processing! Many Thanks!!

I am not using any particular program to create the files for encoding which is why I do not understand the issue.

Sources include

MKVToolnix for Blu-ray rip
Plex PVR for TV Recordings
Download of Big Buck Bunny from Big Buck Bunny 3D - Download
DVDDecrypter for DVD Rip

So a large variety of software feeding mcebuddy I cannot see how all videos can have the same corruption or problem causing the first 10 seconds to be cut when all the same video files encode perfectly in handbrake (Windows 10) and I have now tried Staxrip to encode to X265 with no issues either… there is something happening in mcebuddy but I cannot find it!

Thanks for all your help so far, I am sure someone far cleverer than me will find this issue! :slight_smile:

At lease by skip remuxing of file, the 10 seconds is kept! :slight_smile: