This project has moved and is read-only. For the latest updates, please go here.

Out of Sync HDHRDVR to H264 TS

Nov 18, 2015 at 6:22 PM
Edited Nov 18, 2015 at 7:36 PM
I am getting out of sync files when transcoding HDHRDVR TS files to h264 TS. This happens with recordings of the prime tuners. I can supply a sample of the original file. It appears to be happening when it remuxes to TS.

INFORMATION> --> Windows OS Version -> Microsoft Windows NT 10.0.10240.0 (WIN_10_2016_SERVER, Professional)
INFORMATION> --> Windows Platform -> 64 Bit
INFORMATION> --> MCEBuddy Build Platform -> 64 Bit
INFORMATION> --> MCEBuddy Build Version : 2.4.3.0
INFORMATION> --> MCEBuddy Build Date : 11/17/2015 15:05:20
INFORMATION> --> MCEBuddy Running as Service : True


This build below has no sync problems. Something changed from 10/10 to the 11/17 build .. I have backed off the 11/17 build.... using 10/10 build.

INFORMATION> --> Windows OS Version -> Microsoft Windows NT 10.0.10240.0 (WIN_10_2016_SERVER, Professional)
INFORMATION> --> Windows Platform -> 64 Bit
INFORMATION> --> MCEBuddy Build Platform -> 64 Bit
INFORMATION> --> MCEBuddy Build Version : 2.4.3.0
INFORMATION> --> MCEBuddy Build Date : 10/20/2015 21:29:06
INFORMATION> --> MCEBuddy Running as Service : True

Could this be causing the problem?
  1. 10/28
    c. Added a random series ID, program ID and DisplayGroupID are assigned 10402869 by default to HDHR metadata when original metadata is not from HDHR files. Done to improve compatibility with HDHR Kodi App
Profile used.

[TS]
Description=Use this to recode the video into a TS (H.264/AC3) file.
order=handbrake,ffmpeg
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vf yadif=0:-1:1,hqdn3d -vcodec libx264 -crf 22 -f mpegts -map 0:v -sn
ffmpeg-audio=-acodec ac3 -ab 192k -map 0:a
ffmpeg-audioac3=-acodec ac3 -ab 384K -map 0:a
ffmpeg-ext=.ts
ffmpeg-audiodelay=skip
handbrake-general=--decomb --denoise --loose-anamorphic --verbose=2
handbrake-video=--start-at duration:3 -e x264 -q 20
handbrake-audio=-E ffac3 -R auto -B 192 -D 0 -a 1,2,3,4,5
handbrake-audioac3=-E ffac3 -R auto -B 384 -D 0 -a 1,2,3,4,5
handbrake-ext=.mp4
handbrake-remuxto=.ts
handbrake-audiodelay=skip
PreConversionCommercialRemover=true
RenameExt=.mpg
Nov 18, 2015 at 7:33 PM
Yes please upload the original and also which profile are you using?

Nov 18, 2015 at 7:53 PM
Edited Nov 18, 2015 at 7:53 PM
This is the profile I used I am in the process of uploading the original file will let you know when I am done.

[TS HRDVR]
Description=Use this to recode the video into a TS (H.264/AC3) file.
order=handbrake,ffmpeg
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vf yadif=0:-1:1,hqdn3d -vcodec libx264 -crf 22 -f mpegts -map 0:v -sn
ffmpeg-audio=-acodec ac3 -ab 192k -map 0:a
ffmpeg-audioac3=-acodec ac3 -ab 384K -map 0:a
ffmpeg-ext=.ts
ffmpeg-audiodelay=skip
handbrake-general=--decomb --denoise --loose-anamorphic --verbose=2
handbrake-video=--start-at duration:3 -e x264 -q 20
handbrake-audio=-E ffac3 -R auto -B 192 -D 0 -a 1,2,3,4,5
handbrake-audioac3=-E ffac3 -R auto -B 384 -D 0 -a 1,2,3,4,5
handbrake-ext=.mp4
handbrake-remuxto=.ts
handbrake-audiodelay=skip
PreConversionCommercialRemover=true
RenameExt=.mpg
Nov 18, 2015 at 8:21 PM
Have you tried turning off hardware encoding - that causes an issue sometimes.

Nov 18, 2015 at 8:52 PM
I will try later when I re-install the latest build but the 10/20/2015 21:29:06 works fine even with hardware encoding so something is different in the latest release.
Nov 18, 2015 at 9:09 PM
Handbrake was updated (which is also the cause of hardware out of sync)

Nov 18, 2015 at 9:13 PM
The file is on your ftp site ... you can test with it ... it is a huge file.
UPLOAD/NYPLAYER/outofsync

Major Crimes (2012) - S04E13 - Reality Check.mpg
Nov 18, 2015 at 10:20 PM
Edited Nov 18, 2015 at 10:21 PM
  1. I reinstalled 11/17/2015 with and without hardware encoding still out of Sync.
  2. I then replaced handbrakecli with the one from 1020 and it still was out of Sync.
  3. I uinstalled 11/17/2015 and reinstalled 1020 and everything works great no sync problems.
So it is not handbrake it is something that was added in the remuxing or metadata writing in 11/17/2015.
Nov 18, 2015 at 11:09 PM
It's the new TS muxer then. There was a bug in the old profile. Handbrake doesn't support TS output so it needs to be output to mp4 and then remuxed to TS using TSmuxer or ffmpeg

Nov 18, 2015 at 11:09 PM
What are you using to play it back?

Nov 18, 2015 at 11:48 PM
Edited Nov 18, 2015 at 11:54 PM
VLC Kodi and HDHRDVR.

I tested all your releases after 1020 the problem started with 10/28 release.
  1. 10/28
    a. Added debug message when mcebuddy monitor task skips file due to minimum age constraint
    b. Added ability to increase height of the settings page to expand the conversion task list
    c. Added a random series ID, program ID and DisplayGroupID are assigned 10402869 by default to HDHR metadata when original metadata is not from HDHR files. Done to improve compatibility with HDHR Kodi App
Nov 19, 2015 at 12:41 AM
Edited Nov 19, 2015 at 12:42 AM
I see you are using TSMuxer to .ts before you were using ffmpeg. Is there a way to give us a choice of muxers FFMPEG is better.,, for my Prime Unit streams.

Out Of Sync

2015-11-18T16:33:59 MCEBuddy.Transcode.RemuxExt --> Remux To : .ts
2015-11-18T16:33:59 MCEBuddy.Transcode.RemuxExt --> Extension : .mp4
2015-11-18T16:33:59 MCEBuddy.Transcode.RemuxExt --> Remuxing video using TSMuxer to .ts

Perfect Sync.

2015-11-18T11:26:42 MCEBuddy.Transcode.RemuxExt --> Remux To : .ts
2015-11-18T11:26:42 MCEBuddy.Transcode.RemuxExt --> Extension : .mp4
2015-11-18T11:26:42 MCEBuddy.Transcode.RemuxExt --> Remuxing video using FFMPEG to .ts
Nov 19, 2015 at 1:31 AM
Hmm not yet but let me get to the root of this. Can you also upload your conversion log.

FFmpeg just sucks for MPEG2 TS remixing, the audio is ALWAYS out of sync which is why we looked at TSMuxer. Maybe we need to make it conditional to mpeg2.

Nov 19, 2015 at 1:45 AM
Edited Nov 19, 2015 at 1:55 AM
I see that tsmuxer changes the FPS. log uploaded. I really cannot use the release with the tsmuxer anything that was encode using tsmuxer I had to delete good thing I had the originals.

2015-11-18T16:34:14 MCEBuddy.AppWrapper.TSMuxer --> Setting process priority to Normal
2015-11-18T16:34:14 MCEBuddy.AppWrapper.TSMuxer --> Network Optix tsMuxeR. Version 2.6.12. www.networkoptix.com
2015-11-18T16:34:20 MCEBuddy.AppWrapper.TSMuxer --> Decoding H264 stream (track 1): Profile: High@3.0 Resolution: 720:404p Frame rate: 23.976
2015-11-18T16:34:20 MCEBuddy.AppWrapper.TSMuxer --> H.264 manual defined fps doesn't equal to stream fps. Change H.264 fps from 23.976 to 24.8
2015-11-18T16:34:20 MCEBuddy.AppWrapper.TSMuxer --> 0.0% complete
2015-11-18T16:34:20 MCEBuddy.AppWrapper.TSMuxer --> H264 bitstream changed: insert nal unit delimiters
2015-11-18T16:34:20 MCEBuddy.AppWrapper.TSMuxer --> Decoding AC3 stream (track 2): Bitrate: 384Kbps Sample Rate: 48KHz Channels: 2
Nov 19, 2015 at 2:23 AM
well yes and no. It should not change the FPS, FPS is a required input for TsMuxer so MCEBuddy reads the FPS from the converted file and parses it to TSmuxer.

Anyways upload the logs it's always tells a story :)

Nov 19, 2015 at 2:31 AM
The log is already uploaded.

UPLOAD/NYPLAYER/outofsync
Nov 19, 2015 at 2:51 AM
I found the issue from the log, the converted file FPS is 23.96 but ffmpeg is detecting it as 24.8 which is then passed to tsmuxer and it messes it up.

Nov 19, 2015 at 5:28 AM
Okay fixed it with today's build and thanks for uploading the video. TSMuxer is now exclusively used for MPEG1/MPEG2 remuxing to TS. All others use ffmpeg with no dependency on FPS

Nov 19, 2015 at 5:52 AM
Point to note the HDHR profile is now called HDHomeRun Unprocessed.
You will have to reset your profile in the conversion task

Nov 19, 2015 at 2:11 PM
Thank You that works... Below you will find the profile I use.

[TS HDHomeRun]
Description=Use this to recode the HDHomeRun video into a TS (H.264/AC3) file.
order=handbrake,ffmpeg
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vf yadif=0:-1:1,hqdn3d -vcodec libx264 -crf 22 -f mpegts -map 0:v -sn
ffmpeg-audio=-acodec ac3 -ab 192k -map 0:a
ffmpeg-audioac3=-acodec ac3 -ab 384K -map 0:a
ffmpeg-ext=.ts
ffmpeg-audiodelay=skip
handbrake-general=--decomb --denoise --loose-anamorphic --verbose=2
handbrake-video=--start-at duration:3 -e x264 -q 20
handbrake-audio=-E ffac3 -R auto -B 192 -D 0 -a 1,2,3,4,5
handbrake-audioac3=-E ffac3 -R auto -B 384 -D 0 -a 1,2,3,4,5
handbrake-ext=.mp4
handbrake-remuxto=.ts
handbrake-audiodelay=skip
PreConversionCommercialRemover=true
RenameExt=.mpg
Nov 19, 2015 at 7:36 PM
Wonder if there is any value creating a profile for HDHomeRun with mpeg2