trouble using libvlc_media_add_option
Posted: 31 Dec 2009 09:29
Hello.
I am trying to play and save a .avi file simultanesouly using libvlc. My code looks as follows:
The file is displayed correctly. The recording is also done to file on hard disk. However I am not able to playback the recorded file. I notice that the new file that is created (CWrecTest.avi) is smaller than the original file. Original file was 4009KB while the new file is 3992KB.
What could be the reason for this?
I am trying to play and save a .avi file simultanesouly using libvlc. My code looks as follows:
Code: Select all
/* Create a new item */
m = libvlc_media_new (inst, movie_name, ex);
raise (ex);
libvlc_media_add_option(m,":sout=#duplicate{dst=display,dst=std{access=file,mux=avi,dst=CWrecTest.avi}}",ex);
raise (ex);
mp = libvlc_media_player_new_from_media (m, ex);
raise (ex);
libvlc_media_release (m);
raise (ex);
libvlc_media_player_set_drawable(mp, (libvlc_drawable_t) (*hWindow), ex);
raise (ex);
/* play the media_player */
libvlc_media_player_play (mp, ex);
raise (ex);
What could be the reason for this?