Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question re implementation #5

Open
neilRGS opened this issue Aug 9, 2016 · 4 comments
Open

Question re implementation #5

neilRGS opened this issue Aug 9, 2016 · 4 comments

Comments

@neilRGS
Copy link

neilRGS commented Aug 9, 2016

Hi James.
I hope you are well.
I'm wondering if you can help. I need a way of extracting AMF data from an RTMP video stream, and your JSAMF library may be able to help with that.
I am streaming video using nanocosmos encoder and it uses a method, onCuePoint to send cue points along with the stream.
In their test player (which is flash) these can easily be seen: (this vid may or may not be available when you get to view it)
https://www.nanocosmos.de/nanostream/player.html?id=rtmp://wowza.rgsit.com/podia2016rgsitcom2200/podiapull

My player is JWPlayer 7, and the viewers will not haver flash installed, hence my need to decode the AMF data so that I can do whatever I need to with it.

JWplayer has its on('meta') but when trying to set var a = BinaryToArray(event.metadata).toArray(); , for example, nothing happens.

I have most likely got something wrong, or perhaps the method in the encoder needs to match the JW method. I really don't know.

If you have any ideas at all, it would be great to hear from you. I realise that it is a while since you built this, but it looks like it could be a really useful mechanism for retrieving such data from video streams in a world where flash is very rapidly become persona non grata, especially on corporate networks.

Many thanks in advance,

Neil.

@jamesward
Copy link
Owner

That is an interesting use case. So there is a non-Flash player (JWPlayer) that is handling the cue points but generating events with an AMF payload? If so it does seem possible that the data is parsable with this library. First thing I'd do is try to convert the data to a byte array. Then use hexdump or something to make sure the data looks like real AMF. Then there'd need to be some debugging of the AMF parser. If you get me a byte array I can take a look at it.

@neilRGS
Copy link
Author

neilRGS commented Aug 10, 2016

Hi James.
Thanks for getting back to me on this.

I am having trouble grabbing the AMF data. If I set JWPlayer to have rtmp as its source, then it loads the flash player and the cue point data comes through. Of course, in production, I can’t use rtmp as a source.
Unfortunately, chrome’s media-internals is not giving me anything and I am now looking through stacks of Wireshark docs to learn how to capture and find the data.

So I’m struggling a bit with this. I’ll let you know if I manage to grab it.

Cheers

Neil.

From: James Ward [mailto:[email protected]]
Sent: 09 August 2016 20:57
To: jamesward/JSAMF [email protected]
Cc: Neil J. McLeish [email protected]; Author [email protected]
Subject: Re: [jamesward/JSAMF] Question re implementation (#5)

That is an interesting use case. So there is a non-Flash player (JWPlayer) that is handling the cue points but generating events with an AMF payload? If so it does seem possible that the data is parsable with this library. First thing I'd do is try to convert the data to a byte array. Then use hexdump or something to make sure the data looks like real AMF. Then there'd need to be some debugging of the AMF parser. If you get me a byte array I can take a look at it.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/5#issuecomment-238671911, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AL4e01BgW7EbxBKPF9PT6DGmvZBX3A6Uks5qeNungaJpZM4JgKiI.

@neilRGS
Copy link
Author

neilRGS commented Aug 11, 2016

Hi James.

I am definitely struggling with this, so any ideas would be welcome.

It seems that the AMF payload is simply not visible on the stream, unless JW player has an rtmp source; the result being that it loads the flash player.
If I have the source set to http (as I need to), other meta data comes in - the standard stuff - but I am not able to find anything using Wireshark which looks like it might be the AMF payload.

I noticed in your code, that the BinaryToArray() function is actually VB Script. I hadn't spotted that before, for some reason. In any event, as my system has to be purely client-side, so html and JavaScript, then that isn't going to work for me.

I'll look forward to hearing any ideas you may have.

All the best,

Neil.

@jamesward
Copy link
Owner

The source is actually JS. But in order to have a ByteArray in IE, the VB Script thing is needed. That was a long time ago though. So I'm sure there are better ways in modern browsers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants