[pyamf-dev] Re: [rtmpy-dev] [ANN] PyAMF 0.1.0 alpha released
Reinoud Elhorst
rtmpy at claude.nl
Wed Dec 19 21:54:35 CET 2007
Hi Thijs,
This is using the Wii Opera Flash player, which identifies itself as "WII
7,0,70,0". But it's a good suggestion, I'll give it a try tonight with my
flash 9 player, see what it does.
On 12/19/07, Thijs Triemstra | Collab <lists at collab.nl> wrote:
>
> Hi Reinoud,
> it's probably irrelevant but what version of the flashplayer are you
> using? and is it a browser plugin or standalone player?
>
> Thijs
>
> On Dec 18, 2007, at 8:40 AM, Reinoud Elhorst wrote:
>
> It seems the flash player doing a strange call after a long pause, which
> the RTMP parser parses incorrectly (or rather: it looks like the call is
> being parsed correctly but the data just doesn't make sense....). So it's
> not PyAMFs fault.
>
> In case someone is interested (I'm crossposting to rtmpy), this is the
> call I receive:
>
> 0x0000 88 ff ff ff 02 1e 44 73 02 00 05 70 61 75 73 65 . . . .
> . . D s . . . p a u s e
> 0x0010 00 00 00 00 00 00 00 00 00 05 01 00 00 40 a2 12 . . . .
> . . . . . . . . . @ . .
> 0x0020 00 00 00 00 00 . . . .
> .
>
> Which I decode as 4-byte header, channel_id=8, timestamp =16777215, and
> the rest is AMF packet (of size 29 since the last call had size 29). It
> would be decoded correctly if we had an 8-byte-header, channel_id is
> correct, timestamp should be something like 39600 (11 hours), size should
> indeed be 29, and kind 20, so I had expected the following header:
>
> 48 00 9a b0 00 00 1d 14
>
> Until I solve this, no long pauses I guess :)
>
> On 12/17/07, Reinoud Elhorst < rtmpy at claude.nl> wrote:
> >
> > Thanks Nick,
> >
> > r627 works fine in my code, I use it for both encoding and decoding now.
> >
> >
> > I'm still tracking a bug that occurs when I unpause the stream after a
> > real long time (hours). This problem was present in the very early version
> > of PyAMF, and still persists. Then again, perhaps the parsing of the RTMP
> > packet may just be failing and not producing an error.
> >
> > I added some more debugging statements to my application, hopefully I
> > can show you the packet it crashes on tomorrow.
> >
> >
> > On 12/17/07, Nick Joyce <nick at boxdesign.co.uk> wrote:
> > >
> > > Hi Reinoud,
> > >
> > > pyamf.encode and pyamf.decode were slightly misguided, but r626
> > > changes that. Continue to use decode as you were, it should give you better
> > > results now.
> > >
> > > I took inspiration from your code change for the actual fix, thanks!
> > >
> > > Nick
> > >
> > > On Sun, 2007-12-16 at 15:37 +0100, Reinoud Elhorst wrote:
> > >
> > > Hi,
> > >
> > > I tried to use this version for the wiidiaplayer today, and ran into a
> > > small problem. After I strip the header from an RTMP packet, I'm left with a
> > > concatnation of an unknown number of amf-encoded variables. It seems that
> > > pyamf.decode expects the encoded stream to be a single encoded list
> > > (hence the yield of each element of the initial call to
> > > Decoder.readElement()).
> > >
> > > I got it working fine now by changing the pyamf.decode function to:
> > >
> > > decoder = _get_decoder_class(encoding)(stream, context)
> > >
> > > while True:
> > > try:
> > > yield decoder.readElement()
> > > except exceptions.EOFError:
> > > break
> > >
> > > My AMF packet looks like this:
> > >
> > > "\x02\x00\x07connect\x00?\xf0\x00\x00\x00\x00\x00\x00\x03\x00\x03app\x02\x00\x00\x00\x08flashVer\x02\x00\x0cLNX
> > > 9,0,31,0\x00\x06swfUrl\x02\x00&
> > > http://localhost:8080/wiidiaplayer.swf\x00\x05tcUrl\x02\x00\x10rtmp://localhost\x00\x04fpad\x01\x00\x00\x0baudioCodecs\x00@\x838\x00\x00\x00\x00\x00\x00\x0bvideoCodecs\x00@_\x00\x00\x00\x00\x00\x00\x00\rvideoFunction\x00?\xf0\x00\x00\x00\x00\x00\x00\x00\x07pageUrl\x02\x00'
> > > http://localhost:8080/wiidiaplayer.html\x00\x00\t<http://localhost:8080/wiidiaplayer.html%5Cx00%5Cx00%5Ct>
> > > "
> > >
> > > It should decode to 3 variables:
> > > connect
> > > 1.0
> > > {'videoCodecs': 124.0, 'audioCodecs': 615.0, 'flashVer': u'LNX
> > > 9,0,31,0', 'app': u'', 'swfUrl': u'http://localhost:8080/wiidiaplayer.swf',
> > > 'videoFunction': 1.0, 'pageUrl': u'http://localhost:8080/wiidiaplayer.html',
> > > 'fpad': False, 'tcUrl': u'rtmp://localhost'}
> > >
> > >
> > > Perhaps I'm missing something and there is another way to do this?
> > >
> > > Reinoud
> > >
> > >
> > > On 12/13/07, *Nick Joyce* < nick at boxdesign.co.uk> wrote:
> > >
> > > We are pleased to announce the first alpha version of PyAMF.
> > >
> > > PyAMF [1] is a lightweight library that allows Flash and Python
> > > applications to communicate via Adobe's ActionScript Message Format.
> > >
> > > A summary of features in this release:
> > >
> > > * AMF0 and AMF3 encoders/decoders
> > > * Support for IExternalizable, ArrayCollection, ObjectProxy,
> > > ByteArray,
> > > RecordSet and RemoteObject
> > > * Remoting gateways for Twisted, WSGI, and Django
> > > * Authentication/setCredentials support (AMF0 only)
> > > * zlib compression support for ByteArray
> > > * Remoting client with httplib
> > >
> > > Check out the download page [2] and installation instructions [3].
> > >
> > > Got questions? First stop is the mailing list [4].
> > >
> > > Cheers,
> > >
> > > The PyAMF Team
> > >
> > > [1] - http://pyamf.org
> > > [2] - http://pyamf.org/wiki/Download
> > > [3] - http://pyamf.org/wiki/Install
> > > [4] - http://pyamf.org/wiki/MailingList
> > >
> > > _______________________________________________
> > > RTMPy mailing list - rtmpy-dev at rtmpy.org
> > > http://lists.rtmpy.org/mailman/listinfo/rtmpy-dev
> > >
> > >
> > >
> > > _______________________________________________PyAMF dev mailing list - dev at pyamf.orghttp://lists.pyamf.org/mailman/listinfo/dev
> > >
> > >
> > > _______________________________________________
> > > PyAMF dev mailing list - dev at pyamf.org
> > > http://lists.pyamf.org/mailman/listinfo/dev
> > >
> > >
> >
> _______________________________________________
> RTMPy mailing list - rtmpy-dev at rtmpy.org
> http://lists.rtmpy.org/mailman/listinfo/rtmpy-dev
>
>
>
> _______________________________________________
> RTMPy mailing list - rtmpy-dev at rtmpy.org
> http://lists.rtmpy.org/mailman/listinfo/rtmpy-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rtmpy.org/pipermail/rtmpy-dev/attachments/20071219/6582c3ff/attachment.htm
More information about the rtmpy-dev
mailing list