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

fixing header stripping on MKV and MP4 with AC3 encoding

May 17, 2013 at 3:15 PM
I've been using MCE Buddy (on 64 bit Win 7) for a few months successfully converting WTV files to MKV but I started having problems when we hooked up a PS3 to our TV in the bedroom. Sometimes a file will have a problem playing.
From what I've figured out, these errors on mkv files are usually the result of header compression and when I look at some of my converted to mkv files, I see "header stripping" in mediainfo. I don't know if that's the culprit for sure but when I convert problem files to mp4 with handbrake manually they stream fine to the PS3.
I have two questions about my options for how to deal with this.
1) How do I prevent header compression or stripping?
2) I could choose to encode to MP4 in MCE Buddy... but I have some problems with the profile.
I'm trying to edit the profile so that I get an MP4 file with AC3 for audio. (My living room TV won't play sound if it's encoded using AAC.)
I tried by copying all of the audio encoding lines from the MKV part of the profile to the MP4 High part but that didn't help.
So one solution to my problem is (maybe) ensuring there's no header funkiness, if that isn't the problem or isn't doable, I want MCE Buddy to generate an MP4 with H.264 video encoding and AC-3 6 channel audio, but I don't seem to have the right code in my profile?
Thanks for any help.
May 18, 2013 at 6:22 AM
2 points here:
  1. Fixing the MKV header compression issue should not be a problem, thanks for reporting it. If you can upload the original file (and profile) which are causing hte issue, I can replicate and put a fix for it in the next release. Header Compression is a common issue with MKV files, most players don't support it (WHO know why), but it can be disabled without any issues or impact. I need the file to replicate it.
  2. Regarding the MP4, yes you can copy ALL the <encoder>-audio and <encoder>-audioac3 sections from the MKV profile the MP4 profile and it should work. The key is all, ffmpeg, handbrake and mencoders. ALSO change the order to ffmpeg,handbrake,mencoder. This is because while mencoder is very good at creating aac it does not do very well with ac3 hence the ffmpeg is best. Here is sample way to create MP4 with AC3
[MP4 Normal Quality]
Description=High profile, good quality 1 pass MP4 (H.264/AC3). Good for SD videos. Produces good results and is faster than the two pass conversion.
mencoder-general=-ss 3 -vf pullup,softskip,yadif=0:-1,hqdn3d,harddup
mencoder-video=-ovc x264 -x264encopts bitrate=1800:me=hex:trellis=1:subq=8:partitions=all:8x8dct:ref=8:rc_lookahead=50:keyint=25:keyint_min=20:bframes=1:weight_b:level_idc=41:b_pyramid=normal:direct_pred=auto:mixed_refs:deblock=-1,-1:nofast_pskip:nodct_decimate:b_adapt=0:threads=auto
mencoder-audio=-oac lavc -lavcopts acodec=ac3:abitrate=160
mencoder-audioac3=-oac lavc -lavcopts acodec=ac3:abitrate=256
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vf yadif=0:-1,hqdn3d -vcodec libx264 -b 1800k -x264opts me=hex:trellis=1:subq=8:partitions=all:8x8dct=1:ref=8:rc-lookahead=50:keyint=25:min-keyint=20:bframes=1:weightb=1:level=4.1: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:a -map 0:v
ffmpeg-audio=-acodec ac3 -ab 160k
ffmpeg-audioac3=-acodec ac3 -ab 256k
handbrake-general=--decomb --loose-anamorphic --verbose=2 -T -f mp4 -4
handbrake-video=--start-at duration:3 -e x264 -b 1800 -x me=hex:trellis=1:subq=8:partitions=all:8x8dct:ref=8:rc_lookahead=50:keyint=25:keyint_min=20:bframes=1:weight_b:level_idc=41:b_pyramid=normal:direct_pred=auto:mixed_refs:deblock=-1,-1:nofast_pskip:nodct_decimate:b_adapt=0:threads=auto
handbrake-audio=-E ffac3 -6 auto -R auto -B 160 -D 0
handbrake-audioac3=-E ffac3 -6 auto -R auto -B 256 -D 0
Note this profile is designed and tweaked to work wtih 2.3.13 (cannot predict how it will perform on previous version but you can try it)
May 18, 2013 at 4:53 PM
I'm using release 12 of MCE Buddy 2.12 and the profile I was using for MKV conversion was MKV High Quality. In advanced settings I have "rename and sort by video information", "download series info", "extract MC information" and "multichannel audio" all ticked. I also have the maximum width set to 1280. I use ShowAnalyzer for commercial stripping. Everything else is default.

What's odd is this doesn't happen all the time with the stripping. I have a folder full of recordings of one show that don't show header stripping through May 2 and then from May 9 on it's happening. I record from OTA using HD Homerun to my desktop computer running Windows Media Center (Win 7). I don't remember changing anything. But I do remember having problems with a couple of episodes of a show a few months ago (at least I was plagued by the same PS3 error). Did this current issue possibly coincide with my installation of the version 12 release?

A sample wtv file that has this problem when converted is close to 3 GB. Where could I upload that to? Else I could send you a torrent to it.

I really appreciate the program, just donated via paypal (spehrson at yahoo).
May 18, 2013 at 5:27 PM
it's a quirk of MKVMerge, don't worry about it. You can upload the file to MCEBuddy ftp server (see the discussion read me before posting)

TRy this simple fix:

On hte MCEBuddy server I've put the latest build of MKVMerge.exe (this one disabled header compression by default)

Download it and put into the MCEBuddy Installation Directory\MKVMerge folder. (replace the one existing). Now run your conversion and see if the problem has been fixed.

(you don't need to upload your file if the problem is fixed)
May 19, 2013 at 7:57 PM
OK, it seems like the compression is gone with the new version of mkvmerge (according to mediainfo)... but I'm still getting errors at certain points on my PS3 with converted files. I'm at a loss to figure out what's going on if it's not the compression.
I figured out how to convert to MP4 with all the settings I want though.
May 19, 2013 at 9:41 PM
Wait for teh next BETA build for MCEBuddy tomorrow, I've fixed some issues with MKV compatability (seekign cues etc) and hopefully it will work fine.