libvlc_media_player_get_time return 0 when play rtsp stream

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.
Jeremiah
Blank Cone
Blank Cone
Posts: 53
Joined: 16 Oct 2008 09:31

libvlc_media_player_get_time return 0 when play rtsp stream

Postby Jeremiah » 08 Jun 2009 08:21

libvlc_media_player_get_time and libvlc_media_player_get_position return 0 when playing rtsp stream using vlc-0.9.9a.

and/so the slide isn't moving.....

but use vlc-0.8.6i, all is good! the slide is moving and i can get the real time from libvlc_media_player_get_time.

so what's the matter?

by the way, when i testing the vlc-1.0.0-rc1, it cannot play rtsp stream successfully. i complie it using contrib-20090219-win32-bin-gcc-4.2.1-sjlj-runtime-3.13-only.tar.bz2 in cygwin.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: libvlc_media_player_get_time return 0 when play rtsp stream

Postby VLC_help » 08 Jun 2009 16:22

so what's the matter?
There was huge RTSP recode between 0.8.x -> 0.9.x so I assume this is because of it
it cannot play rtsp stream successfully
Could you paste VLC message log with RC2 or RC3?

Jeremiah
Blank Cone
Blank Cone
Posts: 53
Joined: 16 Oct 2008 09:31

Re: libvlc_media_player_get_time return 0 when play rtsp stream

Postby Jeremiah » 09 Jun 2009 02:39

thank you very much, vlc_help. you're a very good guy.

i compile for myself using cygwin and contrib-20090118-win32-bin-gcc-4.2.1-sjlj-runtime-3.13-only.tar.bz2.
and i use vlm of vlc-0.9.9a.zip as the vod server. i can play rtsp://127.0.0.1/test1 using other version of vlc expect vlc-1.0.0-rc*.

here is the log:

Code: Select all

-- logger module started -- main debug: using interface module "logger" main debug: TIMER module_need() : 64.000 ms - Total 64.000 ms / 1 intvls (Avg 64.000 ms) main debug: thread (interface) created at priority 0 (interface/interface.c:156) main debug: looking for interface module: 1 candidate main debug: thread started main debug: thread ended main debug: using interface module "hotkeys" main debug: TIMER module_need() : 39.000 ms - Total 39.000 ms / 1 intvls (Avg 39.000 ms) main debug: thread (interface) created at priority 0 (interface/interface.c:156) main debug: adding item `rtsp://127.0.0.1/test1' ( rtsp://127.0.0.1/test1 ) main debug: thread started main debug: rebuilding array of current - root 播放列表 main debug: rebuild done - 1 items, index -1 main debug: looking for interface module: 1 candidate main debug: using interface module "globalhotkeys" main debug: TIMER module_need() : 45.000 ms - Total 45.000 ms / 1 intvls (Avg 45.000 ms) main debug: thread (interface) created at priority 0 (interface/interface.c:156) main: 正在以默认界面运行 vlc,使用 'cvlc' 将 vlc 运行在无界面的状态下。 main debug: looking for interface module: 3 candidates main debug: thread started main debug: thread ended main debug: using interface module "qt4" main debug: TIMER module_need() : 533.000 ms - Total 533.000 ms / 1 intvls (Avg 533.000 ms) main debug: thread started main debug: thread (interface) created at priority 0 (interface/interface.c:156) main debug: thread ended main debug: processing request item null node 播放列表 skip 0 main debug: starting new item main debug: creating new input thread main debug: Creating an input for 'rtsp://127.0.0.1/test1' qt4 debug: Error while initializing qt-specific localization main debug: thread (input) created at priority 1 (input/input.c:230) main debug: thread started qt4 debug: IM: Setting an input main debug: using timeshift granularity of 50 MBytes main debug: using timeshift path 'C:\DOCUME~1\wangwei1\LOCALS~1\Temp' main debug: `rtsp://127.0.0.1/test1' gives access `rtsp' demux `' path `127.0.0.1/test1' main debug: creating demux: access='rtsp' demux='' path='127.0.0.1/test1' main debug: looking for access_demux module: 1 candidate qt4 debug: Updating the geometry qt4 debug: size: 1 - 21145 qt4 debug: sizeHint: 4 - 349 qt4 debug: Updating the geometry qt4 debug: size: 1 - 21145 qt4 debug: sizeHint: 4 - 349 live555 debug: DESCRIBE failed with 0: connect() failed: Unknown error live555 debug: connection timeout live555 error: Failed to connect with rtsp://127.0.0.1/test1 main warning: no access_demux module matching "rtsp" could be loaded main debug: TIMER module_need() : 135.000 ms - Total 135.000 ms / 1 intvls (Avg 135.000 ms) main debug: creating access 'rtsp' path='127.0.0.1/test1' main debug: looking for access module: 0 candidates main error: no access module matched "rtsp" main debug: TIMER module_need() : 2.000 ms - Total 2.000 ms / 1 intvls (Avg 2.000 ms) main error: open of `rtsp://127.0.0.1/test1' failed: no access module matched "rtsp" main debug: thread ended main debug: dead input main debug: thread times: real 0m0.171428s, kernel 0m0.000000s, user 0m0.015625s main debug: changing item without a request (current 0/1) main debug: nothing to play qt4 debug: IM: Deleting the input qt4 debug: Updating the geometry qt4 debug: size: -1 - 21145 qt4 debug: sizeHint: -4 - 349 qt4 debug: Updating the geometry qt4 debug: size: -1 - 21145 qt4 debug: sizeHint: -4 - 349 main debug: Destroying the input for 'rtsp://127.0.0.1/test1' main debug: TIMER input launching for 'rtsp://127.0.0.1/test1' : 201.000 ms - Total 201.000 ms / 1 intvls (Avg 201.000 ms)

Jeremiah
Blank Cone
Blank Cone
Posts: 53
Joined: 16 Oct 2008 09:31

Re: libvlc_media_player_get_time return 0 when play rtsp stream

Postby Jeremiah » 09 Jun 2009 02:40

i don't use the exe file the the videolan gived. so maybe i'll try the official file.
-------------------------------------------------------------------------------------------------
i tried the official exe file. it works fine with rtsp, but the slide dose not move, and the current time of the video is always 0.00. so the libvlc_media_player_get_time of rc3 will return 0 for rtsp.

also maybe the compiling thing of my rc3 is wrong. the contrib maybe the point, i think.

so can jb~ give us the new contrib for vlc-1.0.0-rc*?

thank you all very much....

Jeremiah
Blank Cone
Blank Cone
Posts: 53
Joined: 16 Oct 2008 09:31

Re: libvlc_media_player_get_time return 0 when play rtsp stream

Postby Jeremiah » 09 Jun 2009 10:49

hi
i added some msg_Dbg in live555.cpp

1. under function Control

Code: Select all

switch( i_query ) { case DEMUX_GET_TIME: pi64 = (int64_t*)va_arg( args, int64_t * ); msg_Dbg(p_demux,"====p_sys->i_npt=%d====\n", p_sys->i_npt); if( p_sys->i_npt > 0 ) { *pi64 = p_sys->i_npt; return VLC_SUCCESS; } return VLC_EGENERIC;
2. under function StreamRead

Code: Select all

/* Retrieve NPT for this pts */ tk->i_npt = (int64_t) INT64_C(1000000) * tk->sub->getNormalPlayTime(pts); msg_Dbg(p_demux,"^^^^tk->i_npt=%d^^^^\n", tk->i_npt);
and the log shows:

Code: Select all

[00000398] live555 demux debug: ====p_sys->i_npt=0==== [00000398] live555 demux debug: ^^^^tk->i_npt=0^^^^ [00000398] live555 demux debug: ^^^^tk->i_npt=0^^^^ [00000398] live555 demux debug: ^^^^tk->i_npt=0^^^^ [00000398] live555 demux debug: ^^^^tk->i_npt=0^^^^ [00000398] live555 demux debug: ^^^^tk->i_npt=0^^^^
it meas : tk->i_npt = (int64_t) INT64_C(1000000) * tk->sub->getNormalPlayTime(pts); always return 0;

what's the matter????

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: libvlc_media_player_get_time return 0 when play rtsp stream

Postby VLC_help » 09 Jun 2009 19:42

Shouldn't you print long ints with %z ?

Jeremiah
Blank Cone
Blank Cone
Posts: 53
Joined: 16 Oct 2008 09:31

Re: libvlc_media_player_get_time return 0 when play rtsp stream

Postby Jeremiah » 10 Jun 2009 02:24

it's the same using %lld to print long ints in this case, getNormalPlayTime(pts) always return 0.
this is weird....

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: libvlc_media_player_get_time return 0 when play rtsp stream

Postby VLC_help » 12 Jun 2009 16:03

You might get better help from IRC or from mailing list.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 65 guests