View Full Version : Amnons AVI2MPEG ResCalc 1.0
Amnon82
4th April 2004, 16:29
Here is a little tool of mine to get the right resolution for a MPEG-file out of a AVI.
Download ResCalc (159 KB) (http://rj-elektronik.de/avideo/files/rescalc.exe)
I think this is usefull :D
tickey
4th April 2004, 16:36
Why not have it so you can load the file and it reads the resolution automatically?
Other than that it is very handy, thanks.
Amnon82
4th April 2004, 16:50
For this I must frist find out where the AVI container saves this information... :rolleyes:
Dark-Cracker
4th April 2004, 17:11
hi,
i think this can help u to understand riff avi struct :)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/htm/avirifffilereference.asp
in particular the AVIMAINHEADER Structure.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/htm/avimainheaderstructure.asp
Bye.
Amnon82
4th April 2004, 18:43
typedef struct _avimainheader {
FOURCC fcc;
DWORD cb;
DWORD dwMicroSecPerFrame;
DWORD dwMaxBytesPerSec;
DWORD dwPaddingGranularity;
DWORD dwFlags;
DWORD dwTotalFrames;
DWORD dwInitialFrames;
DWORD dwStreams;
DWORD dwSuggestedBufferSize;
DWORD dwWidth;
DWORD dwHeight;
DWORD dwReserved[4];
} AVIMAINHEADER;
great, but how read out this information?
BTW You can use GSPOT (http://www.headbands.com/gspot/) to get the size, or MovieStacker (http://www.kvcd.net)
Marcel
12th April 2004, 20:56
As you code with Delphi, my little unit (http://www.turbogenial.de/data/VidInfo.pas) should help you with reading the resolution of AVI files.
Amnon82
12th April 2004, 22:31
thanx for the sourcecode marcel
Amnon82
18th April 2004, 21:05
marcel, can U give me a doc for using Ur unit?
Marcel
18th April 2004, 21:58
Originally posted by Amnon82
marcel, can U give me a doc for using Ur unit?
I did, and for everybody else who is looking for that: Just look into the 20 lines-demonstration-project FPSReader (http://www.turbogenial.de/data/FPSreader.zip).
It's just as easy as
uses vidinfo;
var vi:TVideoInfo;
filename: String;
begin
filename := 'myfile.avi';
vi := getVideoInfo(filename);
end;
The record structure of TVideoInfo is well documented inside the unit.
Amnon82
18th April 2004, 22:56
added MPV, M1V and M2V support. Still have troubles with D2V. Can't get it to work
Download edited VidInfo.pas (http://rj-elektronik.de/avideo/delphi/VidInfo.pas)
Marcel
18th April 2004, 23:08
Originally posted by Amnon82
added MPV, M1V and M2V support. Still have troubles with D2V. Can't get it to work
As i tried to tell you via PM (your mailbox is full) and via mail, I'd like to see the first 10 lines of your .d2v file.
Originally posted by Amnon82
Download edited VidInfo.pas (http://rj-elektronik.de/avideo/delphi/VidInfo.pas) [/B]
Hm, is it possible that the file on your website is missing some part of your modifications?
And, beware, .m1v and .m2v are meant to be used for video only elementary streams. Does it really work with them?
Amnon82
19th April 2004, 07:49
DVD2AVIProjectFile
1
15 E:\NTSC_dvd.vob
Stream_Type=1,0,0
iDCT_Algorithm=2 (1:MMX 2:SSEMMX 3:FPU 4:REF 5:SSE2MMX)
YUVRGB_Scale=1 (0:TVScale 1:PCScale)
Luminance_Filter=0,0 (Gamma, Offset)
Picture_Size=0,0,0,0,0,0 (ClipLeft, ClipRight, ClipTop, ClipBottom)
Field_Operation=0 (0:None 1:ForcedFILM 2:SwapOrder)
Frame_Rate=29970
Location=0,0,0,3A80
DVD2AVIProjectFile
6
24 M:\VIDEO_TS\VTS_02_1.VOB
24 M:\VIDEO_TS\VTS_02_2.VOB
24 M:\VIDEO_TS\VTS_02_3.VOB
24 M:\VIDEO_TS\VTS_02_4.VOB
24 M:\VIDEO_TS\VTS_02_5.VOB
24 M:\VIDEO_TS\VTS_02_6.VOB
Stream_Type=1,0,0
iDCT_Algorithm=2 (1:MMX 2:SSEMMX 3:FPU 4:REF 5:SSE2MMX)
YUVRGB_Scale=1 (0:TVScale 1:PCScale)
Luminance_Filter=0,0 (Gamma, Offset)
Picture_Size=0,0,0,0,0,0 (ClipLeft, ClipRight, ClipTop, ClipBottom)
Field_Operation=0 (0:None 1:ForcedFILM 2:SwapOrder)
Frame_Rate=25000
Location=0,0,5,8C4A
here it is.
and this is form the DVD2AVI faq:
DVD2AVIProjectFile
2
45 D:\PATH\VTS_01_1.VOB
45 D:\PATH\VTS_01_2.VOB
Stream_Type=1,0,0
iDCT_Algorithm=2
YUVRGB_Scale=1
Luminance=128,0
Picture_Size=0,0,0,0,0,0
Field_Operation=0
Frame_Rate=25000
Location=0,4A2DB,0,4C401
P.S.
I use DVD2AVIDG.
Thanx for telling me that. (PM and mailbox I mean)
Amnon82
19th April 2004, 08:29
Marcel. Thx. I got it!
I need fileaccess for reading out the file!
I did the D2V form a mounted ISO. Sorry. It works.
# Created with NTPC 0.1 - visit: www.dvdr-page.tk
# FPS: 25,000 - MPEG V.0 - Res: 720*576 - AR: 3 - Frames: 0 - PiDAR: 1,42222 - Streams: 2
LoadPlugin("D:\NTPC\DVD2AVI\MPEG2DecNTPC.dll")
LoadPlugin("D:\NTPC\DVD2AVI\repal.dll")
mpeg2source("D:\DVDProjects\Shade\shadesa.d2v")
complementparity()
bob()
repal()
assumefps (25, true)
LanczosResize(720, 576)
P.S. Is there a way to get the frames also from d2v?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.