View Full Version : Variable frame rate
x265
29th January 2013, 10:55
I have a DVD which i want to encode with a VFR. What should i do with the v2 timecodes generated my ffmpegsource? Do i need to make any change in the aviscript? :confused:
http://www.mediafire.com/view/?tkm5a5m755lcqy1 << timecode.txt
Atak_Snajpera
29th January 2013, 12:18
what do you achieve by using vfr?
sneaker_ger
29th January 2013, 12:27
I have a DVD which i want to encode with a VFR. What should i do with the v2 timecodes generated my ffmpegsource? Do i need to make any change in the aviscript? :confused:
http://www.mediafire.com/view/?tkm5a5m755lcqy1 << timecode.txt
That timecode file is purely CFR, because that's how things are stored on a DVD. As Atak_Snajpera said you need to know why you want to use VFR and yes, you would need to change your script.
x265
29th January 2013, 12:40
for certain reasons a lot of anime is created with some sections having motion in 23.976 frames each second, while other sections have motion in 29.97 frames each second. You can store it all in one framerate of course, but if you do you will either have to duplicate or remove frames, and that will create jerkiness in the motion. Which is undesirable since it looks bad.
sneaker_ger
29th January 2013, 13:21
See TIVTC or maybe AnimeIVTC for automatic or manual CFR to VFR. Some people use YATTA, but I don't know if there's any easy guide out there.
x265
29th January 2013, 14:12
################################################################
# Set DAR in encoder to 4 : 3. The following line is for automatic signalling
global MeGUI_darx = 4
global MeGUI_dary = 3
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("C:\Users\Abhijith Nair\Desktop\Monster Project\VideoFile.d2v", info=3)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
TFM(order=1, slow=2).TDecimate(mode=1)
crop(8, 2, -6, 0)
Spline36Resize(704,480) # Spline36 (Neutral)
NLMeansCL(A=7, h=0.25, sse=false, S=3)
fastlinedarkenmod2(strength=30, thinning=0)
Sharpaamcmod(aatype="eedi2", dark=0, thin=0, sharp=0, smooth=-1)
Lsfmod(strength=35)
#################################################
What changes should i make here?
sneaker_ger
29th January 2013, 14:52
See the TIVTC/TDecimate docs.
/edit:
removed 1 pass TIVTC example, because it is useless without the explanations.
x265
29th January 2013, 15:13
What's the difference between a one pass and a two pass?
sneaker_ger
29th January 2013, 15:18
What's the difference between a one pass and a two pass?
I'm no specialist on TIVTC, maybe someone else can chime in.
x265
29th January 2013, 15:36
maybe someone else can chime in.
I hope so.
bxyhxyh
29th January 2013, 15:38
Maybe "megui_folder\tools\avisynth_plugin\TDecimate - READ ME.txt" can help you.
x265
29th January 2013, 15:50
what happens when i set a two pass?
sneaker_ger
29th January 2013, 15:51
Oh, that readme is really good. I removed my example because you really need to understand what is explained in that readme before actually using it. One and two pass examples can be found here (http://avisynth.org.ru/docs/english/externalfilters/tivtc.htm).
what happens when i set a two pass?
See the examples. Basically the two pass mode will not create black frames for padding, so it can be directly used for the final encode (without blackness at the end, though you could of course ignore that or cut it afterwards) or if you want to do some seeking, but you have to run the first past .. first. (Like running once with "avs2pipemod -benchmark script.avs" or similar.)
x265
29th January 2013, 16:51
Ok i will try and let you know.
sneaker_ger
29th January 2013, 16:53
http://forum.doom9.org/showthread.php?p=1611905#post1611905
lansing
29th January 2013, 16:54
if you know exactly where the part of 23.976fps and 29.97fps were at, you can manual split them apart, encoded them separately with their respected frame rate, and then join them back together, i supposed there's a mp4box gui that can generate the timecode automatically during appending clips with different frame rate.
sneaker_ger
29th January 2013, 16:59
I don't know if there's a GUI but writing a timecode_v1 file by hand for such a case is trivial.
x265
29th January 2013, 17:30
if you know exactly where the part of 23.976fps and 29.97fps were at, you can manual split them apart, encoded them separately with their respected frame rate, and then join them back together, i supposed there's a mp4box gui that can generate the timecode automatically during appending clips with different frame rate.
The video of the OP is interlaced but the signs are not.
http://img716.imageshack.us/img716/7052/newfile002399.png << OP
http://img825.imageshack.us/img825/5236/86588770.png << ED
x265
30th January 2013, 10:25
http://www.mediafire.com/view/?77kbj8ongd0pfxj << VFR timecode.
x265
1st February 2013, 11:13
Is there any guide for learning YATTA?
Overdrive80
5th February 2013, 06:25
Example for encoding on VFR using AnimeIVTC:
Create project d2v using Honor Pulldown Flags
First pass
DGDecode_mpeg2source("C:\Users\Isra\Desktop\vob BLEACH 01\VIDEO_TS\VTS_01_1.d2v",info=3)
ColorMatrix(hints=true, threads=0,interlaced=true)
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
#VFR - 1pass
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
animeivtc(mode=4, aa=0, omode=2, pass=1)
Load your script in virtualdub, go to File-->Run video analysis pass. You must wait until the end of process.
This process generate txt files, not remove.
Second pass:
DGDecode_mpeg2source("C:\Users\Isra\Desktop\vob BLEACH 01\VIDEO_TS\VTS_01_1.d2v",info=3)
ColorMatrix(hints=true, threads=0,interlaced=true)
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
#VFR - 2 pass
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-
AnimeIVTC(mode=4,killcomb=1,aa=0,omode=2,e1=38828,i1=40609,e2=41090,pass=2)
Load this script in vdub and automatically generate timecodes.txt, that you must use on matroska file.
e parameter determines last frame film section.
i parameter determines last frame truly interlaced section.
p parameter determines last frame progressive section.
For example, if you video is composed:
frame 0-2600 --> truly interlaced (i1)
frame 2601-32000 --> film (e1)
frame 32001-35000 (end) --> truly interlaced (i2)
You scripts would be:
AnimeIVTC(mode=4,killcomb=1,aa=0,omode=2,i1=2600,e1=32000,i2=35000,pass=2)
You can determine frames using simple script as:
DGDecode_mpeg2source("C:\Users\Isra\Desktop\vob BLEACH 01\VIDEO_TS\VTS_01_1.d2v",info=3)
ColorMatrix(hints=true, threads=0,interlaced=true)
Read documentation of animeivtc for more details.
x265
5th February 2013, 10:46
http://img850.imageshack.us/img850/9931/capturefkv.png
I get this error when i called the animeivtc 2.12 function.
Overdrive80
5th February 2013, 15:31
You must use 2.00 version, version 2.12 is mod but has importants issues.
x265
5th February 2013, 15:35
Is there a tool which can convert v2 timecodes to v1?
Overdrive80
5th February 2013, 15:41
Is there a tool which can convert v2 timecodes to v1?
http://web.missouri.edu/~kes25c/
avi_tc_package http://web.missouri.edu/~kes25c/avi_tc_package.zip
Overdrive80
6th February 2013, 01:22
Here you can see other example of vfr but timecodes is created for sections:
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\dgindex\DGDecode.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\ColorMatrix.dll")
DGDecode_mpeg2source("C:\Users\Isra\Desktop\Bleach\VID 2\VideoFile1.d2v", info=3)
ColorMatrix(hints=true, threads=0,interlaced=true)
part1=trim(0,38811).tfm().tdecimate()
part2_in=trim(38812,40609)
part3=trim(40610,41089).tfm().tdecimate()
part2=part2_in.QTGMC( Preset="Slow", EdiMode="EEDI3", fpsdivisor=2).assumefps(part1.framerate)
part1++part2++part3
#Generate timecodes file for sections
WriteFile(last, "timecodesv1.txt" ,""" "# assume 29.970030" """, append=false)
WriteFile(last, "timecodesv1.txt" ,""" "0," """, "part1.framecount", """ "," """, "part1.framerate")
WriteFile(last, "timecodesv1.txt" , "part1.framecount+1", """ "," """ , "part1.framecount+part2.framecount-1",\
""" "," """, "part2_in.framerate")
WriteFile(last, "timecodesv1.txt" , "part1.framecount+part2.framecount", """ "," """ ,\
"part1.framecount+part2.framecount+part3.framecount-1", """ "," """, "part3.framerate")
Overdrive80
6th February 2013, 17:43
Are you referring to TFM(mode=1,output="tfm.txt")?
bxyhxyh
2nd July 2013, 09:23
Is there any way to encode partially field blended source in VFR.
Can AnimeIVTC help?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.