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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 24th May 2013, 22:59   #1  |  Link
Lyris
Registered User
 
Join Date: Sep 2007
Location: Europe
Posts: 593
Help with getting silent 16fps film out of 24fps - SelectEvery?

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
Lyris is offline   Reply With Quote
Old 24th May 2013, 23:21   #2  |  Link
davidhorman
I'm the Doctor
 
Join Date: Jan 2004
Posts: 1,508
Quote:
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?
davidhorman is online now   Reply With Quote
Old 25th May 2013, 00:15   #3  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,038
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.
johnmeyer is offline   Reply With Quote
Old 25th May 2013, 11:07   #4  |  Link
osgZach
Registered User
 
Join Date: Feb 2009
Location: Waterloo, WI - USA
Posts: 650
Quote:
Originally Posted by johnmeyer View Post
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...
osgZach is offline   Reply With Quote
Old 25th May 2013, 13:01   #5  |  Link
Lyris
Registered User
 
Join Date: Sep 2007
Location: Europe
Posts: 593
@JohnMeyer: I can put it in any other format - what would work for you? Lagarith?

Quote:
Originally Posted by davidhorman View Post
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.
Lyris is offline   Reply With Quote
Old 25th May 2013, 15:45   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 5,909
@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.ph...hlight=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.


Code:
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
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 9th August 2013 at 08:03.
StainlessS is offline   Reply With Quote
Old 26th May 2013, 01:10   #7  |  Link
manono
Moderator
 
Join Date: Oct 2001
Location: Hawaii
Posts: 7,167
This seems to work for the sample. Can't speak for the rest of it:

TDecimate(Mode=0,Cycle=30,CycleR=10)
Quote:
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.

Last edited by manono; 26th May 2013 at 01:18.
manono is offline   Reply With Quote
Old 29th May 2013, 17:23   #8  |  Link
Lyris
Registered User
 
Join Date: Sep 2007
Location: Europe
Posts: 593
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
Lyris is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:49.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.