Hi all,
I need to use this clip (I had to take it from Youtube, obviously 720p version) for a PAL NLE job.
That's a NTSC videoclip where frames have this repeating pattern (A, B, C, C, D).
I assumed it was originally filmed at 24fps (quite uncommon for music clip).
So I did this:
DSS2("..\Florida.mp4")
SelectEvery(5,0,1,2,4)
AssumeFPS(24)
I opened the script in Avidemux...
1a) Change FPS to PAL
Avidemux (without blending) repeats the 24th frame twice so it matches 25fps.
As I work in interlaced timeline, would it be better something like this?:
(1a/1b)-(2a/2b)-(3a/3b)-(4a/4b)-(5a/5b)-
(6a/6b)-(7a/7b)-(8a/8b)-(9a/9b)-(10a/10b)-
(11a/11b)-(12a/12b)-(12b/13a)-(13b/14a)-(14b/15a)-
(15b/16a)-(16b/17a)-(17b/18a)-(18b/19a)-(19b/20a)-
(20b/21a)-(21b/22a)-(22b/23a)-(23b/24a)-(24b/24b)
How doin' it in Avisynth?
1b) Any pattern else?
1c) Is the speedup caused by "AssumeFPS(24)" from the original 23.976 fps should be considered even for the audio track?
2) I did a little job of crop/resize/denoise (proportions weren't correct).
I think this step is all ok.
3) Any other filter in order to improve quality? (originally very compressed)
Thank you in advance!
+ Reply to Thread
Results 1 to 30 of 37
-
Last edited by elmuz; 30th Aug 2010 at 04:24.
-
Well, reinterlacing it is one way, I suppose. What's wrong with keeping it progressive with a simple AssumeFPS(25) after you remove the dupe frames? And better for dupe removal, much better than SelectEvery, would be TDecimate() from the TIVTC filter, in case the pattern breaks at some point, as it often does with music videos. Of course, if you speed it up to 25fps, you'll also have to speed up the audio to match. Me, I always prefer to keep things progressive, if possible. Another way, if you want to keep it the same length and not have to stretch the audio, is to use the BlendFPS filter which can blend a couple of frames to go from 24 to 25fps. It works out much better than using ConvertFPS. BlendFPS is part of the Motion.dll:
http://avisynth.org/warpenterprises/
But, if you really want to reinterlace it, here's how (I think):
AssumeTFF()
Yadif(Mode=1)#or your favorite bobber
ChangeFPS(50)
SeparateFields()
SelectEvery(4,0,3)
Weave() -
'AssumeFPS(25)' will speed it up, right? Being a music videoclip I think i'ts not the best way pitching the audio...
And better for dupe removal, much better than SelectEvery, would be TDecimate() from the TIVTC filter, in case the pattern breaks at some point, as it often does with music videos.
Me, I always prefer to keep things progressive, if possible.
AssumeTFF()
Yadif(Mode=1)#or your favorite bobber
ChangeFPS(50)
SeparateFields()
SelectEvery(4,0,3)
Weave()Last edited by elmuz; 30th Aug 2010 at 07:34.
-
-
Here they are...
Just after this... nothing else added yet.
DSS2("..\Florida.mp4")
SelectEvery(5,0,1,2,4)
AssumeFPS(24)
As you can see there are a lot of macroblocks coming from compression... Even if comes from an Youtube 720p source (more artifacts than other youtube video)
Another thing... do you think the chain below is correct?
ManageFPS/interlacing -> DeNoise -> Resize
Not sure what should come first between denoise and resize -
ManageFPS/interlacing -> DeNoise -> Resize
I don't think there is much you can do .
IMO the problem isn't noise; denoising will just make it more blurry - and it's blurry enough to begin with
There is some macroblocking, and you could try a deblocking filter (with low strength settings) , but that will make it more blurry as well
The problem is inadequate compression , so edges look ratty, ill defined - there is not much you can do to fix that except find a better source . If it were anime, you can fix the lines and edges to an extent, but you can't use those techniques with live action content.
The only thing you have going for you is that you are resizing for a SD project - so it won't look that bad -
Dump the AssumeFPS as it changes the length of the video. Do any filtering while it's progressive:
DSS2("..\Florida.mp4")
TDecimate()
###Filtering, resizing, etc. all done here###
AssumeTFF()
Yadif(Mode=1)#or your favorite bobber
ChangeFPS(50)
SeparateFields()
SelectEvery(4,0,3)
Weave() -
What, it's not needed? Just separating the fields is enough? Oh yeah, you're right. I was originally thinking he'd be doing the filtering (including the resizing) while bobbed. And that's the way I originally wrote the script. Then I decided since the source is progressive he might as well downsize before interlacing it, edited my post, but forgot to remove the bob. I don't guess having it hurts anything, but you're right and thanks for the correction. This is better?
DSS2("..\Florida.mp4")
TDecimate()
###Filtering, resizing, etc. all done here###
SeparateFields()
ChangeFPS(50)
Weave()
Or have I missed something else? -
ChangeFPS "changes the frame rate by deleting or duplicating frames" , correct ?
I downloaded the 720p version from YT , and tried the script out , with DSS2 and FFMS2 , and there seems to be some jerky motion in some scenes. At first I thought it might be the source filter, but both had the exact same issues. (e.g. near the beginning when the lamborghini doors are opening, it seems like a field order issue or frames out of order)
Is it possible that ChangeFPS is duplicating the wrong field (maybe a backward field) ?
From what I can tell , the original YT version had every 4th,5th frame duplicated (maybe someone botched a telecined source). Right after TDecimate() only , the FPS is 23.976, and perfect playback, progressive frames. It finds the dupes no problems
The framerate from YT, and returned from DSS2 or FFMS2 isn't exactly 30000/1001 , it's some weird fraction 29.917, so I used assumefps(30000/1001) right after the source filter, but it didn't matter if you left it at 29.917, still jerky playback after reinterlacing with that script above
So what is going on here?
EDIT: I repeated experiment with DGAVCIndex (which should be fine for most progressive sources) , to help eliminate other source filter issues, and same resultLast edited by poisondeathray; 30th Aug 2010 at 10:16.
-
Is it possibile there have been some break in the pattern ABCDDE so that the medium gives you 29.917?
Anyway this reinterlaced version isn't so bad... -
Is it possibile there have been some break in the pattern ABCDDE so that the medium gives you 29.917?
are you not seeing the same thing? or is this a problem with my system/setup ?
right after tdecimate() , it's progressive, and no problems, no dupes, on jerks; so the issue is introduced after that . Tdecimate is adaptive, so even if there was a pattern break it recovers -
Indeed...
Maybe I'm wrong... If it is adaptive it can be it removed not exactly 1/5 of the frames... maybe because of some brake pattern.
I agree after tdecimate() it is 24p...
Maybe any not-constant framerate? -
It's subtle because it's resized smaller, but it appears in your sample too, when you bob deinterlace (it will show up when you play in DVD player) . When you single rate deinterlace, 1/2 the fields are thrown out . e.g. play with vlc, activate deinterlace, yadif 2x
I think you might have did field resize incorrectly (instead of resizing when it's progressive)Last edited by poisondeathray; 30th Aug 2010 at 10:51.
-
I tried lots of script in these hours... I think that one came from this
DSS2("..\Florida.mp4")
TDecimate()
Crop(0,38,0,-36)
Lanczos4Resize(720,576)
SeparateFields()
ChangeFPS(50)
Weave()
Which player behaves like the snapshot you posted? -
Do you not see the problem? I can reproduce it on your mpg sample (and the script for the YT sample) , or playback with vlc yadif x2 mode, or examine it in avisynth
I'm guessing ChangeFPS is sampling the wrong field. If ChangeFPS were used after TDecimate() (ie. used on frames instead of fields), the problem doesn't occur , but instead you get lots of dupes, but at least field order seems fine after re-interlacing -
Maybe I have the answer... By doin'
SeparateFields()
ChangeFPS(50)
Weave()
...some top filed may become bottom field reinterlacing.. may be? -
I don't set "deinterlace" in vlc... I noticed it in VirtualDub by adding bob deinterlace as you suggest...
-
Most software player will only single rate deinterlace at default , but a real PAL DVD player will playback interlaced PAL DVD's at 50 , not 25, so you need to bob deinterlace to test it . In vlc , video=>deinterlace on , video=>deinterlace mode => yadif 2x .
Just to be clear, there are 2 issues here. 1 is the one I identified earlier with the field order issue (which I guessed assumefps is duplicating wrong field when used on fields instead of frames). The other one is separate issue, from your sample - that has a resize problem (you must have resized when it was in in fields, not when it was progressive; or used a different script - or maybe you did some adjustments in your editor ?)
I'm not expert at this stuff, so wait for manono or alex_ander to reply back , they are more experienced. I just know something isn't working correctlyLast edited by poisondeathray; 30th Aug 2010 at 11:26.
-
ChangeFPS(50) must be before SeparateFields(). It got shifted somehow.
DSS2("..\Florida.mp4")
TDecimate()
Crop(0,38,0,-36)
Lanczos4Resize(720,576)
###Filtering, resizing, etc. all done here###
ChangeFPS(50)
AssumeTFF()
SeparateFields()
SelectEvery(4,0,3)
Weave()#TFF -
-
Just tried it on a 25fps video:
SeparateFields()
#ChangeFPS(50)
info()
info() shows 'fieldbased', 50000fps, the same fps and frame count after inclusion of ChangeFPS(50) -
Yeah, but the source video here is 23.976fps after decimation. Maybe I'm just dense, but am I missing something very obvious here?
-
I'm trying now this one:
LoadPlugin("..\plugins\TIVTC.dll")
LoadPlugin("..\plugins\Motion_12Dec05.dll")
DSS2("..\Florida.mp4")
TDecimate()
Crop(0,38,0,-36)
Lanczos4Resize(720,576)
BlendFPS(25,Aperture=0.1)
AssumeTFF()
SeparateFields()
SelectEvery(4,0,3)
Weave()
I'll post a snapshot... touch wood!
You can donwload it from here...
Well, don't if I did right way. But if I playback it with vlc yadif-x2 mode - as suggested by poisondeathray - it appears wrong! But if I play it field-by-field (appending SeparateFields() at the end) it goes good!Last edited by elmuz; 31st Aug 2010 at 03:14.
-
@ manono
So the idea was to weave() without field selection? But then, what will make ChangeFPS(50) add a copy of the proper (top or bottom) field each time? If 48 -> 50, then in case of TFF the field added as 25th will be bottom (copy of the last field in frame 12) but field 50 will also appear bottom (copy of the last field in original frame 24), which is wrong (it will be weaved with bottom field 49). In usual script version with field selection each other additional (top) field would be taken from next frame. Am I missing something? I'm assuming ChangeFPS is not clever enough and only makes inserts by copying previous frames/fields.
@elmuz
You don't need the last 4 lines with BlendFPS(25), they are for conversion from double framerate to interlaced.Last edited by Alex_ander; 31st Aug 2010 at 03:17.
-
I don't know. Maybe you're right. I tested it by putting on my script and afterwards separating the fields and it seemed to play smoothly. Like poisondeathray, interlaced video isn't really my thing and I'll happily bow to your expertise. That's one reason early on in the thread I was pushing elmuz to keep it progressive.
And you're right in the advice to elmuz - with BlendFPS you don't need any of that stuff afterwards. Maybe he won't like it, I don' t know, but the few times I tried it I liked the results better than the alternatives (duplicating frames, interlacing it, or (horrors!) using something like ConvertFPS). I found the results smooth playing and the fewer blends barely noticeable. -
Ok, so... resuming everything:
- We had that stupid Flo Rida videclip coming straight from Youtube.
- We start processing the video this way
DSS2("..\Florida.mp4")
TDecimate()
Crop(0,38,0,-36)
Lanczos4Resize(720,576)
At this point we have two options (at least I wanted those):
1) BlendFPS. Video is supposed to come fluid, no jerks, with frame blended.
By doing BlendFPS(25,Aperture=0.1) we get this video. Yes it's blended, but not so fluid, isn't it?
2) Reinterlace it. Video is supposed to come less fluid but with each field "perfect". What I wanted is not to duplicate frames but fields (1 field every 12, intead of 1 frame every 24, theorically supposed to come a bit more fluid).
I tried with this
SeparateFields()
ChangeFPS(50)
Weave()
...and we get this output. I think is better than the first. What's your opinion?
3) Did I miss anything? Any option left/forgotten?
Similar Threads
-
How can I change the color depth of an AVI file? 32-bit to 24-bit
By evansste in forum Newbie / General discussionsReplies: 0Last Post: 10th Jun 2011, 01:17 -
how to change fps in mp4 without reencode (maybe ps3 cannot handle 24 fps)?
By redout66 in forum Newbie / General discussionsReplies: 1Last Post: 14th Sep 2010, 04:53 -
Restoring new life to old film classics
By carlmart in forum RestorationReplies: 42Last Post: 9th Aug 2009, 18:40 -
FPS NTSC & PAL Film/Digital
By flamingo in forum Newbie / General discussionsReplies: 5Last Post: 13th Nov 2007, 13:21 -
FPS..NTSC & PAL Standard Cinema Film/Digital
By flamingo in forum TestReplies: 0Last Post: 9th Nov 2007, 08:30