Remuxing H264 WTV to MP4, MKV, AVI or TS without recoding to MPEG2

Coordinator
Jan 30, 2013 at 7:02 PM
Edited Oct 1, 2013 at 3:18 AM
EDITED and UPDATED as of BETA 2.3.14 - 20130930 and later.

NOTE: AllowH264CopyRemuxing=true is now the default configuration so it does not need to be specified as the build noted above (you will need to specify it for older versions).

By default now MCEBuddy directly remuxes the H264 WTV file to a other formats (such as MKV, MP4, TS etc) without recoding to MPEG2. NOTE, you can use ShowAnalyzer and Comskip for commercial removal with this method but the default bundled Comskip is SLOW with H264 commercial detection. You can use Donator version of Comskip with this if you've purchased the Donator version of Comskip which supports FAST H264. Thanks to Eric for including basic support for H.264 in the bundled version of Comskip. You can purchase the Donator Version of Comskip here http://www.kaashoek.com/comskip/

NOTE: Some H264 videos's contain aac_latm audio codecs which are not supported by the MP4 and MKV specifications. This may cause the audio/video to be garbled/distorted. In this case use the TS Unprocessed profile. However you will need 3rd party aac latm decoder (like Monogram AAC decoder). The other option is to convert the audio from aac latm to ac3.


For example to direct remux the H264 WTV file to a MKV and MP4 container:
Add the following profiles to profiles.conf to convert the WTV to MP4 and MKV:
[MP4 Unprocessed]
Description=Creates MP4 files by copying the video directly. It does not resize, remove black bars, deinterlace your videos or select audio language. Use this if you have high quality HD recordings which don't need processing.
order=copy,ffmpeg
copy-remuxto=.mp4
copy-audiodelay=skip
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vcodec copy -map 0:a -map 0:v
ffmpeg-audio=-acodec copy
ffmpeg-audioac3=-acodec copy
ffmpeg-ext=.mp4
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
[MKV Unprocessed]
Description=Creates MKV files by copying the video directly. It does not resize, remove black bars, deinterlace your videos or select audio language. Use this if you have high quality HD recordings which don't need processing.
order=copy,ffmpeg
copy-remuxto=.mkv
copy-audiodelay=skip
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vcodec copy -map 0:a -map 0:v
ffmpeg-audio=-acodec copy
ffmpeg-audioac3=-acodec copy
ffmpeg-ext=.mkv
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
[TS Unprocessed]
Description=Use this to copy the H.264 WTV/DVRMS files to TS format and to remove commercials from your TS videos. It does not remove black bars, resize the video, deinterlace or select audio language. Use this if you have HD recordings which don't need processing.
order=copy,ffmpeg
copy-ext=.ts
copy-audiodelay=skip
ffmpeg-general=-threads 0
ffmpeg-video=-vcodec copy -f mpegts -map 0:a -map 0:v
ffmpeg-audio=-acodec copy
ffmpeg-audioac3=-acodec copy
ffmpeg-ext=.ts
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
[TS H264 Recode]
Description=Use this to convert H.264 WTV/DVRMS files to H.264 TS format and to remove commercials from your TS videos. Use this if you're getting MPEG2 video with the TS Unprocessed profile.
order=ffmpeg
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vf yadif=0:-1,hqdn3d -vcodec libx264 -b 1800k -x264opts me=hex:trellis=2:subq=8:partitions=all:8x8dct=1:ref=8:rc-lookahead=50:keyint=25:min-keyint=20:bframes=3: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=2:threads=auto -map 0:a -map 0:v
ffmpeg-audio=-acodec copy
ffmpeg-audioac3=-acodec copy
ffmpeg-ext=.ts
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
Use the following profiles if you have AAC LATM audio in your WTV files (it will convert them to AC3 since aac latm are not supported by mp4 and mkv)
[MKV Unprocessed AAC LATM]
Description=Used for H.264 videos with AAC LATM audio. Creates MKV files by copying the video directly. It does not resize, remove black bars, deinterlace your videos or select audio language. Use this if you have high quality HD recordings which don't need processing.
order=ffmpeg
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vcodec copy -map 0:a -map 0:v
ffmpeg-audio=-acodec ac3 -ab 384k
ffmpeg-audioac3=-acodec copy
ffmpeg-ext=.mkv
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
[MP4 Unprocessed AAC LATM]
Description=Used for H.264 videos with AAC LATM audio. Creates MP4 files by copying the video directly. It does not resize, remove black bars, deinterlace your videos or select audio language. Use this if you have high quality HD recordings which don't need processing.
order=ffmpeg
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vcodec copy -map 0:a -map 0:v
ffmpeg-audio=-acodec ac3 -ab 384k
ffmpeg-audioac3=-acodec copy
ffmpeg-ext=.mp4
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
This can also allow for converting WTV to other profiles like TS Unprocessed can be used. It can also work with other stock profiles for MP4, MKV, AVI and TS formats without loss of quality.

Note: It cannot be be used with the WTV profile since currently MCEBuddy does not support creating H264 WTV files.
Marked as answer by rboy1 on 1/1/2014 at 7:03 AM
Jan 30, 2013 at 7:31 PM

HI Rboy,

What would happen if I fed this profile mpeg2 in wtv ? 
As my system is fully automated (MCEBuddy watching Recorded TV folder) it happens that all wtv files get processed by MCEBuddy automaticly after recording finishes...... 

Coordinator
Jan 30, 2013 at 7:42 PM
Edited Jan 30, 2013 at 7:44 PM

It would work as always, no impact to mpeg2 in WTV.

 

so you can setup multiple conversion tasks and filter out shows with H264 and use showanalyzer for them and a default task with comskip for everything else.

Jan 31, 2013 at 1:18 PM
Edited Jan 31, 2013 at 3:00 PM
I added the two profiles as instructed, set MCEBuddy to monitor my folder, it completed the conversion of 1x Mpeg2 .wtv file, failed anohter and failed the h264 .wtv file I had in the queue also. Logs are here.

Before failing the h264 job, it mentioned only "slow remuxing" and took a while.

Can't find anywhere to see the build number, but the logs say I am using latest build from 31.01.13. I downloaded and installed it this morning.

Edit# Updated the link to direct to the issue tracker.
Coordinator
Jan 31, 2013 at 2:27 PM
The links are not working, looks like the server has deleted the log files. TRy another site or Otherwise create an issue on CodePlex and attach the log files there.
Jan 31, 2013 at 3:00 PM
I have updated the link that now directs to the issue tracker.
Feb 4, 2013 at 11:36 PM
I added the 2 profiles to my profiles.conf file and used the first one [MP4 Unprocessed], however, when it completed the conversion I had a .ts file and not an .mp4 file. I'm looking to stream this directly to my Roku and this format won't work. Not sure what went wrong, did that happen to anybody else? Am I missing a step?
Feb 12, 2013 at 9:35 PM
Yeup happened to me too, got a file twice as large as the original w/ image distortion/ tearing on moving objects v0v
Coordinator
Feb 13, 2013 at 4:47 AM
thanks, seen the problem will post a new update to fix the issue shortly
Coordinator
Feb 13, 2013 at 5:22 AM
Quick solution - from the order remove copy to reflect

order=ffmpeg

copy has a bug in it which I'll fix
Coordinator
Feb 13, 2013 at 5:59 AM
I've fixed the bug in the copy encoder, it should work fine now with the 02132013 BETA build. However note that some H264 video's contain aac_latm codec which is not supported. In such cases you will need to recode the audio into ac3 with the following command.

ffmpeg-audio=-acodec ac3 -ab 192k

Otherwise the video/audio either come out garbled or distorted.
Feb 13, 2013 at 9:56 PM
Edited Feb 13, 2013 at 10:06 PM
Will AAC LATM be supported once you implement the new ffmpeg fixes or does this only relate to .mp4 and not .mkv?

http://mcebuddy2x.codeplex.com/workitem/1446
EDIT# sorry i read the first post.
Coordinator
Feb 14, 2013 at 2:02 AM
MP4 format -> aac_latm -> NO
MKV format -> aac_latm -> YES


Please note the FFDShow and Windows does NOT support aac_latm , so you'll have find a way to get a decoder for aac_latm for it to work.

I've updated the MKV profile above to allow it to work with the latest BETA for aac_latm codec but again you won't hear audio until you get a decoder for the codec. (e.g. Monogram AAC decoder).
Feb 14, 2013 at 8:27 PM
rboy1 wrote:
MP4 format -> aac_latm -> NO
MKV format -> aac_latm -> YES


Please note the FFDShow and Windows does NOT support aac_latm , so you'll have find a way to get a decoder for aac_latm for it to work.

I've updated the MKV profile above to allow it to work with the latest BETA for aac_latm codec but again you won't hear audio until you get a decoder for the codec. (e.g. Monogram AAC decoder).
Absolutely brilliant! I can now feed both mpeg2 and h264 files into the same MKV unprocessed container. Thanks a lot!!
Feb 14, 2013 at 10:32 PM
Edited Feb 14, 2013 at 10:36 PM
Dodgexander wrote:
rboy1 wrote:
MP4 format -> aac_latm -> NO
MKV format -> aac_latm -> YES


Please note the FFDShow and Windows does NOT support aac_latm , so you'll have find a way to get a decoder for aac_latm for it to work.

I've updated the MKV profile above to allow it to work with the latest BETA for aac_latm codec but again you won't hear audio until you get a decoder for the codec. (e.g. Monogram AAC decoder).
Absolutely brilliant! I can now feed both mpeg2 and h264 files into the same MKV unprocessed container. Thanks a lot!!
I spoke too soon. Two problems and before I go on, I have made sure that I have the correct decoders to support AAC LATM, in-fact, I can play the raw .wtv files in Arcsoft TMT and MPC HC with LAV filters no problem.

1- The behavior of MCEBuddy 2.3.12 32bit - 02132013 Build 1 and h264/AAC LATM files is still outputting the audio as adpcm rather than AAC LATM. When attempting to play black, either the file does not play (will seek but not play) or play with no audio. As before, the soundtrack in the file is ADPCM and still not AAC LATM.

2- I also found with some .wtv h264 AAC LATM files using the MKV Unprocessed profile, fast remuxing is not performed and slow remuxing is performed instead.

Here is an example that shows the details of the audio being exactly the same as I reported previously in ticket 1446

Image

As you can see from the screenshots, one is of the original file, the other is of the converted file with the different audio.

Here is a link to two log files.

The text files:

Africa-2013-02-03 1202.wtv-Default-2013-02-14T20-25-22.7476581+00-00
Danny Baker's Great Album Showdown-S01E03-R&B.wtv-Default-2013-02-14T20-53-05.8887843+00-00

Were done with a "fast remux", but the result is no audio upon playback.

The text file:
Wild Britain with Ray Mears-S03E06-Argyll Rainforest.wtv-Default-2013-02-14T21-05-15.9795431+00-00

Were done with a "slow remux", (fast was skipped with no reason).

So I guess from this we can conclude that using the copy encoder still doesn't correctly deal with AAC LATM.

However, why one of the files didn't fast encode is beyond me.

Oh well, at least the profile seems so far to fast remux mpeg2 .wtv files. Rather than having to use a seperate .ts profile for that.
EDIT The file that was "slow remuxed" also has the same ADPCM audio, which results in the same behavior, either seeking or playback not working. Or no audio. This is despite with the slow remux, the video is mpeg2.
Coordinator
Feb 15, 2013 at 6:31 AM
Okay
  1. Slow remuxing - this is happening becase some videos are "corrupted" and ffmpeg is not able to copy remux them, there is not option but to slow remux them:
    --> [mpegts @ 028dcc40] pts (101421) < dts (108621) in stream 2
    --> av_interleaved_write_frame(): Invalid argument
  2. The aac_latm - I see for some reason while remuxing from ts to mkv your files are changing from aac_latm to aac_adpcm. I don't have any sample file that do that, all my aac_latm are preserved. However I will try to get to the root of this. Can you upload one sample file with this issue and post back when done. (small one about 300 mb)
Feb 15, 2013 at 6:09 PM
  1. Is there no way to convert the file to h264 instead? Or just skip and rename it rather than convert the file? Slow remuxing a 2gb recording takes a couple of hours to convert and the file size is 4x bigger.
  2. Either Great British Railway journeys.wtv on the ftp server should show this problem.
Coordinator
Feb 17, 2013 at 8:44 AM
Edited Feb 17, 2013 at 8:53 AM
Okay so here's the latest update:

MP4 and MKV do not support aac_latm (atleast with ffmpeg). The ONLY profiles that support AAC LATM are TS Unprocessed.
If you need to use MP4 Unprocessed and MKV unprocessed, you will need to convert the aac latm audio to ac3 by using the following command

ffmpeg-audio=-acodec ac3 -ab 384k
ffmpeg-audioac3=-acodec ac3 -ab 384k

So:
MP4 format -> aac_latm -> NO (need to be converted to ac3)
MKV format -> aac_latm -> NO (need to be converted to ac3)
TS format -> aac_latm -> YES


I've updated the profiles on the first thread, see above.
Coordinator
Feb 17, 2013 at 8:54 AM
dodgexander wrote:
  1. Is there no way to convert the file to h264 instead? Or just skip and rename it rather than convert the file? Slow remuxing a 2gb recording takes a couple of hours to convert and the file size is 4x bigger.
  2. Either Great British Railway journeys.wtv on the ftp server should show this problem.
Yes you can always convert them to MP4 or MKV using the standard profiles.
Feb 18, 2013 at 2:56 AM
Edited Feb 18, 2013 at 3:01 AM
Is there a way I can specify an MP4 file that is created to use AVC as the video stream and AAC for the audio stream for my WTV recorded files?

I have some separate MP4 files that play perfectly on my XBOX, phone, Surface, etc. through the Xbox Video app, but none of the MP4 files that I have created through MCEBuddy remuxing are working as I get a missing codec error.

Comparing the MP4 files, the ones that play without error seem to be encoded with MPEG-4 AVC(video) AAC(audio) and I would like to try to get my WTV files to match. Does that make sense? Is it possible?

The remuxed MP4 files from MCEBuddy are encoded with MPEG-4 MPEG Video(video) AC-3(audio)
Coordinator
Feb 18, 2013 at 3:25 AM
Are you using a an old version of MCEBuddy? the new versions ones use MPEG4/AAC for MP4 and MPEG4/AC3 for MKV.
Coordinator
Feb 18, 2013 at 3:32 AM
Or are you referring to this thread of remuxing H264 without recoding? In which case you can modify the profile
ffmpeg-audio=-acodec libvo_aacenc -ab 192k -ac 2
ffmpeg-audioac3=-acodec libvo_aacenc -ab 192k -ac 2

(ffmpeg aac only supports 2 channel audio)
Feb 18, 2013 at 4:30 AM
rboy1 wrote:
Yes you can always convert them to MP4 or MKV using the standard profiles.
What I meant is, if you set the .ts unprocessed profile and it comes across a corruption, is there a way to get that to slow remux too h264 instead of mpeg2, therefore increasing the file size.

I have gone through each of my recordings and about 30% of them are not fast remuxing using the .ts unprocessed profile stated above, they instead revert to slow remuxing and you end up with a rather large mpeg2 version instead.

Is it normal to have this many corrupted files? Most of them seem to be from BBC One HD and ITV HD here in the UK, with BBC HD recordings faultless fast remux.

Is there no other way around this?

Finally, for you to look at each log to find the fault of each conversion, at what is the earliest point i can cancel the job? Is it ok to post a log of when you cancel just after "fast remuxing" fails?

Thanks!
Feb 18, 2013 at 5:01 AM
Edited Feb 18, 2013 at 5:27 AM
Yeah, I was referring to the remuxing H264 without recoding - and I am using the Early Access beta version.

In a nutshell, the MP4 file that is created with the default remuxing MP4 profile won't play on my phone, xbox video, etc. and gives a codec error. I'm pretty sure it has to do with the Video settings and not the Audio...

I was able to make some tweaks to my profile to get a file that works and looks great on my PC/Surface!
It takes a bit longer to process, but the file plays just fine on my PC. Still won't play on my phone though...

[MP4 Unprocessed Tweaked]
Description=Tweaked file for Windows 8, Xbox Video, Surface etc.
order=ffmpeg
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vf yadif=3:-1:0 -r 50 -vcodec mpeg4 -q 5 -f mp4 -y
ffmpeg-audio=-acodec copy
ffmpeg-audioac3=-acodec copy
ffmpeg-ext=.mp4
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
AllowH264CopyRemuxing=true

Any thoughts on what I can try to tweak would be greatly appreciated!
Coordinator
Feb 18, 2013 at 1:18 PM

I didn't understand what you're trying. Please upload a log file and let me know in reference what is happening vs what you would like to happen.
Feb 18, 2013 at 10:35 PM
Edited Feb 18, 2013 at 10:58 PM
strattao wrote:
Yeah, I was referring to the remuxing H264 without recoding - and I am using the Early Access beta version.

In a nutshell, the MP4 file that is created with the default remuxing MP4 profile won't play on my phone, xbox video, etc. and gives a codec error. I'm pretty sure it has to do with the Video settings and not the Audio...

I was able to make some tweaks to my profile to get a file that works and looks great on my PC/Surface!
It takes a bit longer to process, but the file plays just fine on my PC. Still won't play on my phone though...

[MP4 Unprocessed Tweaked]
Description=Tweaked file for Windows 8, Xbox Video, Surface etc.
order=ffmpeg
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vf yadif=3:-1:0 -r 50 -vcodec mpeg4 -q 5 -f mp4 -y
ffmpeg-audio=-acodec copy
ffmpeg-audioac3=-acodec copy
ffmpeg-ext=.mp4
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
AllowH264CopyRemuxing=true

Any thoughts on what I can try to tweak would be greatly appreciated!
Perhaps look at the media info of the outputted file. It may be the case the specification is incompatible with your phone or xbox for example.

rboy1 wrote
I didn't understand what you're trying. Please upload a log file and let me know in reference what is happening vs what you would like to happen.
Who is this referring too?

In my case, I am wondering why so many of my recordings are corrupted and are falling back to slow remux.

I also want to know if it possible to fallback to slow remuxing h264>h264 instead of h264>mpeg2

Finally, how long does it take before the log file will show if it has found a corruption in the input file? At which point during the conversion process?

Btw, the recordings it flags as being corrupted playback fine. I can also convert them in VideoRedo without this problem.
Coordinator
Feb 18, 2013 at 11:56 PM
dodgexander wrote:
strattao wrote:
Yeah, I was referring to the remuxing H264 without recoding - and I am using the Early Access beta version.

In a nutshell, the MP4 file that is created with the default remuxing MP4 profile won't play on my phone, xbox video, etc. and gives a codec error. I'm pretty sure it has to do with the Video settings and not the Audio...

I was able to make some tweaks to my profile to get a file that works and looks great on my PC/Surface!
It takes a bit longer to process, but the file plays just fine on my PC. Still won't play on my phone though...

[MP4 Unprocessed Tweaked]
Description=Tweaked file for Windows 8, Xbox Video, Surface etc.
order=ffmpeg
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vf yadif=3:-1:0 -r 50 -vcodec mpeg4 -q 5 -f mp4 -y
ffmpeg-audio=-acodec copy
ffmpeg-audioac3=-acodec copy
ffmpeg-ext=.mp4
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
AllowH264CopyRemuxing=true

Any thoughts on what I can try to tweak would be greatly appreciated!
Perhaps look at the media info of the outputted file. It may be the case the specification is incompatible with your phone or xbox for example.

rboy1 wrote
I didn't understand what you're trying. Please upload a log file and let me know in reference what is happening vs what you would like to happen.
Who is this referring too?

In my case, I am wondering why so many of my recordings are corrupted and are falling back to slow remux.

I also want to know if it possible to fallback to slow remuxing h264>h264 instead of h264>mpeg2

Finally, how long does it take before the log file will show if it has found a corruption in the input file? At which point during the conversion process?

Btw, the recordings it flags as being corrupted playback fine. I can also convert them in VideoRedo without this problem.
that was meant for @strattao

for your recoding to h264 (not remuxing since remuxing is failing), that would like a double conversion (since it will then recode it back to h264 mp4 later) and you will lose quality. The idea is to COPY H264 to TS (remuxing) so as to avoid double conversion, so it converts it to very high quality (nearly lossless) mpeg2 and then to H264.

If you still want to so it, open mcebuddy.conf, change the paramters for ffmpeg-slowremux to H264 but then you'll have to chnage your profle.conf to just COPY it insteda of recode it again.
Feb 19, 2013 at 1:30 AM
Edited Feb 19, 2013 at 1:30 AM
But is it normal to have 30% of recordings failing the fast remux? The recordings that fail to fast remux playback fine.

What else I am asking is, instead of the .ts unprocessed profile to recode to mpeg2 when it fails, can't it recode to h264 instead?

The conversion process would be then:

h264>h264 copy (fail)>h264 recode

rather than

h264>h264 copy(fail)>mpeg2 recode
Feb 19, 2013 at 3:18 AM
rboy1 wrote:
I didn't understand what you're trying. Please upload a log file and let me know in reference what is happening vs what you would like to happen.
I posted some log files to ftp://mcebuddy.dyndns.org/Logs/ along with a write-up of what I'm seeing. Let me know if there is anything else I can get for you.
Coordinator
Feb 19, 2013 at 4:31 AM
dodgexander wrote:
But is it normal to have 30% of recordings failing the fast remux? The recordings that fail to fast remux playback fine.

What else I am asking is, instead of the .ts unprocessed profile to recode to mpeg2 when it fails, can't it recode to h264 instead?

The conversion process would be then:

h264>h264 copy (fail)>h264 recode

rather than

h264>h264 copy(fail)>mpeg2 recode
It could be 100% of recordings if the show(s) you are recording are corrupted, sometimes to do with channels sometimes to do with tuners etc. There's no way to tell. Some folks only records 2 shows and if those 2 channels have an issue you see where I'm going.

Regarding the directly to H264, yes you can tweak the profiles to do that (as I mentioned above) but I would discourage it since it would yield a lower quality video (too complex to get into here but the mpeg2 recode is actually almost lossless)
Coordinator
Feb 19, 2013 at 4:37 AM
strattao wrote:
rboy1 wrote:
I didn't understand what you're trying. Please upload a log file and let me know in reference what is happening vs what you would like to happen.
I posted some log files to ftp://mcebuddy.dyndns.org/Logs/ along with a write-up of what I'm seeing. Let me know if there is anything else I can get for you.
First, nice work wtih the word document, gave me a good understanding of what you're trying to do.

first of all, have you installed any codecs? Am pretty sure there's something interfering with your codecs (3rd party) since no one has complained about hte stock mp4 profiles not working on any platform (and since I too have tested all the profiles). I suspect something is interfering with your playback, if yo uhave otehr codec packs installed, try uninstalling them, try playing with teh ffdshow settings.

Second, MP4 is ALWAYS compressed A/V. The only uncompressed A/V is raw video which is very large. MP4 is H2.64 compression which can vary accoridng to all the paramters you have mentioned in your word documetn.

Third, looks like you have the settings you want to make a video in lots of detail. I would suggest you start with a fresh profile based on ffmpeg and create a new profiles to do so. You can use the MP4 Normal as the base profile, remove mencoder and handbrake sections and leave the ffmpeg. Now you can tweak it to create a profile with the settings you want. There is EXTENSIVE documention on the ffmpeg site on the various paramters you're looking for in your word document.
Feb 19, 2013 at 5:06 AM
rboy1 wrote:
Regarding the directly to H264, yes you can tweak the profiles to do that (as I mentioned above) but I would discourage it since it would yield a lower quality video (too complex to get into here but the mpeg2 recode is actually almost lossless)
Thanks.
  1. I gather we are talking about a limitation of ffmpeg here? Because videoredo and playback handle the files fine.
  2. How far into the file conversion will the log work out if the file is corrupted or not? What do i look for?
Coordinator
Feb 19, 2013 at 1:40 PM
dodgexander wrote:
rboy1 wrote:
Regarding the directly to H264, yes you can tweak the profiles to do that (as I mentioned above) but I would discourage it since it would yield a lower quality video (too complex to get into here but the mpeg2 recode is actually almost lossless)
Thanks.
  1. I gather we are talking about a limitation of ffmpeg here? Because videoredo and playback handle the files fine.
  2. How far into the file conversion will the log work out if the file is corrupted or not? What do i look for?
No it's the general process limitation. You can work around it but it's very complex the way MCEBuddy is designed. Like I said you can do the actual conversion upfront by editing mcebuddy.conf slowremux section, but I've never tried it and can't predict the impact downstream.

how far in can't say, it depends on the file. When it comes across a corrupted set of frames that it cannot recover from it fails the remuxing the falls back to the next level. It depends on the recording.
Feb 19, 2013 at 2:58 PM
rboy1 wrote:
strattao wrote:
rboy1 wrote:
I didn't understand what you're trying. Please upload a log file and let me know in reference what is happening vs what you would like to happen.
I posted some log files to ftp://mcebuddy.dyndns.org/Logs/ along with a write-up of what I'm seeing. Let me know if there is anything else I can get for you.
First, nice work wtih the word document, gave me a good understanding of what you're trying to do.

first of all, have you installed any codecs? Am pretty sure there's something interfering with your codecs (3rd party) since no one has complained about hte stock mp4 profiles not working on any platform (and since I too have tested all the profiles). I suspect something is interfering with your playback, if yo uhave otehr codec packs installed, try uninstalling them, try playing with teh ffdshow settings.

Second, MP4 is ALWAYS compressed A/V. The only uncompressed A/V is raw video which is very large. MP4 is H2.64 compression which can vary accoridng to all the paramters you have mentioned in your word documetn.

Third, looks like you have the settings you want to make a video in lots of detail. I would suggest you start with a fresh profile based on ffmpeg and create a new profiles to do so. You can use the MP4 Normal as the base profile, remove mencoder and handbrake sections and leave the ffmpeg. Now you can tweak it to create a profile with the settings you want. There is EXTENSIVE documention on the ffmpeg site on the various paramters you're looking for in your word document.
This is happening on a brand-new fresh install of Windows 8. I have no 3rd party codecs installed at all. The only apps I have installed are MCEBuddy (which also installed ffdshow and Haali Media Splitter)

I will dig around and try playing with the ffdshow settings and create a new MCEBuddy profile. That must be the secret. Will report back what I find.
Feb 19, 2013 at 9:33 PM
Edited Feb 19, 2013 at 10:52 PM
rboy1 wrote:
No it's the general process limitation. You can work around it but it's very complex the way MCEBuddy is designed. Like I said you can do the actual conversion upfront by editing mcebuddy.conf slowremux section, but I've never tried it and can't predict the impact downstream.
This is a concern for me, because it means I end up with 30% of my recordings 4x larger in size. It would be nice if there workaround to the corruption isn't implemented in MCEBuddy, to instead fall back to just renaming the file and moving it instead. How do other converters deal with corruption? Why is it that others and playback work, but with MCEBuddy they don't?
how far in can't say, it depends on the file. When it comes across a corrupted set of frames that it cannot recover from it fails the remuxing the falls back to the next level. It depends on the recording.
So if we look at the conversion process:

Anaylising File>Fast Remuxing(fails)>Slow Remuxing it is at the point Slow Remuxing is started that the corruption is found in the log file?

Btw, am i correct that
--> [h264 @ 0221f120] mmco: unref short failure
--> Last message repeated 2 times
is finding the corruption?
Coordinator
Feb 20, 2013 at 12:07 AM
First if you're converting to mp4 the final file size should be be about the same as your source. Check the profile you are using

Second if you want mcebuddy not to slow remux be move on open mcebuddy.conf and delete the slow remux section keeping just copy remux.
Feb 20, 2013 at 12:11 AM
rboy1 wrote:
First if you're converting to mp4 the final file size should be be about the same as your source. Check the profile you are using
But I can't use the .mp4 profile to retain original audio. Instead I have to use the .ts profile which falls back to h264>mpeg2 conversion.
Coordinator
Feb 20, 2013 at 12:16 AM
So write a custom TS profile with H.264 video. Who says TS can't contain H.264.

Take the settings from the ffmpeg-general ffmpeg-video and ffmpeg-audio section if the MKV profile and put it in the TS profile keep ffmpeg-ext=.ts and you're done.

I thought you had already tried custom profiles. That's the beauty of mcebuddy it as flexible as you want and the documentation is extensive to support your needs.

Hope this helps and resolves your issue.
Feb 20, 2013 at 12:36 AM
Edited Feb 20, 2013 at 12:45 AM
Thanks! Strange things have happened, i altered the backup settings in the config file.

Once I did, the file copied fine without an error.

Here are the two log files, one before i modified (where it fell back to slow remux) and one where i made my alteration.

My Alteration:
[FFMpegBackupRemux]
CopyRemux0=-i <source> -vcodec copy -acodec copy -map 0:a -map 0:v -f mpegts
SlowRemux0=-i <source> -vcodec x264 -qscale 0 -r auto -acodec copy -map 0:a -map 0:v -f
mpegts
SlowRemux1=-i <source> -vcodec x264 -qscale 0 -r auto -acodec ac3 -ab 256k -map 0:a -map
As you can see I just changed the codec to x264 instead of mpeg2.

But the strange thing is...with this change. The file converts as fast as a fast remux!!
Edit: Nevermind, it was just a one-off. I tried with a second corrupted file and the conversion failed. I will do as you said and make a custom profile using the details from the mkv profile.
Feb 20, 2013 at 1:06 AM
rboy1 wrote:
So write a custom TS profile with H.264 video. Who says TS can't contain H.264. Take the settings from the ffmpeg-general ffmpeg-video and ffmpeg-audio section if the MKV profile and put it in the TS profile keep ffmpeg-ext=.ts and you're done. I thought you had already tried custom profiles. That's the beauty of mcebuddy it as flexible as you want and the documentation is extensive to support your needs. Hope this helps and resolves your issue.
I took:
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vcodec copy -map 0:a -map 0:v
ffmpeg-audio=-acodec copy
ffmpeg-audioac3=-acodec copy
And placed it in the ts unprocessed profile I have, but it still results in backup recoding to mpeg2.
Coordinator
Feb 20, 2013 at 1:21 AM
These aren't the MKV profile settings. Those are based on x264. Here you are just copying what us remuxed without converting it to H.264
Feb 20, 2013 at 1:46 AM
Edited Feb 20, 2013 at 9:39 AM
Okay, i've deleted what i put previously.

This is now my profile:
[TS Unprocessed]
Description=Use this to copy the H.264 WTV/DVRMS files to TS format and to remove commercials from your TS videos. It does not remove black bars, resize the video, deinterlace or select audio language. Use this if you have HD recordings which don't need processing.
order=copy,ffmpeg
copy-ext=.ts
copy-audiodelay=skip
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vf yadif=0:-1,hqdn3d -vcodec libx264 -b 1800k -x264opts me=hex:trellis=2:subq=8:partitions=all:8x8dct=1:ref=8:rc-lookahead=50:keyint=25:min-keyint=20:bframes=3: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=2:threads=auto -map 0:a -map 0:v
ffmpeg-audio=-acodec ac3 -ab 192k
ffmpeg-audioac3=-acodec ac3 -ab 384k
ffmpeg-ext=.ts
ffmpeg-remuxto=.ts
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
AllowH264CopyRemuxing=true
When I use this, MCEBuddy still slow remuxes to mpeg2. It doesn't slow remux to h264.
Feb 20, 2013 at 4:28 AM
Edited Feb 20, 2013 at 11:33 AM
So far, I have been unable to get the profile to contain information for the conversion to fall back on. But I have been able to edit the mcebuddy.conf.

These are my settings currently:
[FFMpegBackupRemux]
CopyRemux0=-i <source> -vcodec copy -acodec copy -map 0:a -map 0:v -f mpegts
SlowRemux0=-i <source> -vcodec libx264 -b 7000k -flags +ildct+ilme -acodec copy -x264opts
interlaced=true:me=hex:trellis=2:subq=8:partitions=all:8x8dct=1:ref=8:rc-
lookahead=50:keyint=25:min-keyint=20:bframes=3: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=2:threads=auto -map 0:a -map 0:v
ffmpeg-audio=-acodec copy
ffmpeg-audioac3=-acodec copy
So it works, but how can i get these settings working in profile rather than mcebuddy.conf and sadly as a result has stopped fast remuxing from working altogether.
Coordinator
Feb 20, 2013 at 4:47 PM
dodgexander wrote:
Thanks! Strange things have happened, i altered the backup settings in the config file.

Once I did, the file copied fine without an error.

Here are the two log files, one before i modified (where it fell back to slow remux) and one where i made my alteration.

My Alteration:
[FFMpegBackupRemux]
CopyRemux0=-i <source> -vcodec copy -acodec copy -map 0:a -map 0:v -f mpegts
SlowRemux0=-i <source> -vcodec x264 -qscale 0 -r auto -acodec copy -map 0:a -map 0:v -f
mpegts
SlowRemux1=-i <source> -vcodec x264 -qscale 0 -r auto -acodec ac3 -ab 256k -map 0:a -map
As you can see I just changed the codec to x264 instead of mpeg2.

But the strange thing is...with this change. The file converts as fast as a fast remux!!
Edit: Nevermind, it was just a one-off. I tried with a second corrupted file and the conversion failed. I will do as you said and make a custom profile using the details from the mkv profile.
This is very interesting. First up, putting x264 did not fix the problem, infact it broke the remux process since x264 is not a valid encoder:

--> Unknown encoder 'x264'


However what it did do was (and this was something I put in recently as a backup) was if remux using ffmpeg failed, it would fall back to the Remuxsupp program which used to be the default earlier, however remuxsupp doesn't work with MOST H264 remuxing but in your case (for me the 1st), it's working perfectly and remuxing h264 WTV to h264 TS, which is why it's working.

I need to look more into this, can you upload a sample video to the MCEBuddy server that worked with your modifications?

Also, regarding your modifications, I would suggest just remove the slow remux section and it will fall back to the remuxsupp to remux and your problem will be solved for now.
Coordinator
Feb 20, 2013 at 4:55 PM
Use this profile if you want the converted file to have H264 video:
[TS H264]
Description=Use this to convert H.264 WTV/DVRMS files to TS format and to remove commercials from your TS videos. It does not remove black bars, resize the video, deinterlace or select audio language. Use this if you have HD recordings which don't need processing.
order=ffmpeg
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vf yadif=0:-1,hqdn3d -vcodec libx264 -b 1800k -x264opts me=hex:trellis=2:subq=8:partitions=all:8x8dct=1:ref=8:rc-lookahead=50:keyint=25:min-keyint=20:bframes=3: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=2:threads=auto -map 0:a -map 0:v
ffmpeg-audio=-acodec ac3 -ab 192k
ffmpeg-audioac3=-acodec ac3 -ab 384k
ffmpeg-ext=.ts
ffmpeg-remuxto=.ts
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
AllowH264CopyRemuxing=true
For now keep the original mcebuddy.conf copyremux and slowremux section as is.

As I mentioend above, upload a copy of the video that fast remuxed with your x264 modification and I'll put a better algorithm in the next build to fast remux if possible.
Feb 20, 2013 at 8:33 PM
strattao wrote:
rboy1 wrote:
Third, looks like you have the settings you want to make a video in lots of detail. I would suggest you start with a fresh profile based on ffmpeg and create a new profiles to do so. You can use the MP4 Normal as the base profile, remove mencoder and handbrake sections and leave the ffmpeg. Now you can tweak it to create a profile with the settings you want. There is EXTENSIVE documention on the ffmpeg site on the various paramters you're looking for in your word document.
This is happening on a brand-new fresh install of Windows 8. I have no 3rd party codecs installed at all. The only apps I have installed are MCEBuddy (which also installed ffdshow and Haali Media Splitter)

I will dig around and try playing with the ffdshow settings and create a new MCEBuddy profile. That must be the secret. Will report back what I find.
So, I have played around and have very nice quality videos that keep the original resolution but have commercials removed and play perfectly with native Windows Phone, Xbox Video, Surface video apps.

This is the profile I'm using. The encoding process takes it's sweet time, but I don't mind :)

[MP4 H264 to AVC/AAC]
Description=Use this to convert H.264 WTV files to MP4 format and to remove commercials from your videos. It does not remove black bars, resize the video, deinterlace or select audio language. Use this if you have HD recordings which don't need processing.
order=ffmpeg
ffmpeg-general=-threads 0
ffmpeg-video=-vf yadif=0:-1 -vcodec libx264
ffmpeg-audio=-acodec libvo_aacenc
ffmpeg-audioac3=-acodec libvo_aacenc
ffmpeg-ext=.mp4
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
AllowH264CopyRemuxing=true

The next step is to figure out how to encode the Audio and Video with VBR even though going from a 3.5gb file to a 400mb file is pretty dang good, I would still like to eek out that last little optimization. It appears that the libvo_aacenc codec is pretty poor and doesn't support VBR, so I'm not sure much can be done there. I'm still trying to find the VBR settings for libx264 as well.
Feb 21, 2013 at 3:00 AM
FYI I can't gain access to the ftp server to test, rboy i have sent you a pm. I needed to uninstall mcebuddy to have a fresh config and now can't install it again ( i don't have a copy).
Feb 22, 2013 at 7:08 AM
Edited Feb 22, 2013 at 9:57 AM
The server is back up thankfully :)

I have been doing some testing, first with my incorrect modification and also deleting the slow remux in the conf.

The problem is I can't repeat the problem with one of my files. Sadly, the file that converted oddly, I deleted. So i don't have access to that specific file anymore.

Apart from that, despite setting the profile you listed, still my corrupted files are still being converted to mpeg2 when the fast remux fails. Why does it keep reverting to mpeg2 and not using the profile? They even convert to mpeg2 if i remove AllowH264CopyRemuxing=true

All i can think is they are falling backup method in the config file, because when I altered the config file to use libx264, they were being converted to h264.

Is there any way in the future to see if the Remuxsupp will work, perhaps by asking my priority to instead be:
  1. Fast Remux (FFMpeg copy)
  2. Fast Remux (Rumxsupp)
  3. Slow Remux (FFMpeg libx264)
Also, doesn't the profile need to have

-flags +ilme+ildct

otherwise the file output will be interlaced but marked as progressive.

Here is my log of a corrupted file which contains h264/aac latm, but is being converted by MCEBuddy to mpeg2, despite the profile.

Are you sure its not falling back to use in the config file:

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 256k -map 0:a -map 0:v -f mpegts


because thats what it seems like to me.
Feb 24, 2013 at 5:09 PM
Hello Rboy,

With 2.3.12 (latest) remux is as mentioned by others really strange.
All recordings from BBC HD, iTV HD that remuxed in matter of minute or two with 2.3.11 and converted nicely using any of the provided or custom profiles now require 'slow' remux which takes HOURS !

Any way to go back to 2.3.10/2.3.11 remux while still keeping other fixes ?
Feb 24, 2013 at 5:50 PM
vladik007, in the log of each job, do any errors occur like I get with 30 percent of my recordings?

Something like this:

mpegts @ 028dcc40] pts (101421) < dts (108621) in stream 2
--> av_interleaved_write_frame(): Invalid argument
Coordinator
Feb 24, 2013 at 6:35 PM
vladik007 wrote:
Hello Rboy,

With 2.3.12 (latest) remux is as mentioned by others really strange.
All recordings from BBC HD, iTV HD that remuxed in matter of minute or two with 2.3.11 and converted nicely using any of the provided or custom profiles now require 'slow' remux which takes HOURS !

Any way to go back to 2.3.10/2.3.11 remux while still keeping other fixes ?
Can you upload a sample WTV video that remuxes fast with 2.3.11 and slow with 2.3.12
Feb 24, 2013 at 6:57 PM
Edited Feb 24, 2013 at 8:47 PM
Will do later in the week. I havent got 2.3.11 installed right now. I will do some tests
Feb 25, 2013 at 9:05 AM
Since issues seem to be mixing up here, i have re-opened ticket 1446 to avoid confusion.
Coordinator
Feb 28, 2013 at 5:11 AM
Edited Feb 28, 2013 at 5:12 AM
Dodgexander wrote:
Since issues seem to be mixing up here, i have re-opened ticket 1446 to avoid confusion.
Okay let me take one more crack at this in a consolidated way.

Your goal is to have the H264 WTV files you have, remove the commercials and then put it into a TS format with H264 video and possibly do it all with fast remuxing or worst case with slow remuxing directly to H264.

To achieve that, first you need a the donator version of comskip which you will need to put into the comskip directory.

Then use this profile, this will take the H264 remuxed (slow or fast) and essentially remove teh commercials and copy it into a TS H264 video without recoding:
[TS Unprocessed]
Description=Use this to copy the H.264 WTV/DVRMS files to TS format and to remove commercials from your TS videos. It does not remove black bars, resize the video, deinterlace or select audio language. Use this if you have HD recordings which don't need processing.
order=copy,ffmpeg
copy-ext=.ts
copy-audiodelay=skip
ffmpeg-general=-threads 0
ffmpeg-video=-vcodec copy -f mpegts -map 0:a -map 0:v
ffmpeg-audio=-acodec copy
ffmpeg-audioac3=-acodec copy
ffmpeg-ext=.ts
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
AllowH264CopyRemuxing=true
Next in your mcebuddy.conf, use the following settings (from your earlier post, corrected here):
[FFMpegBackupRemux]
CopyRemux0=-i <source> -vcodec copy -acodec copy -map 0:a -map 0:v -f mpegts
SlowRemux0=-i <source> -vcodec libx264 -b 7000k -flags +ildct+ilme -x264opts interlaced=true:me=hex:trellis=2:subq=8:partitions=all:8x8dct=1:ref=8:rc-lookahead=50:keyint=25:min-keyint=20:bframes=3: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=2:threads=auto -map 0:a -map 0:v -acodec copy
SlowRemux1=-i <source> -vcodec libx264 -b 7000k -flags +ildct+ilme -x264opts interlaced=true:me=hex:trellis=2:subq=8:partitions=all:8x8dct=1:ref=8:rc-lookahead=50:keyint=25:min-keyint=20:bframes=3: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=2:threads=auto -map 0:a -map 0:v -acodec ac3 -ab 384k
To be honest, this is a round about way, but it will save 1 step of remuxing to mpeg2video, which will save you some time - but then again it's all about tweaking right. :O

That should achieve what you set out to achieve. If it still doesn't work, please post the log file (with the above settings).
Mar 13, 2013 at 5:38 AM
rboy1 wrote:
Dodgexander wrote:
Since issues seem to be mixing up here, i have re-opened ticket 1446 to avoid confusion.
Okay let me take one more crack at this in a consolidated way.

Your goal is to have the H264 WTV files you have, remove the commercials and then put it into a TS format with H264 video and possibly do it all with fast remuxing or worst case with slow remuxing directly to H264.

To achieve that, first you need a the donator version of comskip which you will need to put into the comskip directory.

Then use this profile, this will take the H264 remuxed (slow or fast) and essentially remove teh commercials and copy it into a TS H264 video without recoding:
[TS Unprocessed]
Description=Use this to copy the H.264 WTV/DVRMS files to TS format and to remove commercials from your TS videos. It does not remove black bars, resize the video, deinterlace or select audio language. Use this if you have HD recordings which don't need processing.
order=copy,ffmpeg
copy-ext=.ts
copy-audiodelay=skip
ffmpeg-general=-threads 0
ffmpeg-video=-vcodec copy -f mpegts -map 0:a -map 0:v
ffmpeg-audio=-acodec copy
ffmpeg-audioac3=-acodec copy
ffmpeg-ext=.ts
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
AllowH264CopyRemuxing=true
Next in your mcebuddy.conf, use the following settings (from your earlier post, corrected here):
[FFMpegBackupRemux]
CopyRemux0=-i <source> -vcodec copy -acodec copy -map 0:a -map 0:v -f mpegts
SlowRemux0=-i <source> -vcodec libx264 -b 7000k -flags +ildct+ilme -x264opts interlaced=true:me=hex:trellis=2:subq=8:partitions=all:8x8dct=1:ref=8:rc-lookahead=50:keyint=25:min-keyint=20:bframes=3: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=2:threads=auto -map 0:a -map 0:v -acodec copy
SlowRemux1=-i <source> -vcodec libx264 -b 7000k -flags +ildct+ilme -x264opts interlaced=true:me=hex:trellis=2:subq=8:partitions=all:8x8dct=1:ref=8:rc-lookahead=50:keyint=25:min-keyint=20:bframes=3: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=2:threads=auto -map 0:a -map 0:v -acodec ac3 -ab 384k
To be honest, this is a round about way, but it will save 1 step of remuxing to mpeg2video, which will save you some time - but then again it's all about tweaking right. :O

That should achieve what you set out to achieve. If it still doesn't work, please post the log file (with the above settings).
So, I've never been satisfied with the tweaks I've done, and am back trying to get the remuxing to work with either the Unprocessed MP4 profile or the Unprocessed WTV profile. MCEBuddy will create the .mp4 or .wtv files without any errors. I can hear the audio just fine in the files that are created, but the video won't play with either of the files that are produced... However, when I try these tweaks you've presented for the Unprocessed TS it works great!

Ideally I would really like to get a working .MP4, but I could live with a remixed .WTV file. The only thing I can think of is there is something wrong with how the video codec is handled in ffmpeg? I've tried remuxing the same source .wtv file as an Unprocessed MP4, Unprocessed WTV, and Unprocessed TS (with the mcebuddy.conf tweaks) and I can't get either an MP4 or a WTV file to play video at all... Do you have any magic profile or mcebuddy.config tricks that I can try?
Mar 13, 2013 at 12:10 PM
How are you testing the playback of those files? Might be a limit on the playback devices.

For instance I know my mp3 player has problems with certain h264 encodings, may be the same for you. Check what codec and specifications are supported.

The tweaks to the config file posted are only there if MCEBuddy fails the original remux, they instruct mce buddy to remux to h264 instead of mpeg2, IF the profile fails to work only, so therefore if your profile is working, this will not have an effect.

Perhaps try to see if the standard mp4 profile works and research into using different ffmpeg settings, you can alter them yourself.
Mar 13, 2013 at 12:50 PM
Dodgexander wrote:
How are you testing the playback of those files? Might be a limit on the playback devices.

For instance I know my mp3 player has problems with certain h264 encodings, may be the same for you. Check what codec and specifications are supported.

The tweaks to the config file posted are only there if MCEBuddy fails the original remux, they instruct mce buddy to remux to h264 instead of mpeg2, IF the profile fails to work only, so therefore if your profile is working, this will not have an effect.

Perhaps try to see if the standard mp4 profile works and research into using different ffmpeg settings, you can alter them yourself.
First I test playback on my PC (first through the default Xbox Video app, then WMP, then WMC), if that works, then I test on my Xbox (through Media Center), then on my Windows Phone and Android devices. I have MP4s that work perfectly on all of those players... just none of the MP4 files I've created through MCEBuddy. I'd LOVE to be able to figure out how to get the remuxing to work... maybe it isn't possible...
Mar 13, 2013 at 1:44 PM
strattao wrote:
Dodgexander wrote:
How are you testing the playback of those files? Might be a limit on the playback devices.

For instance I know my mp3 player has problems with certain h264 encodings, may be the same for you. Check what codec and specifications are supported.

The tweaks to the config file posted are only there if MCEBuddy fails the original remux, they instruct mce buddy to remux to h264 instead of mpeg2, IF the profile fails to work only, so therefore if your profile is working, this will not have an effect.

Perhaps try to see if the standard mp4 profile works and research into using different ffmpeg settings, you can alter them yourself.
First I test playback on my PC (first through the default Xbox Video app, then WMP, then WMC), if that works, then I test on my Xbox (through Media Center), then on my Windows Phone and Android devices. I have MP4s that work perfectly on all of those players... just none of the MP4 files I've created through MCEBuddy. I'd LOVE to be able to figure out how to get the remuxing to work... maybe it isn't possible...
MP4 is just a container, what matters are the details of the files contained in that container.

If you use an unprocessed profile, the video will be just copied from your original file.

If you use just the standard mp4 profile without the unprocessed flag, it will be converted.

Try the latter and see if you have the same results.

If you do, take an mp4 file that works fine, work out what it contains using mediainfo and then compare that to one that doesn't play, hopefully you can see the differences, then work out what settings you need to change in the conversion profile.

Btw, unless you know how to have custom filters set up, I wouldn't use wmp and wmc to test if your files play. Try using a different player like VLC or MPC-HC with lav filters and ffdshow.
Mar 13, 2013 at 6:05 PM
Dodgexander wrote:
strattao wrote:
Dodgexander wrote:
How are you testing the playback of those files? Might be a limit on the playback devices.

For instance I know my mp3 player has problems with certain h264 encodings, may be the same for you. Check what codec and specifications are supported.

The tweaks to the config file posted are only there if MCEBuddy fails the original remux, they instruct mce buddy to remux to h264 instead of mpeg2, IF the profile fails to work only, so therefore if your profile is working, this will not have an effect.

Perhaps try to see if the standard mp4 profile works and research into using different ffmpeg settings, you can alter them yourself.
First I test playback on my PC (first through the default Xbox Video app, then WMP, then WMC), if that works, then I test on my Xbox (through Media Center), then on my Windows Phone and Android devices. I have MP4s that work perfectly on all of those players... just none of the MP4 files I've created through MCEBuddy. I'd LOVE to be able to figure out how to get the remuxing to work... maybe it isn't possible...
MP4 is just a container, what matters are the details of the files contained in that container.

If you use an unprocessed profile, the video will be just copied from your original file.

If you use just the standard mp4 profile without the unprocessed flag, it will be converted.

Try the latter and see if you have the same results.

If you do, take an mp4 file that works fine, work out what it contains using mediainfo and then compare that to one that doesn't play, hopefully you can see the differences, then work out what settings you need to change in the conversion profile.

Btw, unless you know how to have custom filters set up, I wouldn't use wmp and wmc to test if your files play. Try using a different player like VLC or MPC-HC with lav filters and ffdshow.
Yeah, that's the process I've been following... the conversion process takes forever and I still haven't been able to fine-tune the settings to get them exactly how I want. I was hoping to get an Unprocessed MP4 file to speed up the conversion time, but I guess it isn't possible. Will continue to tweak then.
Coordinator
Mar 13, 2013 at 6:41 PM
If setup right (e.g. like with @Dodgexander has done, remux to mp4 directly and then used MP4 Unprocessed you should be able to save 1 conversion, but again it may not work 100% of the time. (should cut the overal time by 40% or so)
Apr 18, 2013 at 3:07 PM
I do HD recordings from my Hauppauge 2250 and and HD PVR so since I already have HQ recordings I was interested in trying the MP4 Unprocessed profile to cut my processing time in half and use them on my iPad. Well I can tell you the processing time was great, a 30 minute show took about 30 minutes to process and played and looked great on my computer. However these recordings even though MP4 will not play on my iPad or in iTunes. Are there any changes I can make to the profile to make those playable on my iPad? Thanks very much
Coordinator
Apr 18, 2013 at 3:45 PM
Edited Apr 18, 2013 at 3:45 PM
This profile just remuxes the video and audio to a MP4 container, if the actual video stream is not MP4 it will not play any 'i' product - which are very finicky about formats.
Apr 18, 2013 at 4:04 PM
I was happy to come across this post and thought I would give it a try, and I simply want to cut out commercials and move to an MKV container. I use Plex, and it will transcode for playback on devices that don't direct support MKV, so I'm not really worried about compatibility--just getting away from WTV. The vast majority, if not all, of my WTV recordings are MPEG-2 video and AC-3 audio. Some are 1080p, some are 1080i, and at least one is 720p (at a whopping 60fps) and come from OTA broadcast in the US. So I used the 'MKV Uncompressed' profile from the original post, but removed the 'AllowH264CopyRemuxing' line as I don't have the donate version of Comskip, and I'm not coming from H264. Strangely, though, the resulting MKV video stream is about half the bitrate of the original, resulting in a smaller file size. I'm not familiar at all with ffmpeg options, so I wouldn't even know where to begin to look. Can you, or someone, help with a profile that will simply take the original video (MPEG-2) and audio (AC-3) as-is, remove the commercials, and remux it to an MKV container? Thanks much.
Apr 18, 2013 at 4:19 PM
so I guess that begs the question of how can I speed up my iPad conversions? I have been using the Ipad profile but for an hour long show it takes 2 hours or more on a quad core machine with 4gb of memory so i don't think it should be taking so long
Coordinator
Apr 18, 2013 at 4:42 PM
Folks any help requires posting the conversion profile without which there is not way to tell what's going on

Apr 18, 2013 at 5:20 PM
Edited Apr 18, 2013 at 5:45 PM
EDIT: I need to do some more investigation. I may be already be getting exactly what I'm asking for, but not interpreting the MediaInfo output properly.
Coordinator
Apr 18, 2013 at 8:33 PM
Looks good. You are getting what you asked for. No recoding just cutting and copying

Apr 18, 2013 at 8:46 PM
only mcebuddy 1 you had an option for H264 no resize, this worked for me to transfer to itunes, is there a similiar profile for the 2.x versions?
Coordinator
Apr 18, 2013 at 9:33 PM
hookem wrote:
only mcebuddy 1 you had an option for H264 no resize, this worked for me to transfer to itunes, is there a similiar profile for the 2.x versions?
no but you can create your own custom profile or port the 1.x profile to 2.x - very similar
Coordinator
Apr 18, 2013 at 9:34 PM
rboy1 wrote:
hookem wrote:
only mcebuddy 1 you had an option for H264 no resize, this worked for me to transfer to itunes, is there a similiar profile for the 2.x versions?
no but you can create your own custom profile or port the 1.x profile to 2.x - very similar
If you don't want to resize, then just slide the resolution slider all the way to the right or add the line fixedresolution=true to your profile.
Apr 23, 2013 at 3:26 PM
I tried that and it is still taking much longer than it did on 1.x. For instance I used the MP4 fast profile, added the 2 aruments you mentioned and it takes almost 2 hours or more to convert a 1 hour show, on 1.x it was a little more than 1:1 if I remember correctly.
Coordinator
Apr 23, 2013 at 3:28 PM
Post your 1.x profile and I'll see if I can port it to 2.x for you
Apr 23, 2013 at 5:46 PM
I don't have a copy of it anymore, but I am 99.9% sure it was the default profile of h264 no resize
Coordinator
Apr 23, 2013 at 6:17 PM
FYI the 1.x profiles had a very low bitrate and quality, which is one reason they were faster. If you reduce the quality slide to 20% you'll see a significant increase in 2.x performance also.
Apr 23, 2013 at 8:14 PM
Edited Apr 23, 2013 at 8:16 PM
ok I tested what you said and dropped the slider to -20%, while it did increase the performance I still feel it is taking longer than it did. For a 30 min show using Apple M4V Fast, fixedresolution=true and 1280 on the max width it still took 59 minutes. I was expecting maybe 45 max for a 30 min show, should it be? I even used the new donator version of comskip which is supposed to be faster.
Coordinator
Apr 23, 2013 at 8:47 PM
Again the profile in 1.x and 2.x are very different, with different purposes. 2.x is targetted towards quality. You can speed it up by customizing profiles and removing overheads at the expense of quality.

Since you're looking at M4V I would suggest study the handbrake CLI options to see what options are there to speed up the conversion
Coordinator
Apr 23, 2013 at 10:22 PM
Here is another way to speed up the conversion, open the profiles.conf add teh following line to your profile:

PreConversionCommercialRemover=true

This will speed up by 20% to 30% depending upon how many commercials you have.
Apr 24, 2013 at 2:32 AM
Edited Apr 24, 2013 at 2:49 AM
Never mind
Coordinator
Apr 24, 2013 at 3:49 AM
no order at all. Are you sure you put it in teh right profile?
are you using 2.3.12?


Apr 24, 2013 at 4:58 PM
thank you so much, I think I might have it tweaked to just how I want it. I got a 30 min show to about 35 minutes and this morning I had an hour long show complete in 54 minutes. I will continue to tweak but everything you have provided me have been a great help, thanks again
Apr 24, 2013 at 8:23 PM
Ok one more question, is there anyway to speed up the conversion on the recordings from my Hauppaugue Hd PVR, these always seem to default to slow remuxing?

Thanks
Coordinator
Apr 24, 2013 at 9:39 PM
feel free to post your tweaks/findings/profiles back here to share with other folks


Coordinator
Apr 24, 2013 at 10:47 PM
Check the documentation for using WTv remuxsupp and WTv streams options

Apr 29, 2013 at 5:53 AM
Hey there, I'm really excited to find this! I've been wanting to prepare my h264 wtv files for playing on my Surface RT, and all other methods I've tried required complete conversion (which took hours and hours per file). This works brilliantly, and converts a 10Gb movie in 10 mins or so.

I do have issues with the audio being out of sync...the best solution I've found is to put a delay of -0.75 on.

The only other thing is, the video seems slightly...not smooth. Like, it's not really obvious, and it's not stuttery or anything. It's just not quite as smooth as it should be. Does anyone know what might be causing this?

Because otherwise I'll just set it to automatically convert my entire movie collection and delete the wtv originals.

Thanks heaps!
Coordinator
May 1, 2013 at 2:46 AM
Check your framerate - see the documentation -> common issues for more details.

Also start a new thread in future rather than piggy backing on this one
Coordinator
Oct 1, 2013 at 3:18 AM
Check out the latest 2.3.14 20130930 BETA build, not AllowH264CopyRemuxing=true is default and comskip commercial removal is supported. No more loops. Yay!
Oct 21, 2013 at 6:01 AM
I'm using 2.3.12 and used the provided profile.conf and mcebuddy.conf updates.

I tested the TS uncompressed profile and it worked for one show but today I notice it not working for a second recording, looking at the log I see this error message.

--> Program 1
--> Metadata:
--> service_name : CFTO-DT (CFTODT)
--> service_provider: CFTODT
--> Stream #0:00x100: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 384 kb/s
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio track = 0
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio stream = 0
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio language = eng
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio codec = ac3
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio sampling rate = 48000
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio channels = 6
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio bits per sample = 32
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio bit rate = 384000
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio PID = 256
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio impaired = False
--> Stream #0:10x101: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 192 kb/s
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio track = 1
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio stream = 1
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio language = eng
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio codec = ac3
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio sampling rate = 48000
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio channels = 2
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio bits per sample = 32
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio bit rate = 192000
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio PID = 257
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Audio impaired = False
--> Stream #0:2[0x102]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Video stream = 2
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Video codec = mpeg2video
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Video format = yuv420p
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Video width = 1920
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Video height = 1080
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Video SAR = 1:1
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Video DAR = 16:9
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Video bit rate = 18856
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Video FPS = 29.97
2013-10-21T00:27:37 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Video PID = 258
--> At least one output file must be specified
--> 0 Channel ReMux using FFMPEG failed at 72.04071%
INFORMATION> 2013-10-21T00:27:39 MCEBuddy.RemuxMediaCenter.RemuxMCERecording --> Copy remux loop 1
ERROR> 2013-10-21T00:27:39 MCEBuddy.RemuxMediaCenter.RemuxMCERecording --> ReMuxer failed to create remux file
INFORMATION> 2013-10-21T00:27:39 MCEBuddy.RemuxMediaCenter.RemuxMCERecording --> Slow remux loop 0
2013-10-21T00:27:39 MCEBuddy.RemuxMediaCenter.RemuxMCERecording --> Verifying Recorded file audio streams for Zero Channel Audio
2013-10-21T00:27:39 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Launching process C:\Program Files\MCEBuddy2x\ffmpeg\ffmpeg.exe
2013-10-21T00:27:39 MCEBuddy.AppWrapper.FFmpegMediaInfo --> Process arguments -probesize 100M -analyzeduration 300M -i "D:\Recorded TV\The Mentalist_CFTODT_2013_10_20_22_00_00.wtv"
Coordinator
Oct 21, 2013 at 2:13 PM
Unprocessed profiles may not work with older versions of mcebuddy due to architectural differences.

You will need to try with the latest 2.3.14 version and I you're still facing an issue please post a link or upload the complete log file to debug the issue.

Coordinator
Oct 21, 2013 at 3:13 PM
Plus not to mention tons of other bug fixes since then. For e.g. 2.3.12 I think uses % complete to compare success where as 2.3.14 has more intelligent logic. In your file above it shows 72% complete which may be a reason it's failing.