Log in

View Full Version : h264 to mkv: DirectSourceShow or DGAVCIndex


lintran
6th December 2010, 19:19
Hi all!!!
I spent alongtime to read more topic before post this thread.
I'm plaining to encode .h264 via Megui (with Avisynth, ofcourse).
I knew that I have to import my .h264 or mkv,mp4... to avisynth. There are 2 ways:
1. Load container (mkv,mp4) with script : DirectSourceShow("pathtofile/xxx.mkv",audio=false)
2. Demux to .h264 then use DGAVCIndex and make .dga file, then load it to avisynth with DGAVCDecode.dll plugin.
I have some questions:
-I know using DGAVCindex will make it decode faster than DirectSourceShow. But i dont know which Field Operation (Honor PullDown Flags, Ignore, Forced Film) should i choise when make .dga file. Could you tell me?
- Does 2 ways above (without any filter) give us same quality of video when encode via Megui with same setting?
- When use option 2, DGAVCindex by default will set framerate to 25.000, and I need change it to proper fps in .dga or avisynth, but when use option 1, do i need to do it, or I allways got right fps via DirectSourceShow script?
Thank you.

TheRyuu
7th December 2010, 01:29
DGAVCDecode will probably be slower than whatever decoder directshowsource is going to use (probably ffmpeg-mt via ffdshow). DGAVCDecode uses an ancient libavcodec and is single threaded only.

Why not give ffmpegsource a try? It'll be frame accurate (with mkv/mp4) and can be threaded (mt builds).

Because you demuxed it to nothing but a raw video stream it has no framerate set so dgavcdecode just arbitrarily sets 25fps.

lintran
7th December 2010, 06:28
Thanks TheRyuu.
As you said ffmpegsource 'll be frame accurate with mkv/mp4, do you mean load mkv/mp4 to avisynth using Directshowsource (ffmpeg-mt via ffdshow) or index it by FFMS2?

Blue_MiSfit
7th December 2010, 12:08
The latter: ffms2 (== ffmpegsource)

If you want to try DirectShow, DSS2(...) or DirectShowSource(...) work fine for me.

DGDecNV is another choice if you want hardware decode / deinterlacing.

Derek

lintran
7th December 2010, 14:54
The latter: ffms2 (== ffmpegsource)

If you want to try DirectShow, DSS2(...) or DirectShowSource(...) work fine for me.

DGDecNV is another choice if you want hardware decode / deinterlacing.

Derek

Thanks. So if i want index container (h264 in mp4/mkv), which option will give frame accurate better (DirectShowSource or FFMS2)?

JEEB
7th December 2010, 15:09
Thanks. So if i want index container (h264 in mp4/mkv), which option will give frame accurate better (DirectShowSource or FFMS2)?

In theory, DSS2, when paired with Haali's splitter, is frame-accurate on formats that it handles (esp. with matroska). The original DirectShowSource can be just accounted as a basic input filter and in no way can promise you frame-accurateness.

FFMS2 should be completely fine with mkv and mp4 as long as they contain something decodable by ffmpeg, with the possible exclusion of interlaced H.264. Not sure how FFMS2 dealt that one. Also, esp. with blu-ray remuxes it helps when the file has been muxed with mkvmerge and not haali's muxer (files muxed with haali's muxer have had problems from time to time).

zmaster
7th December 2010, 19:05
DirectShowSource or FFMS2?FFMS2. And I will not miss opportunities to say that the dss can change the sequence of frames (especially if you cut part of a video).
I love ffms2, but still think the most reliable method DGAVCDecode - I met avc sources that ffms2 just could not handle it.

lintran
7th December 2010, 20:28
Thanks all.
Seem i'm going to love FFMS2, too :D. Because using DGAVCindex i'll have to demux video to .h264 :(. And I want to ask you guys one more question:
Since FFMS2 can handle Mp4/Mkv( with H264) so does it handle .mov (h264/aac like apple trailers) as well as mp4/mkv? Or i need remux .mov to mp4 (by Mp4box) then index it using FFMS2?

JEEB
7th December 2010, 20:30
Thanks all.
Seem i'm going to love FFMS2, too :D. Because using DGAVCindex i'll have to demux video to .h264 :(. And I want to ask you guys one more question:
Since FFMS2 can handle Mp4/Mkv( with H264) so does it handle .mov (h264/aac like apple trailers) as well as mp4/mkv? Or i need remux .mov to mp4 (by Mp4box) then index it using FFMS2?

mov is pretty much mp4, should be handled well enough.

lintran
7th December 2010, 20:42
mov is pretty much mp4, should be handled well enough.
Sorry for my bad English, you said "mov is pretty much mp4", do you mean mov is same mp4, and i can index it directly by FFMS2 (and it will be treated well as mp4) without remux it to mp4?

JEEB
7th December 2010, 22:05
Sorry for my bad English, you said "mov is pretty much mp4", do you mean mov is same mp4, and i can index it directly by FFMS2 (and it will be treated well as mp4) without remux it to mp4?

The ISO MPEG container format is based on a certain specification by Apple called "MOV". They're not the same, but let's just say that in most cases when you need to load mov files into avisynth FFMS2 will do the job.

TL;DR Yes, it will work in 99% of all cases.

lintran
7th December 2010, 22:46
The ISO MPEG container format is based on a certain specification by Apple called "MOV". They're not the same, but let's just say that in most cases when you need to load mov files into avisynth FFMS2 will do the job.

TL;DR Yes, it will work in 99% of all cases.

Yeah, thank you. I've got it.
And the last stupid question: What does "TL;DR" mean :)), i try my best to figure it out, but failed, LOL

TheFluff
7th December 2010, 22:52
"too long; didn't read"