MPLATFORMLib Namespace > MWriterClass Class : WriterNameSet Method |
Here is example of how to start capturing from a playlist:
'configure playlist Dim myPlaylist As New MPlaylistClass() myPlaylist.ObjectStart(New Object()) Dim myIndex As Integer = -1 Dim myItem As MItem myPlaylist.PlaylistAdd(Nothing, "c:\mySourceFile.mp4", "", myIndex, myItem) myPlaylist.FilePlayStart() 'create MWriter and start capturing Dim m_objWriter As New MWriterClass() m_objWriter.WriterNameSet("C:\myFile.vob", "format='vob' video::codec='mpeg2video' video::b='20M' video::g='1' video::me_method='full' video::qmin='1' video::qmax='1' audio::codec='mp2' audio::maxrate='256000' audio::b='200K'") m_objWriter.ObjectStart(myPlaylist)
//configure playlist MPlaylistClass myPlaylist = new MPlaylistClass(); myPlaylist.ObjectStart(new object()); int myIndex = -1; MItem myItem; myPlaylist.PlaylistAdd(null, @"c:\mySourceFile.mp4", "", ref myIndex, out myItem); myPlaylist.FilePlayStart(); //create MWriter and start capturing MWriterClass m_objWriter = new MWriterClass(); m_objWriter.WriterNameSet("C:\myFile.vob", "format='vob' video::codec='mpeg2video' video::b='20M' video::g='1' video::me_method='full' video::qmin='1' video::qmax='1' audio::codec='mp2' audio::maxrate='256000' audio::b='200K'"); m_objWriter.ObjectStart(myPlaylist);
var m_objWriter: IMWriter; myPlaylist: IMPlaylist; myIndex: integer; myItem: MItem; myFile: IMFile; myObject: IMObject; begin //configure playlist myPlaylist:= CreateComObject(CLASS_MPlaylist) as IMPlaylist; myFile:= myPlaylist as IMFile; myIndex:=-1; myPlaylist.PlaylistAdd(nil, 'c:\mySourceFile.mp4', '', myIndex, myItem); myFile.FilePlayStart(); //create MWriter and start capturing m_objWriter := CreateComObject(CLASS_MWriter) as IMWriter; myObject:=m_objWriter as IMObject; m_objWriter.WriterNameSet('C:\myFile.vob', 'format=vob video::codec=mpeg2video video::b=20M video::g=1 video::me_method=full video::qmin=1 video::qmax=1 audio::codec=mp2 audio::maxrate=256000 audio::b=200K'); myObject.ObjectStart(myPlaylist); end;