I am using libVLC to process and record videos from an IP camera, but overlay work during recording Can not - that means I comment on the code that duplicates the stream to save a file - the overlay works but if I leave the code - the video is recorded but on the screen or Either an overlay in the file Is not used.
Using libVLC 2.06 on Windows 7 (x64). But this problem is unchanged with the 32 bit version.
Source in Visual Studio for the Console project:
// Vlc_ConsoleApp.cpp: Defines the entry point for the console application. // # Include "stdafx.h" # Include & lt; Stdio.h & gt; # Include & lt; Stdlib.h & gt; # Include & lt; Vlc / vlc.h> #include & lt; Windows.h & gt; Int _tmain (int argc, _TCHAR * argv []) {libvlc_instance_t * inst; Libvlc_media_player_t * mp; Libvlc_media_t * m; Char * logic [] = {"-i", "dummy", "-igner-config", "-not-video-title", "-sub-filter = marq", "-plugin-path = C: /Software_Development/Software_Libraries/VLC/vlc-2.0.6_x64/plugins "}; Char * duplicateStreamOption = ": sout = # stream_out_duplicate {dst = display, dst = std {access = file, sub-filter = marq, mux = ts, dst = c: /temp/test_go.mpg}}"; / * Load VLC engine * / inst = libvlc_new (6, argument); / * Create a new item * / m = libvlc_media_new_location (inst, "rtsp: //@192.168.2.168"); / * Add option to file duplicate stream * / / * If I comment on this - then Marque works * / // libvlc_media_add_option (m, duplicateStreamOption); / * Create a media player gaming environment * / mp = libvlc_media_player_new_from_media (m); / * No need to keep media anymore * / libvlc_media_release (m); Play / * Media_player * / libvlc_media_player_play (mp); Sleep (10000); / * Play it for 10 seconds * / / * A Marquee * / libvlc_video_set_marquee_int (mp, libvlc_marquee_Enable, 1); Libvlc_video_set_marquee_string (mp, libvlc_marquee_Text, "hello-marquee"); Libvlc_video_set_marquee_int (mp, libvlc_marquee_Opacity, 50); Libvlc_video_set_marquee_int (mp, libvlc_marquee_X, 10); Libvlc_video_set_marquee_int (mp, libvlc_marquee_Y, 10); Libvlc_video_set_marquee_int (mp, libvlc_marquee_Timeout, 4000); // 4 seconds libvlc_video_set_marquee_int (mp, libvlc_marquee_Size, 40); Libvlc_video_set_marquee_int (mp, libvlc_marquee_Color, 0xFF0000); Sleep (10000); / * Play more * / / * Stop the game * / libvlc_media_player_stop (mp); / * Media_player free * / libvlc_media_player_release (mp3); Libvlc_release (inst); Return 0; }
Try "- sub-source = marq"
In your option instead of - - SubFilter = Mark "
No comments:
Post a Comment