720p frame rate Virtualdub
|
|
maggas
Junior Member
|
16. January 2009 @ 21:15 |
Link to this message
|
The 720p HDTV I record is 50fps, and I would like to encode it at 25fps. Usually the channels I record are 1080i and I set the deinterlace filter on before encoding. Is there some sort of 'deprogressive' filter that converts the 50fps back to their original 25?
At the moment all I can find is to decimate the frame rate by 2, but I'm not sure this is the right way to go about it...
|
Advertisement
|
|
|
Senior Member
|
19. January 2009 @ 15:55 |
Link to this message
|
If you scan through the video one frame at a time, do you see
2 duplicate frames, followed by another two duplicate frames, etc,
etc? If so, decimate by 2 seems reasonable. What is the result like?
|
maggas
Junior Member
|
20. January 2009 @ 06:34 |
Link to this message
|
I did scan through the video, and it does look like the frames come in pairs (DVB is PAL so no weird NTSC sequences if that's what you were getting at). The final result does look good I guess, just paranoid that it's not quite right perhaps :)
How is 720p content usually reverted back to 25fps from 50fps? Not talking about VirtualDub in particular...
|
Senior Member
|
20. January 2009 @ 16:26 |
Link to this message
|
I'm really not sure what the preferred method is, but decimate
by 2 seems to be the logical solution.
In general though, film-based source (24fps) is sped up to 25 then
each frame is duplicated to give the 50. Is this what you
have?
Post a short clip if you like http://savefile.com/
Myself and others will take a look.
|
maggas
Junior Member
|
21. January 2009 @ 04:03 |
Link to this message
|
|
Senior Member
|
21. January 2009 @ 12:07 |
Link to this message
|
Hello -
took a look - it's not too bad. The scene at 25 seconds where the young
girl turns her head looks slightly jerky. Is it that way in the source?
But the rest of it looked pretty nice.
|
maggas
Junior Member
|
22. January 2009 @ 06:58 |
Link to this message
|
|
Senior Member
|
22. January 2009 @ 12:31 |
Link to this message
|
|
maggas
Junior Member
|
23. January 2009 @ 19:25 |
Link to this message
|
Ah that does suck a bit! I don't suppose there is a filter in VirtualDub that detects the pattern and halves the framerate? I have looked at the forums you recommended and have asked there too, thanks again.
|
Senior Member
|
23. January 2009 @ 20:28 |
Link to this message
|
maggas, the 50 fps clip you provided complicates any analysis
because some parts of it are intentionally in slow motion and
the duplicate frame counts are out of whack.
In any event, avisynth and perhaps something like Fdecimate
may help. I'm not an avisynth xpert, but something simple like
this may help:
DirectShowSource("F:\abc.m2v",fps=50,audio=no,convertfps=true)
FDecimate(metrics=true)
#FDecimate(rate=25,threshold=5)
Save this in an .avs file and open with virtualdub.
Look at it one frame at a time. A threshold value wil show,
and for duplicate, or barely moving frames, the value is
usually somewhere between 1 - 4. When you've figured out the range,
use the # to comment out the line and uncomment the 2nd
Fdecimate, Set the threshold to just above the value you saw
in the range above. Save the .avs. open in Virtualdubub
and check the result.
This message has been edited since posting. Last time this message was edited on 23. January 2009 @ 20:29
|
maggas
Junior Member
|
24. January 2009 @ 02:02 |
Link to this message
|
I had to add ConvertToYUY2() before the FDecimate(metrics=true) just so you know!
I stepped through the video frame by frame (well not the entire video haha, just a few randomised 10second clips throughout the video - just guessing this is what is usually done?) and wrote down the lowest metric that corresponded to an actual different frame (3.3). I also calculated the highest metric that corresponded to no frame change (2.8).
Then I picked a number approximately in between (3)
FDecimate(rate=25,threshold=3)
Then I'm guessing that frames under the metric of 3 are dropped, and those above 3 are kept, and then it adds/drops additional frames to achieve 25fps?
Hopefully I'm on the right track!
EDIT Here is my result: http://www.savefile.com/files/1979408
This message has been edited since posting. Last time this message was edited on 24. January 2009 @ 03:02
|
Senior Member
|
24. January 2009 @ 03:26 |
Link to this message
|
Haven't had time to look at your latest yet, but in regards to the
earlier 50 fps sample, I also tried convertfps=false
on the Directshowsource and the result was that a particular
section decimated better.
It's supposed to be a factor if the source
has variable frame rate - anyway, if a bit gives you trouble, try
that. Your understanding and usage of the "metrics" is the same
as mine.
Didn't you get any response from the the other forums? That's where
the Avisynth heavyweights are.
|
maggas
Junior Member
|
24. January 2009 @ 04:27 |
Link to this message
|
Haven't got a reply from other forums yet, just waiting at the moment. Could you explain what difference using convertfps=false as opposed to true?
I made the following .avs file:
DirectShowSource("E:\abc.mpg",fps=50,audio=no,convertfps=true)
ConvertToYUY2()
FDecimate(rate=25,threshold=2.9)
BicubicResize(736,414)
Crop(8,8,-8,-6)
and then I opened the .avs file with Virtualdub and compressed to H264
This message has been edited since posting. Last time this message was edited on 24. January 2009 @ 05:31
|
Senior Member
|
24. January 2009 @ 19:20 |
Link to this message
|
For some reason I'm unable to open your new-test-abc.avi
in virtualdub, so haven't looked frame by frame. Looks
good in WMP though.
Convertfps=true, apparently becomes a factor if the source has
variable frame rate, and this setting adds frames to
make it seem like Constant frame rate.
Here's the official lingo:
http://avisynth.org/mediawiki/DirectShowSource
What are you using in virtualdub to encode H264? FFDSHOW?
Edit - as soon as I used directhshowsource/avisynth to access your
avi file I could review it in Virtualdub. It looks good.
This message has been edited since posting. Last time this message was edited on 24. January 2009 @ 19:36
|
maggas
Junior Member
|
25. January 2009 @ 06:31 |
Link to this message
|
|
Senior Member
|
25. January 2009 @ 14:39 |
Link to this message
|
|
maggas
Junior Member
|
26. January 2009 @ 00:30 |
Link to this message
|
Thanks for that! Also earlier you said Quote: It's a mix, the duplicate / unique pattern changes throughout the source.
How did you know this?
This message has been edited since posting. Last time this message was edited on 26. January 2009 @ 00:31
|
Senior Member
|
28. January 2009 @ 11:38 |
Link to this message
|
You know what that was? It was the slow motion scene -
which necessarily had more duplicate frames.
I think Fdecimate handled it OK?
|
maggas
Junior Member
|
29. January 2009 @ 02:21 |
Link to this message
|
To be honest I'm not sure of anything any more, some content seems to have more than 25fps. If I make the same file at the original 50fps and then the decimated 25fps (obviously having the effect of about half the file size), the decimated one seems jittery
|
Advertisement
|
|
|
Senior Member
|
29. January 2009 @ 12:22 |
Link to this message
|
This message has been edited since posting. Last time this message was edited on 29. January 2009 @ 12:26
|