Post Reply 
last.fm stream in amarok
Feb. 16, 2007, 09:05 PM
Post: #1
last.fm stream in amarok
hi. i have filled that bug report http://bugs.kde.org/show_bug.cgi?id=135951
because i got bad sound with last.fm stream in amarok.

but i just found that's because it use the proxy i have set in my konqueror configuration i.e. bfilter.

i have tried to config bfilter so that it does not filter last.fm stream with
NOFILTER *last.mp3?Session=*
in urls.local
but the sound is the same.

is my filter wrong ?
the url i want to filter seem to be like that
http://87.117.229.84:80/last.mp3?Session...**********

or the problem is caused by bad timing of packet forwarding in bfilter ? or some data cut from the packet ?

i just want that the packet pass through bfilter without change.

else i will disable bfilter. or try to disable it in amarok
Add Thank You Quote this message in a reply
Feb. 16, 2007, 09:51 PM
Post: #2
RE: last.fm stream in amarok
I couldn't get Amarok to play last.fm streams with or without bfilter. I'll try again tomorrow.
Add Thank You Quote this message in a reply
Feb. 16, 2007, 10:46 PM
Post: #3
RE: last.fm stream in amarok
i can listen to last.fm stream in amarok:
1) if i disable the proxy bfilter in my konqueror config
2) or if i disable the use of proxies in /opt/kde/bin/amarok_proxy.rb (i added proxy = "" after line 227)

i have made some tcp capture with tcpdump. with that script
Code:
tcpdump -i ppp0 -w ppp0.tcpdump src port 80 &
tcpdump -i lo -w lo.tcpdump port 8080

when the data arrives at bfilter it looks like that (in ascii)
Code:
...D...TWSQ.;b^
.m<.lL.YIG.M
......)..j...U.O....s..n....
..Z.....W....qFjl...&..j3..U
...D....;...2._(Z.b#]...J...
8.i..{
.^..7.ZG.8....._6..#.
:Nw.~.E...T....<G<...7o[.5._
...D....TTQ.+he...=.lK.aM...
..
0........Q.......Z.......
.AP........%.o.M+..E%.X....:
...D....*.Q...i..-af\..IC,%f

and when it leaves it
Code:
208
.2..#._T..... .6..h....R.580
...d....d...[`..*0...VUSD580
{B...My........a.....A.|.580
...d....\O.y{`..I.....e.>580
.c.......kW6..}Sx..... ;c208
):...*......)._......r.*.580
...d....aO..c`.`9.....%.>580
..i.^...d4......P.[8`.J..580
...d....OP..{`[email protected]=B580
...d...Ze...[b..J.......<

and since the bug report is dated from 2006-10-19
it is since bfilter 1.0.6 that i have that problem
Add Thank You Quote this message in a reply
Feb. 17, 2007, 06:55 AM
Post: #4
RE: last.fm stream in amarok
I finally got Amarok working with last.fm, and it works fine through BFilter. That's Amarok 1.4.3.
Your captures weren't very useful because they didn't include HTTP headers, but it looks like BFilter responds to Amarok with chunked transfer. So, my theory is:
Amarok (or amarok_proxy.rb) was sending HTTP/1.1 requests but wasn't prepared to handle chunked responses (which are part of HTTP/1.1). Amarok 1.4.3 sends HTTP/1.0 requests, so it doesn't get chunked responses.
Add Thank You Quote this message in a reply
Feb. 17, 2007, 09:52 AM
Post: #5
RE: last.fm stream in amarok
i use amarok 1.4.5

if it helps http://home.tele2.fr/solsTiCe/dump.tar.gz [491ko]

[edit] i have uploaded a new dump.tar.gz with full packet.
i.e. i used
Code:
tcpdump -s 0 -i ppp0 -w ppp0.tcpdump src port 80 &
tcpdump -s 0 -i lo -w lo.tcpdump port 8080

previously that only captured part of the packets.

wireshark show me that the packet transmitted from bfilter to amarok_proxy.rb do not have a good checksum. important ?

and one can see some data are changed.
[/edit]
Add Thank You Quote this message in a reply
Feb. 17, 2007, 10:25 AM
Post: #6
RE: last.fm stream in amarok
The problem with your captures is that they are made in the middle of a song, so http headers are not captured. You should stop the song, start capturing, then start the song.

Quote:wireshark show me that the packet transmitted from bfilter to amarok_proxy.rb do not have a good checksum. important ?
No, that's likely to be a bug in Wireshark.
Add Thank You Quote this message in a reply
Feb. 17, 2007, 10:49 AM
Post: #7
RE: last.fm stream in amarok
i have updated the dump.tar.gz. it shows the headers you need
Add Thank You Quote this message in a reply
Feb. 17, 2007, 11:13 AM
Post: #8
RE: last.fm stream in amarok
Just what I thought. They use HTTP/1.1 requests but can't handle chunked responses, which are part of HTTP/1.1.
If you edit your amarok_proxy.rb file and replace all instances of HTTP/1.1 with HTTP/1.0, then it should work.
Add Thank You Quote this message in a reply
Feb. 17, 2007, 12:10 PM
Post: #9
RE: last.fm stream in amarok
http://bugs.kde.org/show_bug.cgi?id=141819

and thank you jart for your help
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: