Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
16th December 2011, 17:06 | #1 | Link |
Registered User
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
|
Which *source filter is the most suitable?
Hi I need this answer for my batcher but I decided to put it in special thread:
There are many diferent source filters (AviSource, MPEG2Source, MPEGDecoder, FFSource...). There are media files, which can be opened only with one of them. But there are many which can be opened with more then one and then, which one to choose. I don't know what can be the criteria but what comes to me now is (more or less sorted by importance): - assuring audio sync - framerate keeping (sometimes I had MPEG2Source with double framerate result with every other frame full green) - interlaced processing ??? - postprocessing options - some color conversion errors? - frameacurate seeking - ... I know it depends on 1) codec 2) container. I also know that file extension does not necessarily imply the container. But, it already happened to me, that file *.vlc got error when opening and when I renamed it to *.avi, all went fine. Same goes for audio. Has maybe demuxing some benefit on a/v sync? In my batcher I, at this moment, try first FFVideoSource and when error I try AviSOurce. I plan to introduce more filters, but first I want to be sure to make it correctly. So, can anyone with knowledge in this area, put down some basic rules, which should a user follow to choose best source filter? |
16th December 2011, 17:10 | #2 | Link |
Registered User
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
|
Maybe, we can put together some general purpose table like this:
Code:
Container MP4 MKV MPEG2-PS AVI WMV AVC FFMS FFMS - XViD,DivX FFMS FFMS AviSource Typical extensions AVI = *.avi, *.divx, ... MPEG2-PS = *.vob, ... WMV = *.wmv, *.wm, ... Last edited by redfordxx; 16th December 2011 at 17:28. |
16th December 2011, 18:02 | #3 | Link |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
TS/PS: dgindex and friends
Pretty much everything else: FFMS Backup for stuff not supported properly by FFMS: AVISource/DSS(2)/various source-specific plugins (qtsource etc) Raw image data: rawsource/sashimi AVISource and DSS(2) are extremely unreliable from an "automagic" perspective, since their capabilities are completely dependent on third-party software that may or may not be installed on the user's system. AVISource in particular can often be a correct choice for AVI's, but you can't rely on that without knowing what the user's VFW environment looks like, so for automatic programs you distribute to random users it's very unsuitable as a general-purpose source filter. |
16th December 2011, 19:19 | #4 | Link |
Registered User
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
|
So, what you are saying if it is MPEG2, it is better to use DGIndex and friend than FFMS, even if FFMS can read the file?
So, can I put it like this? Even when the extension suggests that it is not MPEG2, still try it: Code:
try{MPEG2Source(*.whateverextension)} catch(errmsg){FFVideoSource(*.whateverextension)} Are there any important about the and friends area? For example I understand MPEGDecoder does not require indexing, which would be good for my "automagic" stuff. However are there any disadvantages? Last edited by redfordxx; 16th December 2011 at 19:26. |
16th December 2011, 21:06 | #5 | Link | |
Registered User
Join Date: Sep 2011
Posts: 86
|
Quote:
AVCSource takes a .dga index file which is generated by DGAVCIndex. So blindly trying to open random files won't work. Indexing is suppose to make random-seeking frame-accurate. FFMS support for transport/program streams is done through haali/directshow and seeking could be off by a frame or two. (not indexed??) |
|
16th December 2011, 21:45 | #6 | Link |
Registered User
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
|
My bad.
I meant try{indexing} and if not OK, do it with FFMS. And what would be good recomendation for wmv? I must say this is where I experienced mostly a/v sync problems. I had one file (now deleted) where avisynth detected framerate somewhere around 29 and in fact it was 30fps, so the result was out of sync. (basically this is why I added framerate warning to the batcher) Last edited by Guest; 16th December 2011 at 21:50. Reason: rule 12: don't ask for best |
16th December 2011, 22:03 | #7 | Link | ||
Registered User
Join Date: Aug 2008
Posts: 233
|
Quote:
Code:
try{MpegAutoIndexSource("foo.xyz")} catch(errmsg){FFVideoSource("foo.xyz")} Quote:
Last edited by vampiredom; 17th December 2011 at 01:57. Reason: fixed the erroneously swapped CODE and QUOTE tags |
||
17th December 2011, 00:38 | #9 | Link | |
Registered User
Join Date: Aug 2008
Posts: 233
|
Quote:
Last edited by vampiredom; 17th December 2011 at 00:50. |
|
17th December 2011, 03:28 | #11 | Link | |
Registered User
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
|
Quote:
But, this VC-1, it is bluray codec, isn't it? So, I don't expect it in batch encoding often. Or, am I mistaken? |
|
17th December 2011, 05:50 | #12 | Link | ||
Registered User
Join Date: Aug 2008
Posts: 233
|
Quote:
Quote:
You asked about .wmv files: Some ".wmv" files are WVC1 (VC-1) while others are WMV3 (Windows Media 9). I don't really know all the gory details about these containers and how they differ and their compatibility. I only know that the process I described will work with the bona fide VC-1 ones, not the WMV3 ones. [At the risk of drifting off-topic, I would love to find a simple command-line way of losslessly converting/rewriting WMV3 -> WVC1, if such a thing is possible] |
||
17th December 2011, 20:22 | #13 | Link | |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
Quote:
|
|
17th December 2011, 20:27 | #14 | Link |
Registered User
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
|
And what would be the advice on videos, where the audio sync off and changing sometimes positive, sometimes negative. I believe it it means the source is vfr?
For example avc in flv? With ffms is audio sync off, DSS says the filter graph manager won't talk to me and when I playback it in BS, it is fine with FLVsplitter+CoreAVC. First wondering is already that DSS makes problems... I thought that when I can play the video in BSPlayer, it automatically works with DSS... Any ideas? This makes sync problems: Code:
FFVideoSource(srcfile, threads=1) Code:
DirectShowSource(srcfile, audio=false, pixel_type="YV12", logfile="ds.log", logmask=-1) Last edited by redfordxx; 17th December 2011 at 20:31. |
18th December 2011, 08:33 | #15 | Link | |
Excessively jovial fellow
Join Date: Jun 2004
Location: rude
Posts: 1,100
|
Quote:
1) enforce CFR (fpsnum/fpsden parameters to ffms2, convertfps parameter for DSS) 2) export timecodes from the original file and add them back in when muxing. |
|
20th December 2011, 01:42 | #16 | Link |
Registered User
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
|
Hi, I am trying to use MPEGAutoIndex and I am confused about one thing. For example in the log file is Aspect Ratio: 4:3 NTSC but when I open it in MeGui, it reports 1,367521 which is clearly not 4/3. Similarily 16:9 versus 1,823361 (and 1,823169 ???)
Can anyone explain how these standards work? |
21st December 2011, 18:29 | #17 | Link |
Registered User
Join Date: Jan 2005
Location: Praha (not that one in Texas)
Posts: 863
|
So I did some research and I am even more confused. I realized that e.g. 16:9 is "just a name" and one must know other info about the source to be able to choose correct AR. And that's where I am lost
At the moment I have found 3 types of SAR for 16:9 MPEG2 Code:
PAL 512:351 118:81 64:45 NTSC 5760:4739 40:33 32:27 Then MPEG1... maybe is not the case and Aspect ratio which I can read in the logfile is really the one, or I have also to find the correct one somewhere else. I read somewhere that MPEG1 has 14 aspect ratios, so I hope they are directly the ones For example 4:3,625, which I remember from some DGIndex logfile. Thanx to anyone for any enlightening. R. |
Thread Tools | Search this Thread |
Display Modes | |
|
|