Hi folks,
I've got a video which is an HDTV capture from Brazilian TV, Globo Multishow HD to be precise. As far as I know the video should be 1080i, H.264 at 29.97fps interlaced, pretty standard right?. Looking at the file in mediainfo it agrees however when it comes to trying to encode this file I'm getting very odd results.
The original file format is MKV. If I load that original file with directshowsource into VDub with no other filters it reports that it's 25fps. If I load it with FFmpegsource2 Vdub reports that it's 59.938fps. The same thing happens loading into HCEnc so of course that means an ever bigger mess when I start adding other filters.
I tried demuxing the file with MKVdemux but then loading the resulting h.264 file HCEnc crashes with Directshowsource and with FFmpegsource2 it gives me an error of invalid initial pts and dts.
The only way I could get things working is by adding the fps on the input (directshowsource("filei.mkv", fps=29.97)) but on encoding a sample with this full script:
But that gave me an output which looked ok but I can see interlacing problems. HCEnc also said this in the log:Load_Stdcall_Plugin("C:\Program Files (x86)\AviSynth 2.5\plugins\yadif.dll")
directshowsource("filei.mkv", fps=29.97)
AssumeTFF()
Yadif(mode=1, order=1)
Spline64Resize(720,480)
SeparateFields()
SelectEvery(4,0,3)
Weave()
ColorMatrix(mode="Rec.709->Rec.601", clamp=0)
ConvertToYUY2()
I only encoded the first 2000 frames so that is nearly all of them.*** WARNING, 1878 frames found with small mismatch errors
*** ERROR, 44 frames found with large mismatch errors
What is going on with this file? Here is a sample of the original MKV, just split with MKVmergegui - http://www.mediafire.com/?s16tmwss1j4xh44
Thanks in advance.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 30 of 37
Thread
-
-
mediainfo can't find any framerate for it. most other programs that will load it say either 60i or 25, hard to say what the original was. maybe shot at 25fps and broadcast at 60i? after running through mkvmergegui to remove the header stripping a program i found that will convert it to usable h264 30p is vidcoder. leave detelecine and decomb on auto, deinterlace off. manually set the frame rate to 29.97
--
"a lot of people are better dead" - prisoner KSC2-303 -
Weird, that certainly isn't the case for me here. If I just load with DSS and nothing else framrate is reported to be 25fps in both HC and VDub.
With the script above forcing 29.97fps and the rest of the script this is my output of the first 2000 frames of the video - http://www.mediafire.com/?36sbkv8vc8bqd3t
Doesn't look right to me. Plus there is the frame mismatch error from HC that I mentioned. -
The DSS() issue may be a matter of what MKV reader/splitter you have installed. I used LAV Filters.
I suspect the frame mismatch errors in HcEnc may have to do with the fact that DSS() isn't frame accurate. Ie, if the encoder asks for frame N multiple times it may not get the same frame each time. It may get N+1 or N-1 instead. I would try an alternative like ffmpegsource2().
Your M2V file is a bit odd. MediaInfo doesn't report that it's interlaced. DgIndex show it changing from interlaced to progressive throughout the video. Playback is jerky in VLC, ok in MPCHC. -
Indeed, and it was encoded with the exact script I posted in the OP. I was going to encode with ffmpegsource2 but what is the syntax to force 29.97fps? ffmpegsource2("filei.mkv", fps=29.97) doesn't work.
-
what is the syntax to force 29.97fps?
-
it's not the lav splitter that is the difference between you and us not getting correct info. what else is in your chain?
--
"a lot of people are better dead" - prisoner KSC2-303 -
You can try this
Code:FFVideoSource("filei.mkv") AssumeFPS(30000,1001)
-
The script loads with that but crashes when I hit encode. The file WAS a TS originally, the person I got it from said he changed the container to MKV to save space. One thing I'm not sure on though, he said the original TS was 14.1GB and the MKV file was 11.6GB. He said it was just a container change but that seems like too big a drop in size to me and when I remuxed the MKV into TS it was only 12.xGB. Shouldn't it have been the same as the original TS?
-
-
That's what I'm saying, I did remux it into a TS and it came out at 12GB or thereabouts, ~2GB less than what he said the original TS was.
-
It should be the same, if you used the same kind of transport stream and muxing parameters, if there were no errors. You can mux with different buffer and muxrates that can change the size. Sometimes demuxing can drop packets if there were errors in the stream to begin with
Ask him to do test the same using the same programs you used (demux, mux) and note the sizes
Or maybe there were other errors? e.g transmission errors. How did you get the file? -
Through torrent and verified with an md5 hash. I've just asked which tools he used. Going back to something I said earlier, has anyone had any luck with a demuxed h264 file? When I did that and tried to encode I got an invalid initial pts and dts error from avisynth.
-
md5 hash check is useless if the original MKV is b0rked. As soon as you demux or rewrap a transport stream it can give you errors.
The reason why broadcasters use transport streams is they are very robust. That extra overhead contains timing data and recovery information. When you re-wrap, you lose a lot of that - often you get glitches and desync whereas the original transport stream will play fine. So only if the original stream was pristine without transmission errors, can you safely re-wrap it.
For avisynth, you can index it with DGNVtools. It's probably the most robust solution, but not free and requires compatible Nvidia card. DGDiAVC should also work (but requires 2 licenses, 1 from DiAVC and 1 from neuron)
DGAVCIndex is depreciated, and will give you stream errors with PAFF streams like this one (you will see macroblocking)
The only free solution that is semi consistent is using directshow for interlaced avc - directshow can often ignore errors and keep sync. Anyways, directshow seems to work ok here for me (probably because it ignores many problems) . ffmpeg/ffmbc report a gazillion errors -
who's the band anyway?
--
"a lot of people are better dead" - prisoner KSC2-303 -
Foo Fighters is the band.
Yeah I know, I just meant the MKV I have was identical to his so no problem with the download. I've just asked him and he said he changed it to MKV with gdsmux.exe. Can't say I've ever used that myself but could you see that causing the problems? I've asked if he still has the original TS that he can cut a sample of for me/you to look at and see if it still has problems like the MKV.
For avisynth, you can index it with DGNVtools. It's probably the most robust solution, but not free and requires compatible Nvidia card. DGDiAVC should also work (but requires 2 licenses, 1 from DiAVC and 1 from neuron)
DGAVCIndex is depreciated, and will give you stream errors with PAFF streams like this one (you will see macroblocking)
The only free solution that is semi consistent is using directshow for interlaced avc - directshow can often ignore errors and keep sync. Anyways, directshow seems to work ok here for me (probably because it ignores many problems) . ffmpeg/ffmbc report a gazillion errors -
--
"a lot of people are better dead" - prisoner KSC2-303 -
wrong one - lollapolooza brasil earlier this month?
720p full concert on youtube if you want it - http://www.youtube.com/watch?v=OO-e8_-bMv8 - sounds ok--
"a lot of people are better dead" - prisoner KSC2-303 -
Did you fiddle with lav splitter ? I made a mistake earlier: haali does have some issues with that mkv. Go with lav for this one
Although lav splitter reports 29.97 , it's not quite correct for DVD (it's an approximation), so in your script you should put AssumeFPS(30000,1001) anyways
Eitherway, I tried it with HCEnc and it reported frame mismatch between the passes too - probably because of directshow. So to get around that, you can encode to lossless intermediate first (using the SD re-reinterlace script, but add AssumeFPS(30000,1001) ), then use AVISource to encode with HCEnc . When I examined the output, it's fine (except for the first couple of frames where you cut it) -
Never used LAV before but thanks, I'll give that a try.
Just to be clear, you're suggesting to load this script:
Load_Stdcall_Plugin("C:\Program Files (x86)\AviSynth 2.5\plugins\yadif.dll")
directshowsource("split-006.mkv")
AssumeFPS(30000,1001)
AssumeTFF()
Yadif(mode=1, order=1)
Spline64Resize(720,480)
SeparateFields()
SelectEvery(4,0,3)
Weave()
ColorMatrix(mode="Rec.709->Rec.601", clamp=0)
ConvertToYUY2()
EDIT: Lossless output from Vdub is the same.Last edited by Killer3737; 28th Apr 2012 at 08:43.
-
I don' t know then - must be some problems with your directshow system if the AVI shows the problems. Use graphstudio and render the mkv, make sure you are using lav, not some other splitter
Exactly what do you mean by: "bad mix of interlaced and progressive frames?"
When I didn't use the AVI, there were field swaps and misordered frames so you get a jerky motion effect in the encoded file (perhaps because of the mismatches from HCEnc from using directshow between the passes) -
jag and pdr are you guys using a 32bit o.s.? the OP and i are 64bit win7. maybe difference in results?
--
"a lot of people are better dead" - prisoner KSC2-303 -
I'm running 64 bit Win7 but I'm using 32 bit AviSynth. Keep in mind that the 32 bit and 64 bit subsystems are completely separate in 64 bit windows. You need all 32 bit components to when using any 32 bit component; you need all 64 bit components when using any 64 bit component. So since I was using 32 bit AviSynth I was also using 32 bit LAV filters, 32 bit x264, and/or 32 bit VirtualDub.
-
^What jagabo said.
But there are 64bit builds of avisynth, but everything in the chain has to be 64-bit. This includes all the filters in the script like yadif, colormatrix etc... There is only a fraction of filters that are available in native 64-bit. Also 64bit avisynth is not the most stable. 32bit avisynth is the most consistent and stable with access to all the filters
Similar Threads
-
Newbie question about frame rates.
By MrTorso in forum Video ConversionReplies: 4Last Post: 13th Jul 2011, 23:49 -
need software to convert video files that have different frame rates
By snafubaby in forum Video ConversionReplies: 2Last Post: 7th Mar 2011, 03:33 -
Editing and rendering with multiple frame rates?
By vid83 in forum EditingReplies: 12Last Post: 2nd Mar 2011, 04:20 -
Virtuadub shows two different frame rates ?
By vodmare in forum Video ConversionReplies: 8Last Post: 12th May 2008, 19:47 -
Encoding in Virtualdub: Do you have to worry about frame rates?
By FallenAngelII in forum Newbie / General discussionsReplies: 28Last Post: 7th May 2007, 12:15