when i set x264 profile=high, the situation changed some time but still unstable.
how can I modify the disk writing period?
Any help is much appreciated.
my code:
Code: Select all
vdev_name.Format(":dshow-vdev=%s",v_opt.device_name);
opt_out_str.Format(":sout=#transcode{width=%d,height=%d,vcodec=%s,vb=%d,scale=1,fps=%.1f,acodec=%s,ab=%d,channels=2,samplerate=44100}:std{access=file,mux=ts,dst=%s}}",
v_opt.input_width,v_opt. input_height, v_opt.vcodec,v_opt.bit_rate,v_opt.fps,a_opt.acodec,a_opt.bit_rate,v_opt.mux_format,opt_tmpfile_str);
const char * const vlc_args[] = {
"-I", "dumy", // No special interface
"--ignore-config", // Don't use VLC's config
"--plugin-path=./plugins",
"--live-caching=50"
};
inst = libvlc_new (sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args);
m = libvlc_media_new_location (inst, "dshow://");
libvlc_media_add_option(m,vdev_name.GetString());
libvlc_media_add_option(m,":sout-x264-keyint=25");
libvlc_media_add_option(m,opt_out_str.GetString());
mp = libvlc_media_player_new_from_media (m);
libvlc_media_player_play (mp)