Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Setframerate Question
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
pitbull
Posted: Nov 25 2014, 09:21 AM


Newbie


Group: Members
Posts: 5
Member No.: 38443
Joined: 25-November 14



Hello, lets say i want my video to be 30fps what should my
CODE
VirtualDub.video.SetFrameRate(#,#)

be like?
 
     Top
dloneranger
Posted: Nov 25 2014, 12:06 PM


Moderator


Group: Moderators
Posts: 2366
Member No.: 22158
Joined: 26-September 07



Depends on which kind of frame rate you want
The simple set frame rate version is this in a saved script
VirtualDub.video.SetFrameRate2(30,1,1);

The easiest way to see what you need is to set it all how you like in virtualdub and then 'save processing settings'
Read that file with a text editor and you'll find what you need

--------------------
MultiAdjust JoinWav WavNormalize FFMPeg Input Plugin v1827 UnSharpMask
Windows7/8 Codec Chooser
All FccHandlers Stuff inc. Installers for acm codecs AAC, AC3, LameMp3
 
    Top
pitbull
Posted: Nov 26 2014, 02:23 AM


Newbie


Group: Members
Posts: 5
Member No.: 38443
Joined: 25-November 14



wow! that worked! i did not know that there was SetFrameRate2 and how it worked...
The text documentation of virtualdub is insufficient and I hope that somebody will update that in the future. as a gesture of gratitude to the community, I will share part of my code for anybody's use...if there is indeed some educational value in this...

PYTHON CODE

CODE

import subprocess,os

#variables
src = r"this is your image sequence file dir and name"
dst = r"this is your video file dir and name"
vcf = r"the path and file to the temporary vcf file"

#check for existing files
if os.path.isfile(vcf):
   os.remove(vcf)
if os.path.isfile(dst):
   os.remove(dst)

#make temporary vcf file and and run that file
with open(vcf,"w+") as f:
   f.write('VirtualDub.Open(U"%s");\nVirtualDub.video.SetFrameRate2(30,1,1);\nVirtualDub.SaveAVI(U"%s");' % (src,dst))
subprocess.call("%s /s %s /x" % (vdub,vcf), shell = False)

#clean up vcf file
if os.path.isfile(vcf):
   os.remove(vcf)
 
     Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
2 replies since Nov 25 2014, 09:21 AM Track this topic | Email this topic | Print this topic

<< Back to Newbie Questions