[MPlayer-dev-eng] Re: [PATCH] of asf_mmst_streaming to only receive the resquested streams

daurat daurat at tiscali.fr
Tue Jan 18 18:51:25 CET 2005


Hello,

On Tue, Jan 18, 2005 at 10:25:42AM +0100, Reimar D?ffinger wrote:
> > In this case, it would be nice to add a command line option
> > "-send-unwanted-channels" to be used when you don't want the server
> > to send everything.
> 
> I think there is a misunderstanding. The patch sets a flag to 0x2 for unwanted streams (saying something like "request to disable that stream"). From my experience many servers do not treat this correctly.
> Instead of sending "request to disable that stream" nothing should be sent to the server for these IMHO.

OK Many servers do not treat this correctly and would be confused with this send, 
but there is at least one server which treats this correctly.
(that's why I propose a commandline option for these *perhaps very rare*
servers). Unfortunately you cannot try this server
because corresponds to TV channels given by my ADSL provider
(club-internet). 
What is sure is that this patch permits to decrease
the network usage for this TV channel, I present a shell experiment which 
shows this:

--------------------------------------
T=100  #100 seconds
bytesreceived() {
  /sbin/ifconfig ppp0  | grep "RX bytes" | sed 's/^.*RX bytes:\([0-9]*\) .*$/\1/'
}
######## BEFORE THE PATCH:
B1=`bytesreceived`
mencoder-cvs.BEFOREPATCH -nocache -endpos $T -aid 1 -vid 4 -oac copy -ovc copy -o /dev/null $URL
B2=`bytesreceived`
echo "($B2-$B1)/$T" | bc
###### ---> 251359 bytes by second of video
#### AFTER THE PATCH:
B3=`bytesreceived`
mencoder-cvs.AFTERPATCH -nocache -endpos $T -aid 1 -vid 4 -oac copy -ovc copy -o /dev/null $URL
B4=`bytesreceived`
echo "($B4-$B3)/$T" | bc
##### ---> 47580 bytes by second of video
------------------------------------

The header information of the stream is:
------
 stream count=[0x4][4]
   stream id=[0x1][1]
   max bitrate=[0x10332][66354]
   stream id=[0x2][2]
   max bitrate=[0x11572a][1136426]
   stream id=[0x3][3]
   max bitrate=[0x9b60a][636426]
   stream id=[0x4][4]
   max bitrate=[0x4958a][300426]
-------------
so the first bitrate corresponds to the reception of everything
(66354+1136426+636426+300426)/8=267454 ~= 251359

And the second bitrate to the reception of just the wanted streams:
(66354+300426)/8=45847 ~= 47580

If you are not convinced, do not make changes, I can apply
this very little patch manually for me, but I think it could
interest other people, and anyway I can use xine which sends the 0x02....

Alain




More information about the MPlayer-dev-eng mailing list