Log in

View Full Version : Help with getting silent 16fps film out of 24fps - SelectEvery?


Lyris
24th May 2013, 22:59
Hi forum,

This source is 16fps but encoded as 24p for compliance with video standards. So I can run dirt and scratch removal on this source (and others like it), I need to extract the original 16fps (by deleting the duplicated frames), doing my work, then wrapping it back into 24fps again at the end.

Frustratingly, I just can't find any filter that does this correctly and I don't know what I'm doing wrong.

I've tried tdecimate, which leaves the occasional repeated frame.

Fdecimate correctly identifies the duped frames - but the output, for some reason, stutters back and forth, with the frames in the wrong order.

DupMC (which runs in two passes) looked more hopeful, with no duplicated frames left. However, after running it and then re-wrapping to 24fps, I can see that the timing is still not correct - something is being lost somewhere and I'm baffled as to what is wrong.

The best thing, to avoid all-black fades being overly removed, would be to identify the pulldown sequence and to use SelectEvery(). However, no matter what I tried, I was still left with some duped frames in the output, I assume because the pulldown pattern is somehow variable. I tried to unpick it, but didn't succeed. Can anyone give me pointers or examples of how to do this? I've always been a little bit confused by SelectEvery and how it works...

For once, I can actually provide a sample of my source (UTvideo format):
http://www.mediafire.com/?2rdir77tmwkbrrf

wonkey_monkey
24th May 2013, 23:21
However, after running it and then re-wrapping to 24fps, I can see that the timing is still not correct - something is being lost somewhere and I'm baffled as to what is wrong.

How are you "re-wrapping" it to 24fps (23.976fps), and in what way is it going wrong?

johnmeyer
25th May 2013, 00:15
I wish I could help (I deal with files like this all the time) but I can't do anything with the video file you uploaded. It uses some sort of codec I haven't seen before.

Usually what I do is use a bob or separatefields statement and then walk through the file one field at a time until I am sure I have figured out the cadence. Then I use TFM with the most basic settings, and then follow that with TDecimate, with the Cycle and CycleR parameters set to give me to correct decimation. Sometimes I have to do further tweaking, but usually this gives me a clean result.

osgZach
25th May 2013, 11:07
I wish I could help (I deal with files like this all the time) but I can't do anything with the video file you uploaded. It uses some sort of codec I haven't seen before.

Usually what I do is use a bob or separatefields statement and then walk through the file one field at a time until I am sure I have figured out the cadence. Then I use TFM with the most basic settings, and then follow that with TDecimate, with the Cycle and CycleR parameters set to give me to correct decimation. Sometimes I have to do further tweaking, but usually this gives me a clean result.

Would probably be as simple as installing a UTVideo codec...

Lyris
25th May 2013, 13:01
@JohnMeyer: I can put it in any other format - what would work for you? Lagarith?

How are you "re-wrapping" it to 24fps (23.976fps), and in what way is it going wrong?
I'm using changeFPS("NTSC_FILM"). That should convert the frame rate to 23.976 by repeating frames, as I understand it.

It's going wrong because the running time of the decimated, processed, then re-24p'd file doesn't match that of the original 24p version as supplied. It's off by about a minute, and the audio (which in this case is the accompanying music) goes out of sync.

Basically, I just need a way to undo and redo the 24p<->16p pulldown with repeatability.

StainlessS
25th May 2013, 15:45
@John Meyer, UTVideo codec is very good YV12/YUY2/RGB/RGBA codec, good compression, fast decompress. I hardly ever use
HuffYUV/Lagarith any more.
http://forum.doom9.org/showthread.php?t=143624&highlight=utvideo
(Does not play in VLC [yet], OK in MPC-HC and GOM. Fairly recently codec added to ffmpeg)

Lyris, so far as I remember, FDecimate just chucks the first frame in a cycle who's diff from previous is below some threshold.
(EDIT: also so far as I remember, FDecimate will insert dups if output fps higher than input fps).

Dont know about TDecimate. Suggest trying Multidecimate, two pass but has all info for complete clip when making decisions.

Here is MDEC2(), a mod of FDecimate (faster/better metrics, I think) that works as Multidecimate, still needs Multidecimate.exe
(multidecimate source not available [plug nor exe])


EDIT: Link Removed.



MDEC2(clip c,float rate(Default=24.0),bool show(default=false),
bool create (default=false),string dir(default="C:\"))



EDIT: 1st pass must be YV12, for FDecimate metrics, 2nd pass can be YUY2.
EDIT: Includes original FDecimate source and GPL.

EDIT: See This MDec2 thread (Now Planar, YUY2, RGB)
http://forum.doom9.org/showthread.php?p=1639822

manono
26th May 2013, 01:10
This seems to work for the sample. Can't speak for the rest of it:

TDecimate(Mode=0,Cycle=30,CycleR=10)
I've tried tdecimate, which leaves the occasional repeated frame.
Just a plain 'TDecimate'? That returns 19.181fps so it stands to reason there will be duplicate frames if it's supposed to be 15.984fps.

Lyris
29th May 2013, 17:23
Will reply at greater length soon, thank you for the pointers!

But regarding UTVideo / Lagarith / HuffYUV: I use UTVideo almost exclusively now for intermediate masters. I stopped using Lagarith because of this:

http://forum.doom9.org/showthread.php?t=165725