FLV recording
FLV recording TVideoGrabber is able to record in FLV format if: - a compatible FLV muxer filter are installed, e.g. Google for "directshow flv muxer", "directshow flv multiplexer", etc... - a compatible MPEG4 encoder(1) is installed, e.g. Google for "MPEG-4 encoder codec", "MP4 encoder codec", etc...
The filters have to be first registered with regsvr32.exe (run "regsvr32.exe c:/myinstallfolder/.ax" as administrator) - VideoGrabber.RecordingMethod = rm_FLV - VideoGrabber.CompressionMode = cm_CompressOnTheFly - VideoGrabber.SetMultiplexerFilterByName ("...") (2) - VideoGrabber.VideoCompressor = VideoGrabber.VideoCompressorIndex ("...") (3) - VideoGrabber.StartRecording ()
(1) in the case the FLV muxer does the MPEG4 encoding by itself, set CompressionMode = cm_NoCompression and ignore the VideoCompressor setting * (2) to retrieve the filter name after installing it with regsvr32.exe browse the DirectShowFilters list, look for something like e.g. "MP4 mux", "MPEG-4 muxer", "MP4 multiplexer" * (3) specify the name of the video encoder listed in the "video compressors" list (listed in the "Recording" tab of MainDemo.exe) Saving / restoring the encoder settings To adjust the compressor settings, invoke ShowDialog(dlg_VideoCompressor) as follows, the settings will be saved in the registry and reused for the next recordings, e.g. for testing:
- VideoGrabber.RecordingMethod = rm_FLV
- VideoGrabber.CompressionMode = cm_CompressOnTheFly
- VideoGrabber.VideoCompressor = VideoGrabber.VideoCompressorIndex ("...") (3) - VideoGrabber.ShowDialog (dlg_VideoCompressor)
Additionally it is possible to invoke use the SaveCompressorSettings... and LoadCompressorSettings... functions to save/reload programmatically several sets of compressor settings without having to invoke ShowDialog() anymore, as explained in the "Saving and restoring compressor settings programmatically " chapter.