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. |
13th July 2006, 02:21 | #1 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
How do you determine the framerate of a video?
Having recently discovered the wonders of Gabest's FLV splitter and enabling FLV1 decoding on FFDShow, I was going to try making watchable versions of a couple of X-Men anime intros on YouTube.
In trying to find out the A/V specs of each file, I used ZoomPlayer and FFDShow's tray icons. The "Playing Information" dialog in Zoomplayer reported the files as having 29.97fps but the FFDShow's "Video Decoder" section reports it as having 25fps. The only other thing I can think of to find out a video's framerate is to open it via AVISource or DirectShowSource (without setting the fps parameter). So, which method do you trust will give you the real framerate of a video?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. Last edited by Chainmax; 14th July 2006 at 03:05. |
13th July 2006, 03:03 | #2 | Link |
Mr. Woof
Join Date: Jan 2002
Location: USA
Posts: 784
|
You could try seeing what MediaInfo reports on the file. It does have some bugs, but I've not seen any in the frame rate reporting aspect of the program.
I would also like to know if there are any trusted apps that will accurately report similar info and in detail like MediaInfo. |
14th July 2006, 03:00 | #4 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
So how can I convert them to DVD compliant MPEG2 then?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
14th July 2006, 05:22 | #5 | Link |
Registered Jedi
Join Date: Jan 2003
Location: Georgia, U.S.A.
Posts: 733
|
Sorry, I have no idea. I don't know a whole lot about them. I know that the open source MPlayer will play and decode them, so maybe you could start from there. However you do it though, I fear it may be a very frustrating project.
__________________
May the FOURCC be with you... |
14th July 2006, 19:34 | #6 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Oh, it's very easy to do so as I can open them in Avisynth, the only problem I have is what to set DirectShowSource's fps parameter to (or at all, is it really necessary?).
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
15th July 2006, 18:58 | #8 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
I'd rather not do that. If it's VFR, I'd like to find out and then use VFR-dedicated framerate conversion methods.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
16th July 2006, 09:50 | #9 | Link |
Registered User
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
|
fccHandler is correct, there is no frame rate defined in a FLV file, only timestamps on each frame.
EDIT: I had said that the timestamps don't look correct but I was parsing them wrong :P.
__________________
moitah.net Last edited by Moitah; 16th July 2006 at 10:08. |
18th July 2006, 22:58 | #10 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Is there a way to use that timestamp info to make as good a conversion to DVD-compliant MPEG2 as possible? If not, I'll just treat is as CFR, so which method would you recommend me to trust:
- The "Playing Information" dialog in Zoomplayer? - FFDShow's tray icon's "Video Decoder" section? or - opening it via AVISource or DirectShowSource without setting the fps parameter and check VDUbMod's "File Information" section?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
19th July 2006, 00:47 | #11 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
That's a surefire way to hit desync. You can just use
Code:
DirectShowSource("x.flv",fps=59.94,convertfps=true) separatefields().selectevery(4, 0, 3).weave() Avisynth's vfr capabilities are just too limited to do anything more advanced (mocomp, or even blending) if it is vfr. |
20th July 2006, 00:59 | #12 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
I still have to know wether to set fps as 59.94 or 50, which depends on wether the source is reported as 25fps or 29.97fps. So, which fps report should I use as a base for that decision? Also, should I include audio=true to the script snippet you posted or does it not affect A/V synch?
[edit] I used your suggestion and I get some sort of interlacing artifacts .
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. Last edited by Chainmax; 20th July 2006 at 01:35. |
20th July 2006, 02:26 | #13 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
Well, you said you were going to DVD so I assumed you wanted interlaced. Guess not.
What I meant by the fps is what your destination format is, not whatever the source is. Say, if the source is some combination of 10, 12, 25, and 30, and you're going to 50i, what would you even do with it? There's no way you can convert it properly to 50p once it's inside avisynth, unless you find the ranges, split them up, and process each separately, so you might as well just duplicate frames up to 50p on input and cut down to 50i for DVD. Or 60p/60i. If you can be sure it's cfr or at least mostly cfr (via dedup logs, ffdshow osd timestamp logs, or mkv timecodes), then you can load at that and use your favorite avisynth-based conversion, of course. Someone's working on a mkv v2->v1 converter that'll make that easy, and I think the ffdshow osd timestamp format can be easily converted to mkv v2. |
20th July 2006, 17:01 | #14 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Well, the source is progressive, so keeping it progressive is a better idea, right?
By the way, could you tell me where to find info on checking out if it's cfr or at least mostly cfr via dedup logs, ffdshow osd timestamp logs, or mkv timecodes? I have no idea how to do either.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
25th July 2006, 18:27 | #15 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
foxyshadis?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
27th July 2006, 10:41 | #16 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
Sorry, I've been meaning to come up with a tool to do it, in lieu of a decent explanation, because doing it manually is no fun. But say you import it with Directshowsource at 120fps (fps=119.88,convertfps=true), and use dedup on it (DupMC(log="dedup.txt")). You would scan the log for patterns that indicate its true framerate - most will be 0 difference, the ones that aren't are the important ones.
If there's one non-zero frame every 5 lines, it's 24fps, if it's every 4 lines, it's 30fps, and if it's a pattern of mostly 5s with an occasional 4, it's 25. If it's hybrid some areas will be one and others another. It might even be much lower, like 10 or 12 fps. Raise the import framerate as necessary (try 12000 if you need real precision) to figure out 30 vs 29.97 or 24 vs 23.967 based on the exact numbers of dup frames inserted. You can see why this is better done with a tool. I have some ideas but it requires modifying dedup. |
27th July 2006, 23:22 | #17 | Link |
Registered User
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
|
I'm releasing a new version of FLV Extract a bit later today that can output a timecode file. It also will tell you the average framerate (frame count divided by duration), and it tries to estimate the true frame rate (ignores timestamp skips).
EDIT: Done, see my site or my thread in A/V containers.
__________________
moitah.net Last edited by Moitah; 28th July 2006 at 00:06. |
28th July 2006, 01:50 | #18 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
I'll use your program and compare it to foxyshadis's once it's released. Thanks for the answers .
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
28th July 2006, 02:06 | #19 | Link |
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
This is strange, the first file shows this report:
So I guess I can use DSS("",fps=29.97,convertfps=true,...) The second file shows this report: I guess I could use fps=23.976,convertfps=true, but it's strange that it reports different things than the first one since they are two intros from the same show. If you want to take a look at the timecodes, I uploaded them to RapidShare: http://rapidshare.de/files/27275749/...o_N_1.txt.html http://rapidshare.de/files/27275754/...o_N_2.txt.html
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
28th July 2006, 02:48 | #20 | Link |
Registered User
Join Date: Feb 2004
Location: Virginia, USA
Posts: 334
|
Looks like my calculation method didn't work so well on the second one. This is how the timestamps are in the timecode file you uploaded:
Code:
time delta # of frames 33 ms 1025 34 ms 388 67 ms 515 66 ms 23 100 ms 46 101 ms 15 134 ms 4 133 ms 3
__________________
moitah.net |
|
|