Opened 17 years ago

Last modified 13 years ago

#629 new defect

video freezes when watching asf stream

Reported by: gsturov@… Owned by: reimar
Priority: normal Component: demuxer
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

When I watch asf streams from overseatv.com I get mplayer freezing every 5 to 10
minutes.
I have done some investigation and here is the result.
A short one minute long dump of the stream can be found here:
http://www.mediamax.com/gsturov/Hosted/test.asf
If you play it with mplayer (don't use -fps switch!) the video will freeze after
5 seconds.

The real problem is of course the stream, but I guess mplayer could use a
workaround. Sorry for possible mistakes in terminology. I am very new to this field.
I have tracked the problem down to libmpdemux\video.c code.
The problem as I understand it is that the stream reports insane duration of a
frame that "jumps" forward a few hundred seconds. Then the next duration becomes

a negative value, the stream "jumps" back in time. Demuxer is trying to recover

and uses the previously known duration instead of the negative one, but the
previous value is insanely huge and has actually created the problem in the
first place.

I hacked video.c and it is working for me now, but a "real" solution should
probably be provided for other users.
My hack:

case DEMUXER_TYPE_MOV:
case DEMUXER_TYPE_FILM:
case DEMUXER_TYPE_VIVO:
case DEMUXER_TYPE_OGG:
case DEMUXER_TYPE_ASF: {

float next_pts = ds_get_next_pts(d_video);
float d= next_pts > 0 ? next_pts - d_video->pts : d_video->pts-pts1;

<my hack>

if (d > 10.0) {

mp_msg(MSGT_CPLAYER,MSGL_WARN,"\nSuspicious frame duration of %5.3f

sec.\n", d);

d = 0.04;

}

</my hack>

if(d>=0){

if(d>0){

if((int)sh_video->fps==1000)

mp_msg(MSGT_CPLAYER,MSGL_V,"\navg. framerate: %d fps

\n",(int)(1.0f/d));

thanks!
Gleb

Change History (2)

comment:1 by reimar, 17 years ago

Use -demuxer lavf for now.

comment:2 by compn, 13 years ago

Owner: changed from r_togni@… to reimar
Note: See TracTickets for help on using tickets.