Hello fellow programmers,
I recently downloaded VB 2005 Express edition from Micro$oft (they are offering free downloads for a period of 1 year beginning with the release date of 11/05), and I'm attempting to write a simple GUI front-end for AVISynth, my favorite free tool for editing videos.
VB 2005 Express comes with the .NET framework 2.0 and also allows COM components. I'm using the COM component for Windows MediaPlayer, but I don't know how to tell the # of frames, or the framerate of a clip. If I can't get # of frames, I can still figure it out based on the Frame Rate. I'd like to be able to do this for AVI's as well as MPG1/2 files.
This is my first attempt at writing any video applications, and I'm relatively new to Windows Programming (about 2 years in VB, 5 writing plugins for CAD applications), although I've programmed for other platforms professionally for 12 years now.
Thanks,
CogoSWSDS
+ Reply to Thread
Results 1 to 5 of 5
-
-
Well in C#:
Code:// Get framerate MediaDet md = new MediaDetClass(); md.Filename = "PATH_TO_YOUR_FILE"; md.CurrentStream =0; // choose the video stream double FrameRate=md.FrameRate;
Where MediaDetClass comes from the "Dexter 1.0 Type Library" COM object which you should see when you add a COM reference.
VB should be easy to work out from the above.SVCD2DVD v2.5, AVI/MPEG/HDTV/AviSynth/h264->DVD, PAL->NTSC conversion.
VOB2MPG PRO, Extract mpegs from your DVDs - with you in control! -
Thanks. Here's the code as it worked in VB:
At the top of the VB file, I put:
Code:Imports DexterLib
Code:Dim md As MediaDet Dim dFrameRate as double md = New MediaDetClass md.Filename = AxMediaPlayer1.FileName dFrameRate = md.FrameRate
Now if I can just get my datagrid of clip information to associate with the ADODB recordset, I'll be 90% of the way there. Anyone know how to use a datagrid without tying it to a database? I want to use the datagrid to keep track of the clips and attributes, and allow the users to modify them.
CogoSWSDS
Similar Threads
-
Play an MTS file frame by frame, displaying timecode or frame number
By SeánB in forum Software PlayingReplies: 5Last Post: 5th Oct 2010, 16:26 -
Frame rate conversions: How to blend select frames in AVISynth?
By SDeC in forum Video ConversionReplies: 9Last Post: 23rd Jun 2010, 08:16 -
Advancing/Rewinding Clip Frame by Frame on Windows Movie Maker (Vista)
By ione in forum EditingReplies: 20Last Post: 9th Sep 2008, 22:53 -
How do I edit the frame rate of a selection of frames in VirtualDubMod?
By manilow in forum RestorationReplies: 4Last Post: 21st Dec 2007, 22:12 -
Frame rate conversion by changing frame count
By asmaa in forum Video ConversionReplies: 2Last Post: 1st Aug 2007, 10:15