Failure to choose highest bitrate in mmsh streams with multiple bitrates
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libmms |
Won't Fix
|
Undecided
|
Unassigned | ||
Debian |
Fix Released
|
Unknown
|
Bug Description
The Danish National radio broadcasts its netradio in three bitrates: 128904, 64896, 32844
When using libmms to playback the stations, the lowest bitrate is chosen.
The easiest way to reproduce this is to compile libmms with debug enabled, and use gst-launch with the mmssrc (from the GStreamer plugins bad package):
gst-launch-0.10 mmssrc location=
Amongst the debug output are the following lines:
GUID: stream bitrate properties
stream bitrate properties
streams 3
stream id 1
mmsh: stream id 1, bitrate 128904
stream id 2
mmsh: stream id 2, bitrate 64896
stream id 3
mmsh: stream id 3, bitrate 32844
length : 44
GUID: file properties
file object, packet length = 5493 (5493)
length : 104
GUID: header extension
unknown object
length : 4719
GUID: stream header
GUID: audio media
stream object, stream id: 3, type: 1, encrypted: 0
length : 114
GUID: extended content description
unknown object
length : 164
GUID: codec list
unknown object
length : 174
From this i reckon that the three bitrates are correctly identified. But it seems that only a single audio stream is found -- the last one with the lowest quality.
Related branches
Changed in debian: | |
status: | Unknown → New |
Changed in debian: | |
status: | New → Fix Released |
I just couldn't keep my mind off this problem, and now I know what is wrong.
The problem seems to be that the way that multiple bitrate streams are only supported in newer versions of ASF.
Therefore the stream properties header for all but one of the streams is hidden away in an extended header. The point is that any old player supporting older version of ASF will still work, but only with the single stream which has its stream properties header outside the extension header. Obviously, the Danish National Radio has chosen to use the lowest bitrate stream for older players.
I have hacked together the attached patch, which should enabled libmms to support multiple bitrate URLs. It's getting rather late here, so chances are that the patch is filled with exciting errors :-)
Oh, and when the patch has been applied, I can playback the URL mentioned previously in much better quality:
gst-launch-0.10 mmssrc location= "mmsh:/ /wmscr1. dr.dk/e02ch03m? wmcontentbitrat e=300000& MSWMExt= .asf" ! ffdemux_asf ! decodebin ! alsasink
For some strange reason the ffdemux_asf element is needed, else it won't play back. I'm pretty sure that it is unrelated to libmms, but I'll wait to investigate further till I have gotten some sleep :-)
/Paul