如何用程序软解压vob,mpg文件? (200分)

  • 主题发起人 主题发起人 3cs
  • 开始时间 开始时间
3

3cs

Unregistered / Unconfirmed
GUEST, unregistred user!
我现在正在作一个软解压的VOD点播系统,但碰到了一个无法解决的问题:无法解压VOB和部
分的MPG文件,无知那位老大能帮在下这忙,一定重分感谢!
代码:
 
那你就要研究mpg的文件格式了
 
那在哪儿找这方面的资料呢?超解SDK行吗?它在哪儿呢?
 
看我的问题就知道了。
 
兄弟,到下面网址去,什么文件格式都有!
http://www.wotsit.org/search.asp?s=animated
 
to:jingtao
兄弟,你的问题在哪儿呢?
 
http://www.delphibbs.com/delphibbs/dispq.asp?lid=1605817
 
to:jingtao
你的文章我看过了,但VOB格式的文件,它用的格式是DVD的MPGE2,不是VCD的MPEG1,你
的DLL是无法播放的。另外还有一些MPG后缀的文件它的格式是在MPEG2和MPEG1之间的,也就
俗称的‘SVCD’。你能否在MEMFILE的基础上再改一个即能播放MPEG2又能播放MPEG1的解码器
来吗?
 
我那个是Mpeg1解码库而已啊
SVCD应该可以播放吧.因为我的程序是动态转换为Mpeg1数据的.
Mpeg2的不是那么好做的必须用第三方的解码器.
超级解霸的DVB还是基于MPEG1格式的呢.

理论上,Directx支持所有格式.不过,是"理论"上的.
我没有DVD,所以无法帮忙.对不起.
//------------------------------------------------------------------------------
// File: Types.h
//
// Desc: DirectShow sample code - an MFC based C++ filter mapper application.
//
// Copyright (c) 2000-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------

//
// Merit for pins
//
typedef struct _meritinfo
{
DWORD dwMerit;
TCHAR szName[64];

} MERITINFO;

// Minimum merit must be specified, so there is no <Don't Care> entry
const MERITINFO merittypes[] = {

MERIT_HW_COMPRESSOR, TEXT("Hardware compressor"),
MERIT_SW_COMPRESSOR, TEXT("Software compressor"),
MERIT_DO_NOT_USE, TEXT("Do not use"),
MERIT_UNLIKELY, TEXT("Unlikely"),
MERIT_NORMAL, TEXT("Normal"),
MERIT_PREFERRED, TEXT("Preferred"),

};

#define NUM_MERIT_TYPES (sizeof(merittypes) / sizeof(merittypes[0]))

//
// Media types
//
typedef struct _guidinfo
{
const GUID *pGUID;
TCHAR szName[64];

} GUIDINFO;

const GUIDINFO pintypes[] = {

0 ,TEXT("<Don't care>"),
&amp;PIN_CATEGORY_ANALOGVIDEOIN ,TEXT("Analog video in"),
&amp;PIN_CATEGORY_CAPTURE ,TEXT("Capture"),
&amp;PIN_CATEGORY_CC ,TEXT("Closed Captioning (Line21)"),
&amp;PIN_CATEGORY_EDS ,TEXT("EDS (Line 21)"),
&amp;PIN_CATEGORY_NABTS ,TEXT("NABTS"),
&amp;PIN_CATEGORY_PREVIEW ,TEXT("Preview"),
&amp;PIN_CATEGORY_STILL ,TEXT("Still"),
&amp;PIN_CATEGORY_TELETEXT ,TEXT("Teletext (CC)"),
&amp;PIN_CATEGORY_TIMECODE ,TEXT("Timecode"),
&amp;PIN_CATEGORY_VBI ,TEXT("VBI"),
&amp;PIN_CATEGORY_VIDEOPORT ,TEXT("VideoPort (connect to Overlay Mixer)"),
&amp;PIN_CATEGORY_VIDEOPORT_VBI ,TEXT("VideoPort VBI"),

};

#define NUM_PIN_TYPES (sizeof(pintypes) / sizeof(pintypes[0]))

const GUIDINFO majortypes[] = {

0 ,TEXT("<Don't care>"), /* No selection */
&amp;MEDIATYPE_AnalogAudio ,TEXT("Analog audio"),
&amp;MEDIATYPE_AnalogVideo ,TEXT("Analog video"),
&amp;MEDIATYPE_Audio ,TEXT("Audio"),
&amp;MEDIATYPE_AUXLine21Data ,TEXT("Line 21 data (CC)"),
&amp;MEDIATYPE_File ,TEXT("File (CC)"),
&amp;MEDIATYPE_Interleaved ,TEXT("Interleaved (DV)"),
&amp;MEDIATYPE_LMRT ,TEXT("LMRT (Obsolete)"),
&amp;MEDIATYPE_Midi ,TEXT("MIDI"),
&amp;MEDIATYPE_MPEG2_PES ,TEXT("MPEG2 (DVD)"),
&amp;MEDIATYPE_ScriptCommand ,TEXT("ScriptCommand (CC)"),
&amp;MEDIATYPE_Stream ,TEXT("Byte stream (no time stamps)"),
&amp;MEDIATYPE_Text ,TEXT("Text"),
&amp;MEDIATYPE_Timecode ,TEXT("Timecode data"),
&amp;MEDIATYPE_URL_STREAM ,TEXT("URL_STREAM (Obsolete)"),
&amp;MEDIATYPE_Video ,TEXT("Video"),

};

#define NUM_MAJOR_TYPES (sizeof(majortypes) / sizeof(majortypes[0]))

//
// Media subtypes
//
const GUIDINFO audiosubtypes[] = {

&amp;MEDIASUBTYPE_PCM ,TEXT("PCM audio"),
&amp;MEDIASUBTYPE_MPEG1Packet ,TEXT("MPEG1 Audio Packet"),
&amp;MEDIASUBTYPE_MPEG1Payload ,TEXT("MPEG1 Audio Payload"),
0, 0
};

const GUIDINFO line21subtypes[] = {

&amp;MEDIASUBTYPE_Line21_BytePair ,TEXT("BytePairs"),
&amp;MEDIASUBTYPE_Line21_GOPPacket ,TEXT("DVD GOP Packet"),
&amp;MEDIASUBTYPE_Line21_VBIRawData ,TEXT("VBI Raw Data"),
0, 0
};

const GUIDINFO mpeg2subtypes[] = {

&amp;MEDIASUBTYPE_DVD_SUBPICTURE ,TEXT("DVD Subpicture"),
&amp;MEDIASUBTYPE_DVD_LPCM_AUDIO ,TEXT("DVD Audio (LPCM)"),
&amp;MEDIASUBTYPE_DOLBY_AC3 ,TEXT("Dolby AC3"),
&amp;MEDIASUBTYPE_MPEG2_AUDIO ,TEXT("MPEG-2 Audio"),
&amp;MEDIASUBTYPE_MPEG2_TRANSPORT ,TEXT("MPEG-2 Transport Stream"),
&amp;MEDIASUBTYPE_MPEG2_PROGRAM ,TEXT("MPEG-2 Program Stream"),
0, 0
};

const GUIDINFO streamsubtypes[] = {

&amp;MEDIASUBTYPE_AIFF ,TEXT("AIFF"),
&amp;MEDIASUBTYPE_Asf ,TEXT("ASF"),
&amp;MEDIASUBTYPE_Avi ,TEXT("AVI"),
&amp;MEDIASUBTYPE_AU ,TEXT("AU"),
&amp;MEDIASUBTYPE_DssAudio ,TEXT("DSS Audio"),
&amp;MEDIASUBTYPE_DssVideo ,TEXT("DSS Video"),
&amp;MEDIASUBTYPE_MPEG1Audio ,TEXT("MPEG1 Audio"),
&amp;MEDIASUBTYPE_MPEG1System ,TEXT("MPEG1 System"),
// &amp;MEDIASUBTYPE_MPEG1SystemStream ,TEXT("MPEG1 System Stream"),
&amp;MEDIASUBTYPE_MPEG1Video ,TEXT("MPEG1 Video"),
&amp;MEDIASUBTYPE_MPEG1VideoCD ,TEXT("MPEG1 VideoCD"),
&amp;MEDIASUBTYPE_WAVE ,TEXT("Wave"),
0, 0
};

const GUIDINFO videosubtypes[] = {

&amp;MEDIASUBTYPE_YVU9 ,TEXT("YVU9"),
&amp;MEDIASUBTYPE_Y411 ,TEXT("YUV 411"),
&amp;MEDIASUBTYPE_Y41P ,TEXT("Y41P"),
&amp;MEDIASUBTYPE_YUY2 ,TEXT("YUY2"),
&amp;MEDIASUBTYPE_YVYU ,TEXT("YVYU"),
&amp;MEDIASUBTYPE_UYVY ,TEXT("UYVY"),
&amp;MEDIASUBTYPE_Y211 ,TEXT("YUV 211"),
&amp;MEDIASUBTYPE_CLJR ,TEXT("Cirrus YUV 411"),
&amp;MEDIASUBTYPE_IF09 ,TEXT("Indeo YVU9"),
&amp;MEDIASUBTYPE_CPLA ,TEXT("Cinepak UYVY"),
&amp;MEDIASUBTYPE_MJPG ,TEXT("Motion JPEG"),
&amp;MEDIASUBTYPE_TVMJ ,TEXT("TrueVision MJPG"),
&amp;MEDIASUBTYPE_WAKE ,TEXT("MJPG (Wake)"),
&amp;MEDIASUBTYPE_CFCC ,TEXT("MJPG (CFCC)"),
&amp;MEDIASUBTYPE_IJPG ,TEXT("Intergraph JPEG"),
&amp;MEDIASUBTYPE_Plum ,TEXT("Plum MJPG"),
&amp;MEDIASUBTYPE_RGB1 ,TEXT("RGB1 (Palettized)"),
&amp;MEDIASUBTYPE_RGB4 ,TEXT("RGB4 (Palettized)"),
&amp;MEDIASUBTYPE_RGB8 ,TEXT("RGB8 (Palettized)"),
&amp;MEDIASUBTYPE_RGB565 ,TEXT("RGB565"),
&amp;MEDIASUBTYPE_RGB555 ,TEXT("RGB555"),
&amp;MEDIASUBTYPE_RGB24 ,TEXT("RGB24"),
&amp;MEDIASUBTYPE_RGB32 ,TEXT("RGB32"),
&amp;MEDIASUBTYPE_ARGB32 ,TEXT("ARGB32"),
&amp;MEDIASUBTYPE_Overlay ,TEXT("Overlay video (from HW)"),
&amp;MEDIASUBTYPE_QTMovie ,TEXT("Apple QuickTime"),
&amp;MEDIASUBTYPE_QTRpza ,TEXT("QuickTime RPZA"),
&amp;MEDIASUBTYPE_QTSmc ,TEXT("QuickTime SMC"),
&amp;MEDIASUBTYPE_QTRle ,TEXT("QuickTime RLE"),
&amp;MEDIASUBTYPE_QTJpeg ,TEXT("QuickTime JPEG"),
&amp;MEDIASUBTYPE_dvsd ,TEXT("Standard DV"),
&amp;MEDIASUBTYPE_dvhd ,TEXT("High Definition DV"),
&amp;MEDIASUBTYPE_dvsl ,TEXT("Long Play DV"),
&amp;MEDIASUBTYPE_MPEG1Packet ,TEXT("MPEG1 Video Packet"),
&amp;MEDIASUBTYPE_MPEG1Payload ,TEXT("MPEG1 Video Payload"),
//&amp;MEDIASUBTYPE_VideoPort ,TEXT("Video Port (DVD)"),
&amp;MEDIASUBTYPE_VPVideo ,TEXT("Video port video"),
&amp;MEDIASUBTYPE_VPVBI ,TEXT("Video port VBI"),
0, 0
};

const GUIDINFO analogvideosubtypes[] = {

&amp;MEDIASUBTYPE_AnalogVideo_NTSC_M ,TEXT("(M) NTSC"),
&amp;MEDIASUBTYPE_AnalogVideo_PAL_B ,TEXT("(B) PAL"),
&amp;MEDIASUBTYPE_AnalogVideo_PAL_D ,TEXT("(D) PAL"),
&amp;MEDIASUBTYPE_AnalogVideo_PAL_G ,TEXT("(G) PAL"),
&amp;MEDIASUBTYPE_AnalogVideo_PAL_H ,TEXT("(H) PAL"),
&amp;MEDIASUBTYPE_AnalogVideo_PAL_I ,TEXT("(I) PAL"),
&amp;MEDIASUBTYPE_AnalogVideo_PAL_M ,TEXT("(M) PAL"),
&amp;MEDIASUBTYPE_AnalogVideo_PAL_N ,TEXT("(N) PAL"),
&amp;MEDIASUBTYPE_AnalogVideo_SECAM_B ,TEXT("(B) SECAM"),
&amp;MEDIASUBTYPE_AnalogVideo_SECAM_D ,TEXT("(D) SECAM"),
&amp;MEDIASUBTYPE_AnalogVideo_SECAM_G ,TEXT("(G) SECAM"),
&amp;MEDIASUBTYPE_AnalogVideo_SECAM_H ,TEXT("(H) SECAM"),
&amp;MEDIASUBTYPE_AnalogVideo_SECAM_K ,TEXT("(K) SECAM"),
&amp;MEDIASUBTYPE_AnalogVideo_SECAM_K1 ,TEXT("(K1) SECAM"),
&amp;MEDIASUBTYPE_AnalogVideo_SECAM_L ,TEXT("(L) SECAM"),
0, 0
};


const GUIDINFO *pSubTypes[] = {

audiosubtypes, // Analog audio
analogvideosubtypes,// Analog video
audiosubtypes, // Audio
line21subtypes, // Line21 data
NULL, // File. Used by closed captions
NULL, // Interleaved. Used by Digital Video (DV)
NULL, // Obsolete.do
not use.
NULL, // MIDI format
mpeg2subtypes, // MPEG-2. Used by DVD.
NULL, // Script command, used by closed captions
streamsubtypes, // Byte stream with no time stamps
NULL, // Text
NULL, // Timecode data
NULL, // Obsolete. do
not use.
videosubtypes, // Video
};

 
如果用DirectShow,你可以用免费的Mpeg2 Filter
 
mpeg2的filter好象没有免费的吧?
 
兄弟一分都没有,看哪位大哥可以给点!
 
to:jingtao
有个问题要麻烦你,
  如何把 C++中的
  “WORD CALLBACK FMPCallbackProc( BYTE bMsg, BYTE hMPEGStream, DWORD dwValue );”
  这句译成DELPHI语句?请帮个忙!
 
我现在也正想做视频vod系统,希望能与你交流。
邮箱:stephenhu21centry@yahoo.com.cn
QQ:156954924
 
多人接受答案了。
 
后退
顶部