Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

#358 closed defect (fixed)

MMS(MMSH) seeking/skipping freezes video

Reported by: Arno Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mms
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

When trying to seek/skip through a streamed video using the MMS/MMSH protocols, FFmpeg/FFPlay freezes. I first encountered this problem in XBMC but FFPlay experiences the same behaviour. I've tested it with several Dutch streams, which all show the problem. It works fine when I use an older version of XBMC which uses libmms so it seems to be a problem FFmpeg's implementation.

The commandline/output from ffplay looks like this:
(1000 ~/ffmpeg)% ./ffplay "mmsh://bolt01.omroep.nl/public/ug-od/wm/50/media/wm50c1/ceres/1/kro/rest/2009/KRO_1336806/bb.20090611.asf?wmt=4e292053&wmhash=15605a15"
ffplay version N-31601-gba99474, Copyright (c) 2003-2011 the FFmpeg developers

built on Jul 22 2011 08:56:44 with gcc 4.4.3
configuration:
libavutil 51. 11. 0 / 51. 11. 0
libavcodec 53. 8. 0 / 53. 8. 0
libavformat 53. 6. 0 / 53. 6. 0
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 27. 2 / 2. 27. 2
libswscale 2. 0. 0 / 2. 0. 0

Input #0, asf, from 'mmsh://bolt01.omroep.nl/public/ug-od/wm/50/media/wm50c1/ceres/1/kro/rest/2009/KRO_1336806/bb.20090611.asf?wmt=4e292053&wmhash=15605a15':

Metadata:

WMFSDKVersion : 10.00.00.4001
WMFSDKNeeded : 0.0.0.0000
IsVBR : 0

Duration: 00:10:09.14, start: 0.000000, bitrate: N/A

Stream #0.0(eng): Video: wmv3 (Main), yuv420p, 320x180, 452 kb/s, 25 tbr, 1k tbn, 1k tbc
Stream #0.1(eng): Audio: wmav2, 44100 Hz, 2 channels, s16, 48 kb/s

ALSA lib pcm.c:7245:(snd_pcm_recover) underrun occuredB sq= 0B f=0/0
Read data packet header failed! 0KB vq= 0KB sq= 0B f=0/0 f=0/0
Recv other type packet -5
Read data packet header failed!
Recv other type packet -5
[asf @ 0x8f3a120] asf_read_pts failed
mmsh://bolt01.omroep.nl/public/ug-od/wm/50/media/wm50c1/ceres/1/kro/rest/2009/KRO_1336806/bb.20090611.asf?wmt=4e292053&wmhash=15605a15: error while seeking
Read data packet header failed!
Recv other type packet -5

Attachments (3)

asfdec.c (47.4 KB ) - added by bwallen 12 years ago.
Commented out line 1316, NOBINSEARCH and NOGENSEARCH. Seems to fix the problem
asfdec.diff (349 bytes ) - added by bwallen 12 years ago.
Here's my diff for asfdec.c. I pretty much just disabled NOGENSEARCH and NOBINSEARCH
ffplay-20130516-224646.log (20.8 KB ) - added by brtv_viewer 11 years ago.
ffplay report when seek in mms/mmsh stream causes it to crash

Download all attachments as: .zip

Change History (13)

by bwallen, 12 years ago

Attachment: asfdec.c added

Commented out line 1316, NOBINSEARCH and NOGENSEARCH. Seems to fix the problem

comment:1 by Michael Niedermayer, 12 years ago

the quoted mmsh URL just gives me a Input/output error, so i dont know how to reproduce this

comment:2 by spiff, 12 years ago

you can use e.g. mmsh://straumod.nrk.no/disk11/Supermorgen/2011-03-11/MSUS54000411AA-1Mbit.wmv?UseSilverlight=1

in fact any mmsh url will exhibit it. this one should not be volatile

by bwallen, 12 years ago

Attachment: asfdec.diff added

Here's my diff for asfdec.c. I pretty much just disabled NOGENSEARCH and NOBINSEARCH

comment:4 by Arno, 12 years ago

Commenting out NOBINSEARCH and NOGENSEARCH. does not fix the problem, unfortunately, which totally makes sense since our older ffmpeg which didn't have them also suffered from this problem.

comment:5 by Carl Eugen Hoyos, 12 years ago

Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

Also reproducible with ffmpeg -ss 5 -i ...

in reply to:  4 comment:6 by bwallen, 12 years ago

Replying to arnova:

Commenting out NOBINSEARCH and NOGENSEARCH. does not fix the problem, unfortunately, which totally makes sense since our older ffmpeg which didn't have them also suffered from this problem.

Yeah, I found that out with some more testing. It seemed to fix the problem with one stream I tried but not any others. I'm not beat yet, though. I'm gonna try to track this bug down since it's preventing me from being able to upgrade XBMC.

Last edited 12 years ago by bwallen (previous) (diff)

comment:7 by bwallen, 12 years ago

I've been trying to figure this out but so far I haven't had any luck. I've traced the problem as far back as retry_transfer_wrapper() in avio.c. When the error occurs, retry_transfer_wrapper() returns a negative number due to transfer_func(). This negative number makes it's way to line 83 in mmsh.c where it fails. I guess I don't understand what exactly transfer_func() is supposed to be doing. I think it's the key to the problem, but I could be wrong.

comment:8 by Carl Eugen Hoyos, 12 years ago

Component: undeterminedavformat
Resolution: fixed
Status: openclosed

Seeking with ffmpeg -ss works fine now afaict, seeking with ffplay mmsh:// is supported to a certain degree.

by brtv_viewer, 11 years ago

Attachment: ffplay-20130516-224646.log added

ffplay report when seek in mms/mmsh stream causes it to crash

comment:9 by brtv_viewer, 11 years ago

I am trying to seek/skip the mmsh stream referenced above using the latest development branch build. It still causes ffplay/ffmpeg to crash. The command line is below.

ffplay -report "mmsh://straumod.nrk.no/disk11/Supermorgen/2011-03-11/MSUS54000411AA-1Mbit.wmv?UseSilverlight=1"

The ffplay report is attached.
Is it a regression?

in reply to:  9 comment:10 by Carl Eugen Hoyos, 11 years ago

Replying to brtv_viewer:

I am trying to seek/skip the mmsh stream referenced above using the latest development branch build. It still causes ffplay/ffmpeg to crash.

I opened ticket #2581, thank you for testing and the report!

Note: See TracTickets for help on using tickets.