3

Closed

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

description

I created this issue in relation to this forum thread and the sticky here.

Here is the attached logs showing the failed jobs.

file attachments

Closed Apr 18, 2013 at 9:36 PM by rboy1

comments

rboy1 wrote Jan 31, 2013 at 3:25 PM

Okay the Big Bang theory should work fine with the new 01312013 release.

Can you upload the Great Railways WTV file to the MCEBuddy server, I need to analyze it to figure out why it isn't able to remux the H264 directly.

Dodgexander wrote Jan 31, 2013 at 4:31 PM

The file in total is 2gb in size, it will take me a very long time to upload, you want the whole file, or a cut? Because if its the whole file I am afraid my connection could break during upload, so perhaps I can upload it without risk of it breaking?

Thanks

Dodgexander wrote Jan 31, 2013 at 4:33 PM

Btw, I have another HD file thats fast remuxing, I wonder what the differences between them could be, first I will try remuxing the railways one again.

rboy1 wrote Jan 31, 2013 at 7:06 PM

On the MCEBuddy server you'll find a file splitter, use that to cut about 300MB of the file and upload it.

Dodgexander wrote Jan 31, 2013 at 7:10 PM

I found another HD recording that goes to slow remuxing, its a smaller file than the railways one if you want to look at that instead.

rboy1 wrote Jan 31, 2013 at 8:29 PM

either ones okay as long as they have the same issue

Dodgexander wrote Jan 31, 2013 at 9:11 PM

Okay I am uploading now, will probably be an overnight job. I have a feeling it may be related to the beginning of the file, if a mid segment doesn't work, I guess i can also upload the beginning.

Thanks for your help.

Btw I thought you may be interesting to read about what MCTV converter had to say about remuxing h264.

Does MCEBuddy use remuxtool?

http://experts.windows.com/frms/windows_entertainment_and_connected_home/f/25/p/95829/555945.aspx#555945

rboy1 wrote Jan 31, 2013 at 10:36 PM

Please upload the first chunk, that is the ONLY chunk which will work when split using the File Splitter. the rest will be reported as invalid files.

rboy1 wrote Jan 31, 2013 at 10:37 PM

yes that's one of the tools MCEbuddy uses but it has many limitations

Dodgexander wrote Feb 1, 2013 at 11:29 AM

I have uploaded the first chunk :) its listed under Great British Railway Journeys_BBC HD_2013_01_30_18_30_06.wtv.chunk001 in the root.

rboy1 wrote Feb 1, 2013 at 2:18 PM

Okay I went through this and it looks like the video stream is corrupted:

[NULL @ 03b21d80] Warning: SPS NALU missing or invalid. The resulting stream may not play.
[NULL @ 03b21d80] Warning: PPS NALU missing or invalid. The resulting stream may not play.
Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec copy: Invalid argument
[mpegts @ 03d18a40] H.264 bitstream malformed, no startcode found, use the h264_mp4toannexb bitstream filter (-bsf h264_
mp4toannexb)

It looks like this stream cannot the remuxed directly.

Dodgexander wrote Feb 1, 2013 at 3:02 PM

Wonder if this is related to the same problem MCTV has in the link i posted here. Something to do with the startcode of BBC HD recordings being different from others.

"[mpegts @ 03d18a40] H.264 bitstream malformed, no startcode found, use the h264_mp4toannexb bitstream filter (-bsf h264_
mp4toannexb)"

Dodgexander wrote Feb 1, 2013 at 3:47 PM

Whats happened with this recording?

The converted file has an audio track of 0bytes. Has it picked the hearing impaired stream over the normal one?

Dodgexander wrote Feb 1, 2013 at 4:47 PM

Another example of no audio.

rboy1 wrote Feb 2, 2013 at 1:52 AM

Both the files have multiple audio tracks - one hearing impaired and one regular. Both have been remuxed into the final MKV file. There's nothing wrong with the file.

Stream #0:0(eng): Audio: aac_latm ([17][0][0][0] / 0x0011), 48000 Hz, stereo (hearing impaired)
--> Stream #0:1(eng): Audio: aac_latm ([17][0][0][0] / 0x0011), 48000 Hz, stereo
--> Stream #0:2: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 1k tbn, 90k tbc

You need a player that can switch between audio tracks. E.g. KMPlayer can switch (WMP cannot).
Also if you're using MKV like you've installed Haali Media splitter. In which case you'll find a small icon in the system tray when you play back with WMP. right lick on the MKV system tray icon and you'll get an option to switch audio tracks.

rboy1 wrote Feb 2, 2013 at 6:41 AM

I'm going to fix this in the next release. However here is how it will work, WHEN and IF you select an Audio Language in the conversion task settings, MCEBuddy will prefer a non-impaired audio track over an impaired audio track.
However this will only work when an audio language is selected, so right click on the file, select MediaInfo and find the language if you want MCEBuddy to skip over impaired tracks here possible. (some file may have both tracks impaired, in which it will choose the audio track with the most channels in it)
Refer to the documentation -> common issues for more details.

Dodgexander wrote Feb 2, 2013 at 1:13 PM

I have tried playing back with multiple players, I have attached a file that shows the mediainfo details of each file The Audio seems to be converted as something strange rather than AAC-LATM.

Also included a screenshot during playback showing the audio tracks.

There is no Audio on either of them.

Dodgexander wrote Feb 2, 2013 at 1:49 PM

Have tried playing back with Haali as Splitter, Lav, MPC-HC built in splitter and FFDSHOW audio decoder that supposidly supports the format, but none have sound.

Have tried playing back in Arcsoft TMT, MPC-HC and Windows Media Player and all same result.

rboy1 wrote Feb 2, 2013 at 5:04 PM

2 points:
  1. Try using KMPlayer, it's working perfectly with that and it's correctly identifying the tracks ( I tested it here).
  2. Are you using the latest BETA as of 02022013? I've fixed the issue in that as documented above if you select the audio language (eng) it skips over teh impaired audio track and takes the correct track

Dodgexander wrote Feb 2, 2013 at 7:09 PM

I am downloading the latest on the ftp server, but how can I tell what the build number is from current installs?

I have downloaded and installed KMPlayer,it freezes trying to play both the files.

Ill delete the conversions and place the originals back in the watched folder and try with this new version.

Ill make sure I specify in options the language code "eng" so it does as you have described.

Just out of interest, why is it converting the audio? Shouldn't it just stay as AAC-LATM? Because it seems to me this new format is worse for compatibility, which kind of negates the conversion in the first place. I think thats one of the reasons people use your program to convert .wtv files: Compatibility.

rboy1 wrote Feb 2, 2013 at 7:47 PM

The filename is 02022013 - built early this morning

If you're using Unprocessed it will convert the audio only copy it. Post the conversion log also.

Dodgexander wrote Feb 2, 2013 at 9:04 PM

Well tried again with the new build and its still making .mkv files that playback with no audio and kmplayer still freezes upon playback.

Not sure why its converting the audio to ADPCM, but it is, even when it says fast remuxing.

Ill have more examples as I convert more!

rboy1 wrote Feb 2, 2013 at 11:55 PM

Please mention with each post which log file your'e uploading I am unable to make out which is what

rboy1 wrote Feb 3, 2013 at 12:00 AM

Accoridng to the logs, it's copy the audio and the codec is aac (as the original). I suspect your kmplayer filters aren't working well. The file you uploaded to the MCEBuddy server with the MKV Unprocessed profile, latest MCEBuddy build, KMPlayer and the INCLUDED FFDSHOW filters (which MCEBuddy installs as part of it's installation) working just fine on my test machine here. Check your ffdshow / audio / video filters.

--> Output #0, matroska, to 'C:\Program Files\MCEBuddy2x\working0\Great British Railway Journeys_BBC HD_2013_01_29_18_31_49_REMUX.mkv':
--> Stream #0:0(eng): Audio: aac_latm ([17][0][0][0] / 0x0011), 48000 Hz, stereo
--> Stream #0:1(eng): Audio: aac_latm ([17][0][0][0] / 0x0011), 48000 Hz, stereo (hearing impaired)
--> Stream #0:2: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 1k tbn, 90k tbc

The output file contains 2 audio streams both aac, one hearing imparied (which has no audio) and one h264 video stream.

rboy1 wrote Feb 3, 2013 at 12:04 AM

BTW the imparied filter I was referring to only works with ffmpeg/mencoder/handbrake profiles, it does NOT work with copy profile.

If you want the audio stream filtered out, change the order in your MKV unprocessed profile to :

order=ffmpeg,copy

this will use ffmepg to copy the stream (it will take a little longer) but will allow you to filter the audio language

rboy1 wrote Feb 3, 2013 at 12:08 AM

Oh I missed, you also need to remove -map 0:a -map 0:v from the profile so that MCEBuddy can insert the appropriate command (it doesn't override map commands).

Dodgexander wrote Feb 3, 2013 at 12:37 AM

Removing the hearing impaired track isn't really a problem right now, but its good to know there is a way around it for fast remuxing.

I really don't think its a filter problem, I managed to get KMPlayer to play the file, but its exactly the same as MPC-HC or Arcsoft TMT. There is no audio.

All these players, using any splitter (lav, haali, built in) show the audio pin info:

WAVEFORMATEX:
wFormatTag: DVI_ADPCM(0x11)($0011)
nChannels: 2
nSamplesPerSec: 48000
nAvgBytesPerSec: 0
nBlockAlign: 4
wBitsPerSample: 16
cbSize: 2
extra bytes: $13 08

And no matter what I try, I cannot get ffdshow audio to load. (all codecs checked in options)

The file i uploaded to the server (great British railway journeys) was uploaded before you made the changes, it was uploaded because it was "slow" remuxing, not fast remuxing, which means, for that reason it may not contain the same audio problem I am describing with my current h264 files and could instead be related to fast remuxing you developed for h264 in recent builds.

Therefore I presume you want a chunk of both source and output files, ill start uploading now because it may take me a while. Thanks for your help on this, its really great work! :D

Dodgexander wrote Feb 3, 2013 at 11:48 AM

The files are available:

Great British Railway Journeys-S04E17-Salisbury to Castle Cary.mkv.chunk001
Great British Railway Journeys_BBC HD_2013_01_29_18_31_49.wtv.chunk001

Dodgexander wrote Feb 3, 2013 at 3:13 PM

Tried the .mp4 passthrough as well, but it does not process, saying "codec not supported by container" in log.

rboy1 wrote Feb 3, 2013 at 4:26 PM

Okay I've looked thte files and reproduced it, it's an issue with ffmpeg. It's not able to stream copy the audio data propoerly, it reports it as copied but actually doesn't. I've reported it to ffmpeg to fix.

For now you'll have to use normal MKV profiles for this.

rboy1 wrote Feb 3, 2013 at 4:27 PM

** Closed by rboy1 2/1/2013 7:39 PM

rboy1 wrote Feb 3, 2013 at 4:27 PM

H264 audio not always stream copied

rboy1 wrote Feb 3, 2013 at 4:27 PM

FFMPEG #2231

rboy1 wrote Feb 4, 2013 at 2:22 AM

okay:
  1. the original audio stream is LATM hence hte output has LATM.
  2. the bug in ffmpeg has been resoleved with teh latest version but there are other bugs because of which I can't updated ffmpeg as yet, workingw ith them and hopefully in a few weeks it will be resolved.

rboy1 wrote Feb 14, 2013 at 2:13 AM

Fixed and support provided. Read updated instructions here including aac latm support

http://mcebuddy2x.codeplex.com/discussions/431449

Dodgexander wrote Feb 25, 2013 at 8:56 AM

rboy1, I am still looking for an answer to this.

I can't find a way to convert my corrupted h264 recordings to h264 when a fast remux fails. Instead they are converted to mpeg2, despite any profile I have set.

I thought it would be clearer to open this issue again, as not to congest the other thread.

rboy1 wrote Feb 25, 2013 at 8:59 AM

http://mcebuddy2x.codeplex.com/discussions/431449

** Closed by rboy1 13/02/2013 18:14

Dodgexander wrote Feb 25, 2013 at 8:59 AM

As per latest comment

rboy1 wrote Feb 25, 2013 at 1:36 PM

I thought your issue had been resolved with teh latest profiles updates and build? If not please post the log and latest profile you're using.

Dodgexander wrote Feb 25, 2013 at 2:14 PM

I am using this profile, which you posted in the discussion thread for me to use.
[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
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.

rboy1 wrote Feb 25, 2013 at 4:02 PM

It's converting it to x264 but you've cancelled the conversion process for some reason.

--> frame= 1479 fps=2.3 q=30.0 size= 39342kB time=00:00:59.01 bitrate=5461.5kbits/s
--> Job cancelled, killing process

It's not able to fast remux due to issues so it slow remuxes the video to mpeg2video and then converts it to H264 but you need to let it complete it's job.

You asked: >> Slow Remux (FFMpeg libx264)
This is NOT a feasable solution since it will impact the end quality AND will take much longer.

You can try to use remuxsupp to see if that solves your fast remuxing problem:
Add to your profile:
UseWTVRemuxsupp=true

If that does not work, let the current process do it's job and you will end up with a H264 file.

rboy1 wrote Feb 25, 2013 at 4:03 PM

Also, doesn't the profile need to have
-flags +ilme+ildct
otherwise the file output will be interlaced but marked as progressive.
You can always tweak the profile for your requirements.

Dodgexander wrote Feb 25, 2013 at 5:00 PM

Okay thanks, two questions.

1.Why not convert straight to h264? Why mpeg2 first? Does this result in more loss in quality?
  1. If these files are corrupted, how come other programs can convert them?

Dodgexander wrote Feb 25, 2013 at 5:04 PM

Also, can I use:

ffmpeg-audio=-acodec copy
ffmpeg-audioac3=-acodec copy

In my profile instead of converting the audio?

rboy1 wrote Feb 25, 2013 at 8:36 PM

Also, can I use:

ffmpeg-audio=-acodec copy
ffmpeg-audioac3=-acodec copy

In my profile instead of converting the audio?
Dodgexander wrote Today at 12:00 PM

Okay thanks, two questions.

1.Why not convert straight to h264? Why mpeg2 first? Does this result in more loss in quality?
If these files are corrupted, how come other programs can convert them?


MCEBUddy is made to be very flexible and allows users to customize the heck out of it. however there are advisable ways and untested ways.
  1. You can always remux directly to H264, modify the slow remux and see if it works, I cna't guarantee it and may not be able to help if you run into issues since MCEBuddy wasn't designed to have ALL components (trimming, CC, EDL etc) work with H264 TS files, which is why the files are remuxed to MPEG2 since it's a universally accepted format by most programs (and MCEBuddy uses a lot of 3rd party programs). But by all means go ahead and play with it, that why it's modular
  2. FFMPEG can't read these files, hence it falls back to slow remux. You can raise a ticket with ffmpeg if wnat to expedite it's fixing or vote for the ticket I've created. MCEBuddy is about getting the job done, not always necessarily fixing the underlying 3rd party programs, so the compromise is that sometimes it takes longer to get the job done without compromising on quality.

rboy1 wrote Feb 26, 2013 at 2:23 AM

You can vote for the fix here:

https://ffmpeg.org/trac/ffmpeg/ticket/2220

Dodgexander wrote Feb 26, 2013 at 4:32 AM

Thanks rboy1. I have voted for the ticket, thanks for creating it!!

I did have some success altering the config file slow remux section, where the file was converted to h264 but the problem is of course this means that when I feed mpeg 2 they are also converted to h264 if their fast remux fails.

That's not the end of the world though, I struggled with finding optimum h264 settings, trying constant quality level and average bit rate, but I couldn't end up with a file the same as the original in size and the same quality. Files created if equal size to the original were worse than watchable.

Dodgexander wrote Feb 26, 2013 at 9:46 AM

Rboy1, please also see Failedtomovefile.zip

For some reason the conversion failed with three different files with "unable to move file". This of course after hours of recoding!

One of these files is corrupted, the other two I think are fine, yet they are not fast remuxing.

My destination is on the same drive of my work drive with 390gb free.

I don't understand this problem.

My profile:
[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 -flags +ilme+ildct -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-remuxto=.ts
ffmpeg-audiodelay=skip
FixedResolution=true
SkipCropping=true
AllowH264CopyRemuxing=true
UseWTVRemuxsupp=true
My Config:
[Engine]
Tasks=Default
SearchRecords=
MaxConcurrentJobs=1
LogJobs=True
LogLevel=3
EngineRunning=False
TempWorkingPath=O:\Cache
HangPeriod=300
LogKeepDays=15
WakeHour=-1
WakeMinute=-1
StartHour=-1
StartMinute=-1
StopHour=-1
StopMinute=-1
DaysOfWeek=Sunday,Monday,Tuesday,Wednesday,Thursday

,Friday,Saturday
DeleteOriginal=False
ArchiveOriginal=True
DeleteConverted=False
AllowSleep=False
MinimumAge=0
SendEmail=False
Locale=en-GB
ArchivePath=O:\Recorded TV\MCEBuddyArchive
SpaceCheck=True
PollPeriod=300
ProcessPriority=Normal
CPUAffinity=0
LocalServerPort=23332
UPnPEnable=False
eMailServer=
eMailPort=25
eMailSSL=False
eMailFrom=
eMailTo=
eMailSuccess=True
eMailFailed=True
eMailCancelled=True
eMailStart=True
eMailDownloadFailed=True
eMailUsername=

[Convert to MP4]
Profile=MP4 Normal
DestinationPath=C:\Users\Public\Videos
MaxWidth=720
CommercialRemoval=Comskip
RenameBySeries=True
DownloadSeriesDetails=True
DRC=True
VolumeMultiplier=0
QualityMultiplier=1
AltRenameBySeries=False

[Windows Default]
SearchPath=C:\Users\Public\Recorded TV
SearchPattern=[video]
MonitorSubdirectories=True
DomainName=
UserName=
Password=

[FFMpegBackupRemux]
CopyRemux0=-i <source> -vcodec copy -acodec copy -

map 0:a -map 0:v -f 
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
RemuxDropThreshold=3.0
RemuxDuplicateThreshold=3.0

[Default]
Profile=TS H264
DestinationPath=O:\Recorded TV
FallbackDestination=False
MaxWidth=7680
VolumeMultiplier=0
QualityMultiplier=1
RenameBySeries=True
AltRenameBySeries=False
CustomRenameBySeries=
RenameOnly=False
DownloadSeriesDetails=True
DownloadBanner=False
TVDBSeriesId=
IMDBSeriesId=
FileSelection=
MetaSelection=
MonitorTaskNames=
DRC=False
AudioLanguage=eng
AudioOffset=0
ExtractXML=False
StereoAudio=False
DisableCropping=False
StartTrim=0
EndTrim=0
ExtractCC=
CCOffset=3.1
TaskCommercialSkipCut=False
Enabled=True
CommercialRemoval=none
ComskipINI=
DomainName=
UserName=
Password=
(Ps I tried to attach the file but it didn't work). Individual text files are too big also.

Dodgexander wrote Feb 26, 2013 at 10:10 AM

If i didn't already make it clear, these files aren't fast remuxing anymore either.

Dodgexander wrote Feb 26, 2013 at 11:00 AM

All my mpeg2 files are failing now also with
 --> [mpeg2video @ 01f5f700] mpeg_decode_postinit() failure

rboy1 wrote Feb 26, 2013 at 2:29 PM

It's failing because your profile is setup in correctly.

Your
ffmpeg-ext=ts

why are you doing
ffmpeg-remuxto=ts

It doesnt' make any sense, your extension is TS and you're remuxing to back to TS?
Remove the line ffmpeg-remuxto and it should start working.

Dodgexander wrote Feb 26, 2013 at 3:48 PM

[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
That is from the profile you posted in the discussion thread.

Dodgexander wrote Feb 26, 2013 at 4:02 PM

Also what is happening with this file?

It seems to start byte-stream-remuxing ok, but then converts and take a long time.

At the moment:

1- My mpeg2 files don't remux at all due to the error given by ffmpeg.

2- My h264 files don't remux at all, due to the error given by ffmpeg.

Both errors you have reported to ffmpeg and both I have voted and commented on.

I just don't understand why I now get this with all my files. Surely they are not all corrupted?

Dodgexander wrote Feb 26, 2013 at 4:07 PM

Latest file: Room 101_BBC One HD_2013_02_22_20_30_00.wtv-Default-2013-02-26T12-00-20.2204966+00-00.log

rboy1 wrote Feb 26, 2013 at 11:33 PM

  1. ffmpeg-remuxto -> Got it, fixed the discussion forum.
  2. I have no idea what you're saying or what your issue is. According to your log file, Remuxsupp worked fine and remuxed the WTV to TS preserving the H264.
Then you've specified a profile that will convert the H264 to H264 (I have no idea why) which is why it takes a long time. Maybe you just want to use
ffmpeg-video=-vcodec copy -map 0:a -map 0:v instead

You should spend more time understanding how profiles work.

rboy1 wrote Feb 26, 2013 at 11:35 PM

Did you read the profile description carefully?

Let me quote:

"Use this if you're getting MPEG2 video with the TS Unprocessed profile."

According to your logs the remuxsupp is generating H264 in TS, so this profile is NOT the profile for you.

rboy1 wrote Feb 26, 2013 at 11:37 PM

Try using the TS unprocessed instead and you'll get what you want (atleast to whatever extent I understand).

i.e. Remuxsupp will copy the H264 WTV to H264 TS
Then the TS Unprocessed profile will cut the video and copy it over to TS preserving the H264 without recoding.

Dodgexander wrote Feb 27, 2013 at 7:13 AM

The problem are the ffmpeg errors.

As I understand currently the behavior of MCEBuddy is this:

input (h264.wtv)>ts unprocessed profile= no recode.

input (ffmpeg unable to read h264.wtv)>ts unprocessed profile= recode to mpeg2.

Under the same profile (since I cannot define between which files ffmpeg can't read) how can I always end up with a h264 .ts file.

So what I am looking for is:
  1. Try no recode
  2. reading the file=
A= true> copy video and audio.
B= false> end up with h264 and NOT mpeg2.

ideally it would be nice to feed mpeg 2 wtv files into the same profile as well, but since I can define those by name it's okay for me.

Sorry if I haven't been clear, I tried to already alter the config file backup section, but from your response it seemed like I can do it with a profile, apparently so far, not.

Dodgexander wrote Feb 27, 2013 at 5:24 PM

With this 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=-vcodec copy -f mpegts -map 0:a -map 0:v
ffmpeg-audio=-acodec copy
ffmpeg-audioac3=-acodec copy
I get in logs:

--> At least one output file must be specified
2013-02-27T16:58:23 MCEBuddy.RemuxMediaCenter.RemuxMCERecording --> Video does not contain MPEG2VIDEO, skipping to slow remux. Video Codec found -> h264
ERROR> 2013-02-27T16:58:23 MCEBuddy.RemuxMediaCenter.RemuxMCERecording --> ReMuxer failed to create remux file

In all files.

In most I get:

--> [h264 @ 01fff120] non-existing SPS 0 referenced in buffering period
--> [h264 @ 01fff120] non-existing PPS referenced
and then further down:
--> [h264 @ 002df120] mmco: unref short failure

Messages

So at the moment with the unprocessed profile all my h264 .wtv files will be converted too mpeg2.

rboy1 wrote Feb 27, 2013 at 6:28 PM

Use the TS Unprocessed file from the H264 discussion page
[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

Dodgexander wrote Feb 27, 2013 at 8:30 PM

That fixes the files that previously produced:

--> At least one output file must be specified
2013-02-27T16:58:23 MCEBuddy.RemuxMediaCenter.RemuxMCERecording --> Video does not contain MPEG2VIDEO, skipping to slow remux. Video Codec found -> h264
ERROR> 2013-02-27T16:58:23 MCEBuddy.RemuxMediaCenter.RemuxMCERecording --> ReMuxer failed to create remux file

But the files that previously produced: mmco: unref short failure still get converted to mpeg2!!!

Dodgexander wrote Feb 27, 2013 at 10:56 PM

Please also see my previous posts which explains what I am looking mce to do.

rboy1 wrote Feb 28, 2013 at 5:05 AM

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):
[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
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).

rboy1 wrote Feb 28, 2013 at 5:11 AM

MISTAKE in the previous post - let me try again with the corrected profile:

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).

Dodgexander wrote Feb 28, 2013 at 5:45 PM

This is fantastic! Now all my h264.wtv files succeed in being converted to h264, even if some are slow remuxed!

Now, in the case of my files that contain errors:

--> [h264 @ 01fff120] non-existing SPS 0 referenced in buffering period
--> [h264 @ 01fff120] non-existing PPS referenced
and then further down:
--> [h264 @ 002df120] mmco: unref short failure

They are always slow remuxed instead.

Am I right in saying that files with this errors relate also to the report you made to ffmpeg here? Is it going to be fixed?

rboy1 wrote Feb 28, 2013 at 7:48 PM

No that's a different ticket, I need your video and log file to see what's going on and perhaps create a separate ticket with ffmpeg to fix it.

Upload a small sample, 100MB or so (verify it breaks before uploading) and also the log file for me to see what's going on /settings.

Dodgexander wrote Feb 28, 2013 at 10:48 PM

This looks like its going to be a process of elimination. I have an example of one file that receives the

mmco short failure message above and slow remuxes.

But I also have an example of another file that falls to slow remux, without this error.

Possibly there are two (or more) reasons why these recordings aren't being fast remuxed.

Both are uploading and will be under the folder Dodgexander on the server.

rboy1 wrote Feb 28, 2013 at 11:36 PM

Yes that' what I told you front, trying to tweak it to save some time will break something else.

BEst case, leave the default remux parameters and use the TS H264 profile. It will take longer but work on everything.

Dodgexander wrote Mar 1, 2013 at 12:35 AM

these two examples I'm uploading in relation to this issue haven't ever fast remuxed though. Hopefully you will be able to see why from my uploads.

rboy1 wrote Mar 1, 2013 at 2:11 AM

2 of them

--> av_interleaved_write_frame(): Invalid argument

Known ffmpeg issue, ticket opened (you can search and vote for it)

Reremux problem - Fixed,

See today's build.

rboy1 wrote Mar 1, 2013 at 6:41 PM

Fix provided

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 -vcodec copy -acodec copy -map 0:a -map 0:v -f mpegts
SlowRemux0=-i -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 -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).

** Closed by rboy1 28/02/2013 18:11

Dodgexander wrote Mar 1, 2013 at 6:43 PM

av_interleaved_write_frame(): Invalid argument appears many times in an ffmpeg search. Is ticket #2220 this fault?

Because it seems av_interleaved_write_frame(): Invalid argument also appears in different scenarios.

rboy1 wrote Mar 2, 2013 at 1:02 AM

Yes

Dodgexander wrote Mar 5, 2013 at 1:55 AM

If I leave the files that I have (that include av_interleaved_write_frame(): Invalid argument) to slow remux according to the custom config file instructions you provided. I end up with a faulty file, it keeps skipping between frames whereas the original works fine.

rboy1 wrote Mar 5, 2013 at 3:57 AM

Trying using the default MP4 profile.

Dodgexander wrote Mar 5, 2013 at 3:12 PM

The use of profile will not make a difference. It is when the files have that error and revert to config file:
[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
That they have skipping.

Dodgexander wrote Mar 5, 2013 at 7:36 PM

Well something is badly wrong, I have been watching a few of the processed files and they have stuttering problems every so often where the original plays fine. I think it may be the slow remuxed ones as well as the fast remuxes. Darn.

rboy1 wrote Mar 5, 2013 at 8:25 PM

I mean stop messing with this H264 single conversion stuff and try a stock build config file with the MP4 Normal profile.

Dodgexander wrote Mar 5, 2013 at 9:19 PM

But thats no good for me, I set MCEBuddy to watch a folder and cannot distinguish between files that have ffmpeg errors and those that don't.

If I use stock mp4 profile, everything will be slow recoded to h264, even when they don't need to be and it take too long.

So basically I cannot win, unless I wait a very long time for each to be recoded or let the ones with error be decoded to mpeg2 as backup (as per original config file).

I'll have to investigate more if its the fast remuxed files that are stuttering or the recoded ones.

Dodgexander wrote Mar 6, 2013 at 5:19 PM

Okay I have two .wtv files that are reverting to slow remuxing.

A- BBC One HD Recording
B- Channel 4 HD Recording

A Exhibits presentation glitches, choppy playback, sometimes flashing previous frames. I checked mediainfo and its marked as progressive, despite having interlaced video. I am certain this is because at the start of the recording, the video is progressive and then changes to interlaced once the program starts

B Doesn't exhibit any glitches and plays fine. But this originally was a recording consisting of just 1080p.

So it seems either there is something wrong with the flagging of BBC One HD, or the conversion progress isn't correctly reading that file. Perhaps because it thinks its progressive, but isn't?

I can provide both logs and samples if needed.

Dodgexander wrote Mar 8, 2013 at 12:35 AM

I have another example of Channel 4HD with the same problem as C, despite being the same program as A.

Not sure what the problem can be with the settings causing the shaking with some recordings, some not. But only the ones that are slow remuxed, e.g recoded from h264 too h264.

rboy1 wrote Mar 13, 2013 at 11:12 PM

profile working, user needs to tweak to meet requirements

** Closed by rboy1 10/03/2013 08:50

Dodgexander wrote Mar 13, 2013 at 11:13 PM

I need help choosing settings that don't give me a problematic h264 file when ffmpeg copy fails.

At the moment I get a broken file (see previous comments)

Dodgexander wrote Mar 15, 2013 at 9:44 PM

Since I gather the reason I end up with unplayable files is related to ffmpeg, how can i make a ticket with them for the problem?

rboy1 wrote Mar 15, 2013 at 11:12 PM

you will need to replicate the steps manually (look at the log file commands) and copy paste the output along with the sample source files along with the ticket.

newperterblack wrote Mar 18, 2013 at 4:15 AM

Bigasoft WTV Converter is ideal WTV conversion software to convert WTV file format to any desired video format so that you can play the recorded TV shows on media players, portable devices, import to editing working flows for edit, upload to video sites for sharing and many more.

Bigasoft WTV Converter supports converting WTV to any video formats including convert WTV to AVI, convert WTV to MP4, convert WTV to WMV, convert WTV to MPEG, and convert WTV to MPG, MOV, MKV, FLV, 3GP, 3GPP, DivX, Xvid, MPEG-1, MPEG-2, ASF, H.264, RM, WebM, VP8, MOD, TOD, MTS, TS, 720p, 1080p, HD videos and more.

Step by step guide on how to use it at How to Convert WTV to MP4, AVI, WMV and etc?

Dodgexander wrote Mar 19, 2013 at 5:30 PM

I have opened a ticket in relation to this problem

Dodgexander wrote Mar 21, 2013 at 10:31 PM

I have a problem with repeating this to the ffmpeg devs, the problem can't be repeated with a sample file, only with the full file.

rboy1 wrote Mar 22, 2013 at 8:22 AM

You can upload the entire file via FTP to the ffmpeg site. Look at the bug reports page for details.

Dodgexander wrote Mar 23, 2013 at 3:33 AM

Hi ramit thanks for the help.

I finally managed to work out how to use ffmpeg via the command line.

Sadly, using the same settings that cause a broken output file with MCEbuddy, do not cause a broken output file using ffmpeg directly.

What is even stranger is the two output files, despite being encoded with the same settings have different attributes
this is tested with the same ffmpeg in the MCEbuddy directory too!!

So what on earth is causing these broken outputs?I can't make sense of it.

I guess the next step is to cut a small sample and test with MCEbuddy alone. hopefully I can find one that causes the problem for you to assess without the full 7gb file?

rboy1 wrote Mar 23, 2013 at 7:21 AM

If you replicate aLL the steps and the use the same version of ffmpeg you'll be able ot replicate the issue. usualy it's a step being missed somewhere.

Dodgexander wrote Mar 23, 2013 at 1:52 PM

Could the following be causing it? Because I am unsure how to replicate these using ffmpeg directly.
--> Process arguments  -probesize 100M -analyzeduration 300M -i "O:\Recorded TV\MCEBuddyArchive\Match of the Day_BBC One HD_2013_03_03_07_28_00.wtv"
--> ffmpeg version N-48065-g6375318 Copyright (c) 2000-2012 the FFmpeg developers
-->   built on Dec 21 2012 09:06:30 with gcc 4.7.2 (GCC)
-->   configuration: --enable-static --arch=x86 --target-os=mingw32 --cross-prefix=/home/rdp/dev/ffmpeg-windows-build-helpers/sandbox/mingw-w64-i686/bin/i686-w64-mingw32- --pkg-config=pkg-config --enable-gpl --enable-libx264 --enable-avisynth --enable-libxvid --enable-libmp3lame --enable-version3 --enable-zlib --enable-librtmp --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libopenjpeg --enable-gnutls --enable-libgsm --enable-libfreetype --enable-fontconfig --enable-libass --enable-libutvideo --enable-libopus --disable-w32threads --enable-frei0r --enable-filter=frei0r --enable-libvo-aacenc --enable-bzlib --enable-libxavs --extra-cflags=-DPTW32_STATIC_LIB --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libschroedinger --enable-libbluray --enable-libvpx --enable-runtime-cpudetect
So far I am using:
ffmpeg -report -i input.wtv -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 output.ts
The log from mcebuddy is quite large and hard to read when I don't know what I am looking for. Perhaps you can help me find out the steps I am missing to replicate the problem.

Here is the link: TEXT

Dodgexander wrote Mar 23, 2013 at 11:31 PM

Link to log of conversion sorry

Dodgexander wrote Mar 23, 2013 at 11:53 PM

Please just close this, going to start a fresh once I can find a better sample.