All videos get trimmed

Hi All,
All the videos I am converting get trimmed a few seconds. I have read the below article which talks about how to tweek the MCEbuddy.config and profile file. How to Fix Initial 6-8 Seconds of Recording Missing/Cut after Conversions

After trying all the suggestions and even trying to keep the -ss code in there but change it to “0” or “1” I can’t seem to get it to work. How can I make the changes so that there will be no trimming of the video unless I set a certain amount of time with the “Start Trim” and “End Trim” feature.

Thanks,

M

Here is the MCEbuddy.config code with the removed portions in the attached article Link:

[Engine]
Tasks=MCE Test no trim
SearchRecords=Test no trimm
UserName=Guest
DomainName=
WakeHour=-1
WakeMinute=-1
StartHour=-1
StartMinute=-1
StopHour=-1
StopMinute=-1
DaysOfWeek=Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday
MaxConcurrentJobs=1
LogJobs=True
LogLevel=3
LogKeepDays=15
DeleteOriginal=False
UseRecycleBin=False
ArchiveOriginal=False
DeleteConverted=False
AllowSleep=True
SuspendOnBattery=False
SendEmail=False
Locale=en-US
TempWorkingPath=
ArchivePath=
FailedPath=
SpaceCheck=True
CustomComskipPath=
CustomProfilePath=
HangPeriod=300
PollPeriod=300
ProcessPriority=Normal
CPUAffinity=0
EngineRunning=True
LocalServerPort=23332
UPnPEnable=False
FirewallExceptionEnable=False
SubtitleSegmentOffset=0
eMailServer=
eMailPort=25
eMailSSL=False
eMailFrom=
eMailTo=
eMailSuccess=True
eMailFailed=True
eMailCancelled=True
eMailStart=True
eMailDownloadFailed=True
eMailQueue=True
eMailSuccessSubject=
eMailFailedSubject=
eMailCancelledSubject=
eMailStartSubject=
eMailDownloadFailedSubject=
eMailQueueSubject=
eMailSkipBody=False
eMailUsername=

[FFMpegBackupRemux]
CopyRemux0=-i <source> -vcodec copy -acodec copy -map 0:a -map 0:v -f mpegts
CopyRemux1=-i <source> -vcodec copy -acodec ac3 -ab 384k -map 0:a -map 0:v -f mpegts
SlowRemux0=-i <source> -vcodec mpeg2video -qscale 0 -r auto -acodec copy -map 0:a -map 0:v -f mpegts
SlowRemux1=-i <source> -vcodec mpeg2video -qscale 0 -r auto -acodec ac3 -ab 384k -map 0:a -map 0:v -f mpegts
RemuxDropThreshold=3.0
RemuxDuplicateThreshold=3.0

[DVRMSRemux]
Remux= -i <source> -vcodec copy -acodec copy -f mpegts

[Test no trimm]
SearchPath=E:\Playon\MCE Test no trim
SearchPattern=*.dvr-ms;*.wtv;*.asf;*.avi;*.divx;*.dv;*.flv;*.gxf;*.m1v;*.m2v;*.m2ts;*.m4v;*.mkv;*.mov;*.mp2;*.mp4;*.mpeg;*.mpeg1;*.mpeg2;*.mpeg4;*.mpg;*.mts;*.mxf;*.ogm;*.ts;*.vob;*.wmv;*.tp;*.tivo
SearchPathExclude=
DeleteMonitorOriginal=False
ArchiveMonitorOriginal=False
ArchiveMonitorPath=
MonitorSubdirectories=True
MonitorConvertedFiles=False
ReMonitorRecordedFiles=False
MinimumAge=0
DomainName=
UserName=

[MCE Test no trim]
Profile=MP4 Normal
DestinationPath=E:\Playon\MCE Test no trim outpu
WorkingPath=
FallbackDestination=False
CheckReprocessingHistory=False
AddToiTunesLibrary=False
AddToWMPLibrary=False
AutoIncrementFilename=False
SkipReprocessing=False
MaxWidth=1920
FPS=29.97
VolumeMultiplier=0
QualityMultiplier=1
RenameBySeries=False
AltRenameBySeries=False
CustomRenameBySeries=
RenameOnly=False
DownloadSeriesDetails=False
DownloadBanner=True
OverwriteTitleIMDB=False
FileSelection=
MetaSelection=
MetaChannelSelection=
MonitorTaskNames=
DRC=True
AudioLanguage=
AudioOffset=0
InsertQueueTop=False
ExtractXML=False
WriteMetadata=False
AutoDeInterlace=True
PreferHardwareEncoding=True
StereoAudio=True
EncoderSelectBestAudioTrack=True
DisableCropping=False
StartTrim=0
EndTrim=0
ExtractCC=default
CCOffset=2.5
EmbedSubtitlesChapters=False
ExtractAdsFromChapters=False
PrioritizeOriginalBroadcastDateMatch=False
TaskCommercialSkipCut=False
SkipCopyBackup=False
SkipRemux=False
IgnoreCopyProtection=False
TiVOMAKKey=
Enabled=True
ForceShowType=Default
MetaShowTypeSelection=Default
MetaDRMTypeSelection=All
CommercialRemoval=None
ComskipINI=
DomainName=
UserName=
MetaCorrectionsCount=0

Here is the profile code with the removed portions in the attached article Link:

[MP4 High Quality]
Description=WARNING: Slow, main profile, high quality 2 pass MP4 (H.264/AAC) conversion. This can be helpful with low quality source videos but will not make much difference for HD or high quality source videos. Takes the most time but produces the best results.
2pass=true
order=handbrake,ffmpeg,mencoder
mencoder-general=-vf pullup,softskip,yadif=0:-1,hqdn3d,harddup
mencoder-video=-ovc x264 -x264encopts bitrate=1800:me=hex:trellis=2:subq=8:partitions=all:8x8dct:ref=5:rc_lookahead=50:keyint=25:keyint_min=20:bframes=3:weight_b:level_idc=40:b_pyramid=normal:direct_pred=auto:mixed_refs:deblock=-1,-1:nofast_pskip:nodct_decimate:b_adapt=2:threads=auto
mencoder-audio=-oac faac -faacopts br=192:mpeg=4:tns:object=2
mencoder-audioac3=-oac faac -faacopts br=384:mpeg=4:tns:object=2
mencoder-ext=.avi
mencoder-remuxto=.mp4
mencoder-audiodelay=skip
ffmpeg-general=-threads 0
ffmpeg-video=-vf yadif=0:-1:1,hqdn3d -vcodec libx264 -b 1800k -x264opts me=hex:trellis=2:subq=8:partitions=all:8x8dct=1:ref=5:rc-lookahead=50:keyint=25:min-keyint=20:bframes=3:weightb=1:level=4.0:b-pyramid=normal:direct=auto:mixed-refs=1:deblock=-1,-1:no-fast-pskip=1:no-dct-decimate=1:b-adapt=2:threads=auto -map 0:v -sn
ffmpeg-audio=-acodec libfdk_aac -ab 192k -cutoff 18000 -map 0:a
ffmpeg-audioac3=-acodec libfdk_aac -ab 384k -cutoff 18000 -map 0:a
ffmpeg-ext=.mp4
ffmpeg-audiodelay=skip
handbrake-general=--decomb --denoise="weak" --loose-anamorphic --verbose=2 -T -f mp4 -O
handbrake-video= -e x264 -b 1800 -x me=hex:trellis=2:subq=8:partitions=all:8x8dct:ref=5:rc-lookahead=50:keyint=25:keyint-min=20:bframes=3:weight-b:level-idc=40:b-pyramid=normal:direct-pred=auto:mixed-refs:deblock=-1,-1:nofast-pskip:nodct-decimate:b-adapt=2:threads=auto
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
PreConversionCommercialRemover=true

[MP4 Normal]
Description=Main profile, good quality 1 pass MP4 (H.264/AAC) conversion. Good for most conversions, produces good results and is faster than the two pass conversion.
order=handbrake,ffmpeg,mencoder
mencoder-general= vf pullup,softskip,yadif=0:-1,hqdn3d,harddup
mencoder-video=-ovc x264 -x264encopts bitrate=1400:me=hex:trellis=1:subq=8:partitions=all:8x8dct:ref=3:rc_lookahead=50:keyint=25:keyint_min=20:bframes=1:weight_b:level_idc=40:b_pyramid=normal:direct_pred=auto:mixed_refs:deblock=-1,-1:nofast_pskip:nodct_decimate:b_adapt=0:threads=auto
mencoder-audio=-oac faac -faacopts br=160:mpeg=4:tns:object=2
mencoder-audioac3=-oac faac -faacopts br=256:mpeg=4:tns:object=2
mencoder-ext=.avi
mencoder-remuxto=.mp4
mencoder-audiodelay=skip
ffmpeg-general=-threads 0
ffmpeg-video= -vf yadif=0:-1:1,hqdn3d -vcodec libx264 -b 1400k -x264opts me=hex:trellis=1:subq=8:partitions=all:8x8dct=1:ref=3:rc-lookahead=50:keyint=25:min-keyint=20:bframes=1:weightb=1:level=4.0:b-pyramid=normal:direct=auto:mixed-refs=1:deblock=-1,-1:no-fast-pskip=1:no-dct-decimate=1:b-adapt=0:threads=auto -map 0:v -sn
ffmpeg-audio=-acodec libfdk_aac -ab 160k -cutoff 18000 -map 0:a
ffmpeg-audioac3=-acodec libfdk_aac -ab 256k -cutoff 18000 -map 0:a
ffmpeg-ext=.mp4
ffmpeg-audiodelay=skip
handbrake-general=--decomb --loose-anamorphic --verbose=2 -f mp4 -O
handbrake-video= -e x264 -b 1400 -x me=hex:trellis=1:subq=8:partitions=all:8x8dct:ref=3:rc-lookahead=50:keyint=25:keyint-min=20:bframes=1:weight-b:level-idc=40:b-pyramid=normal:direct-pred=auto:mixed-refs:deblock=-1,-1:nofast-pskip:nodct-decimate:b-adapt=0:threads=auto
handbrake-audio=-E faac -R auto -B 160 -D 0 -a 1,2,3,4,5
handbrake-audioac3=-E faac -R auto -B 256 -D 0 -a 1,2,3,4,5
handbrake-ext=.mp4
handbrake-audiodelay=skip
PreConversionCommercialRemover=true

In general if you’re facing an issue attach the conversion log. Folks can take a look and advise on the potential issues. Did you modify the profile also? (there are 2 places which need to be adjusted, mcebuddy.conf and profiles.conf)

Hi Goose,
Yes, I did. I posted the code of the changes I made.
Did you see that above.
Here is the log file per your request.

Fairy Tail - s02e66 - (Dub) The Power of Feelings.mp4-MCE Test no trim-2018-01-26T15-55-11.7805787-08-00.log (928.2 KB)

Thanks,

Marc Gschwend

That’s very helpful. I had a look at the logs and here is what I found.

Your video is analtered/untrimmed right upto the encoding, so you changes are working perfectly.

However during the encoding the encoder found a bunch of errors in your video and dropped quite a few frames which will explain why the output video is a little shorter than your input video.

An example (there are quite a few in the logs)

MCEBuddy.AppWrapper.Handbrake → Encoding: task 1 of 1, 99.79 % (167.04 fps, avg 167.10 fps, ETA 00h00m01s)[16:01:43] sync: audio 0x100 time went backwards 611 ms, dropped 26 frames (start 132641187, next 132696221)
2018-01-26T16:01:43 MCEBuddy.AppWrapper.Handbrake → [16:01:43] sync: video time didn’t advance - dropped 11 frames (delta 340 ms, current 132661796, next 132664174, dur 2378)

The root cause of the issue is a video that is non compliant with the standards so the best fix would be go back find out why your source video has errors in it, often due to a buggy tuner/recording firmware.

I also noticed that your using an intel hardware encoder. The intel driver is very susceptible to errors in the video file and drops frames when it encounters one.
You can try to turn off your hardware encoding the expert settings of your conversion task which will use a software encoder like handbrake or ffmpeg (you can play with the order settings in your profile to see which ones works better at handing your video file errors) which are slower but better at handling video errors and may drop fewer frames.

Thanks Goose! I looked into all of the potential errors for my videos. I could not find one. I shutdown my server, stopped using the HW feature, tried movies from 3 different sources, and a different computer. Any ideas on how to overcome this? as I don’t think the errors can be changed? Is there a way to fix them?

Only permanent fix can be from the recording source, the tuner or capture card or recording device. You’ll have to track down the driver or firmware and see if there’s an update or maybe an older version which is better and doesn’t introduce these timing errors in the recordings.

Hi Goose,
I have an odd question. Is there a way I can setup the config and profile to only trim 4 seconds off the front and the last 7 seconds off the back of the file. I do not want it to do anything else. Meaning no encoding, no metadata, no compression, etc.
What would that code look like?

Thanks,

M

Sure you can. Use any of the Unprocessed profiles. They just copy the audio and video as is without processing them.

Then in the expert settings page set your start trim to 4 seconds and end trim to 7 seconds.

Also refer to the topic is first few using seconds and make those adjustments to your profile as MCEBuddy trims a few seconds off the start of the video by default.