marquee stops working after add_option duplicate

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
skippyV
New Cone
New Cone
Posts: 5
Joined: 15 Mar 2015 20:29

marquee stops working after add_option duplicate

Postby skippyV » 15 Mar 2015 21:22

Hello,
Using version 2.0.6 to capture an RTSP camera stream and display it in a C# WPF app.
Goal is to play the video on the app while recording it to file and to put a custom marquee on the video.

This is the order of instructions used (minus the marshalling of C# strings to byte arrays).

Code: Select all

string plugin_arg = "--plugin-path=" + pluginPath; string[] arguments = { "-I", "dummy", "--ignore-config", "--no-video-title", "--sub-filter=marq", plugin_arg }; libvlc_instance_ = libvlc_new(arguments); libvlc_media_player_ = libvlc_media_player_new(libvlc_instance_); libvlc_media_player_set_hwnd(libvlc_media_player_, wndHandle); libvlc_media = libvlc_media_new_path(libvlc_instance_, ""rtsp://@192.168.2.168"); // comment out call to libvlc_media_add_option and marquee works // option = "sout=#duplicate{dst=display,select=video,dst='transcode{vcodec=xvid,vb=1800,ab=352,acodec=vorb,samplerate=44100,fps=25}:std{access=file,mux=avi,dst=\"c:\\temp\\test.avi\"}'}"; // libvlc_media_add_option(libvlc_media, option) libvlc_media_parse(libvlc_media); duration_ = libvlc_media_get_duration(libvlc_media) / 1000.0; libvlc_media_player_set_media(libvlc_media_player_, libvlc_media); libvlc_media_release(libvlc_media); libvlc_media_player_play(libvlc_media_player_);
Lastly, calls are then made to create the marquee with libvlc_video_set_marquee_string and libvlc_video_set_marquee_int

If I uncomment the code for libvlc_media_add_option, then I get the video stream recorded to the file but I see no marquee.
Without the add_option I have no file (of course) but the marquee works as expected on the rendered stream.

So both functionalities work - just not together. I can see video rendered with the marquee OR I see video rendered and it's saved to file - but no marquee.

Is this order of calls incorrect?

Note: the library version I'm using is x64.
I've tried the 32bit versions of both 2.2.0 and 2.0.6.
With 32bit 2.0.6 the results were the same as described above.
With 2.2.0 (both 64 and 32 bit) there is no video rendered and an output file size 0 bytes is produced.

skippyV
New Cone
New Cone
Posts: 5
Joined: 15 Mar 2015 20:29

Re: marquee stops working after add_option duplicate

Postby skippyV » 18 Mar 2015 14:58

I pulled out the calls and put them in a simple C application in the hopes that someone will try it out and say 'hey it worked for me' or 'yeah it didn't work for me either'.

Code: Select all

// Vlc_ConsoleApp.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <stdio.h> #include <stdlib.h> #include <vlc/vlc.h> #include <windows.h> int _tmain(int argc, _TCHAR* argv[]) { libvlc_instance_t * inst; libvlc_media_player_t *mp; libvlc_media_t *m; char* arguments[] = { "-I", "dummy", "--ignore-config", "--no-video-title", "--sub-filter=marq", "--plugin-path=C:/Software_Development/Software_Libraries/VLC/vlc-2.0.6_x64/plugins"}; // you'll need to adjust this // you may need to adjust the output path char* duplicateStreamOption = ":sout=#stream_out_duplicate{dst=display,dst=std{access=file,sub-filter=marq,mux=ts,dst=c:/temp/test_go.mpg}}"; /* Load the VLC engine */ inst = libvlc_new (6, arguments); /* Create a new item */ m = libvlc_media_new_location (inst, "rtsp://@192.168.2.168"); // you'll need to change this to some media you have /* add option to record duplicate stream to file */ /* if I comment this out - then marquee works */ //libvlc_media_add_option(m, duplicateStreamOption); /* Create a media player playing environement */ mp = libvlc_media_player_new_from_media (m); /* No need to keep the media now */ libvlc_media_release (m); /* play the media_player */ libvlc_media_player_play (mp); Sleep (10000); /* Let it play for 10 seconds */ /* throw up 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 secs libvlc_video_set_marquee_int(mp, libvlc_marquee_Size, 40); libvlc_video_set_marquee_int(mp, libvlc_marquee_Color, 0xFF0000); Sleep (10000); /* play some more */ /* Stop playing */ libvlc_media_player_stop (mp); /* Free the media_player */ libvlc_media_player_release (mp); libvlc_release (inst); return 0; }


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 24 guests