-
Notifications
You must be signed in to change notification settings - Fork 263
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
How to listen for ID3 metadata using flowplayer #194
Comments
You can access the clip's metadata by grabbing and evaluating the clip's |
I've tried |
Hi @stephendeyoung , I would first advise you to test your stream with either chromelessplayer or bin/debug/flashlsFlowplayer.swf and enable debug logs and see if you can get any logs related to ID3 tags on the JS console : the following line should output something : |
@mangui I'm segmenting using OS X's mediafilesegmenter, and then checking debug log in JS console – don't see onID3Data() being triggered :( Has anybody tested ID3 functionality of flashls? |
hi @dusterio https://github.com/mangui/flashls/blob/dev/src/org/mangui/hls/demux/TSDemuxer.as#L641-L674 plz share a log including debug/debug2 Cheers |
@mangui yes, I'm following debug/debug2 logs, there is only one mentioning of ID3: I don't see onID3Data() triggered anywhere, there are no errors mentioning ID3 either. |
ok are you able to get metadata displayed on iOS ? |
Sorry for the late reply – I've been experimenting with different approaches. I have this demo stream (VOD): http://demo.rapport.fm/test/prog_index.m3u8 I can play it fine in iOS and I can see/parse ID3 metadata. However, Flashls just halts (stops playback) once it reaches the first ID3 tag at 10 seconds. I checked debug logs – couldn't see anything special. |
I got a bunch of parsing warning msg with your stream but it is playing fine and I can see logs with ID3 tags with latest flashls release (0.4.0.x) |
@mangui oh yes, I see that you have updated Flashls – I was using a 1-2 month old package. I tried playing the same stream directly from your official page: http://www.flashls.org/latest/examples/chromeless/, the stream plays fine but regarding the ID3s – I only see warnings: [Log] DEBUG:TS: Selected ID3 PID: 259 How do I get access to contents of the ID3 packet though? |
@mangui since Apple HLS tools work only under MAC OS and nobody ever made an open source analogue, I had to write my own: https://github.com/dusterio/hlsinjector I'm creating Apple-compliant TS stream with metadata, it plays well in iOS. However, Flashls still issues the warning: What's exactly meant by bad TS segmentation here? I cross-checked my stream several times – everything is accurate. |
it means that at the beginning of your ts packet, there is some data found on ID3 pid before any payload start has been found on this pid |
@mangui well, I followed the format of Apple HLS tools. At this moment I'm going through Flashls source code – I will try to find the cause and revert here. PS. iOS and Safari desktop play the very same stream fine. |
you need to check the header of your first Id3 TS packet. |
it might not have a payload start unit indicator |
@mangui the indicator is set to 1 and there is only one TS packet because the whole ID3 content fits in one frame. These are my TS & PES headers, following Apple standard: Once again, iOS and Safari play it fine, and meta data is accessible. Therefore I tend to conclude there is a "bug" (more of a misinterpretation probably) in Flashls code. |
strange. if all packets are like this one this should not happen. could u share a playlist with which i could repro ? |
@mangui Sure: http://demo.rapport.fm/test2.m3u8 This is actually the full, correct ID3 tag |
Some further research: If debug2 is on, I can see two lines in a row that shouldn't actually go together: Going to TSDemuxer.as, lines 699 and on: And then further from lines 712: While I don't have any experience with ActionScript, it does look like in case of full, complete ID3 packet _curId3PES will be set to null and then later on a warning will be issued (like if there was no _curId3PES). So a warning is actually guaranteed! If I'm right, this warning can simply be ignored. I don't see ID3 events in ChromelessPlayer.as, so, I suppose, Javascript is not notified of incoming metadata at the moment. Do you plan to add it soon? |
Hi @dusterio , indeed in your case this warning could be ignored. I will fix this spurious warning |
@mangui thanks, that was quick! |
So with regards to my original issue is it possible to listen to timed metadata events using flowplayer? I can catch events using the |
@stephendeyoung as far as I understand, that's not related to Flashls/flowplayer anymore. if you play it on device that "naturally" plays HLS (Safari desktop, iOS, etc) – I don't think you will be able to catch the event. For iOS, I would suggest to implement it in an app using MPMoviePlayer or AVPlayer, then you can listen for ID3 metadata... Playing in the browser natively – I seriously doubt... |
@dusterio It used to be possible to do this by embedding a Quicktime object and then using the JS API for Quicktime to listen for timed metadata events: Unfortunately in iOS8 the Quicktime JS API no longer works so we were hoping we might be able to use flowplayer and the flashls plugin to catch the metadata events. |
@stephendeyoung please let me know if you find a solution ;-) I would be very happy to be able to parse metadata in browsers under iOS |
@dusterio I've asked a question on Stack Overflow about this: That explains a bit more about some of the information I've found. |
@dusterio I've found a solution to this now. You can use HTML5 "in-band metadata text tracks" to catch the metadata: http://stackoverflow.com/a/31433502/776472 I don't know if this could be wired into the flashls plugin in some way so that you can use the standard Flowplayer |
@stephendeyoung wow interesting! thanks a lot for your research, I'm going to play with this functionality now, too :) as far as I understand, you cannot do it in Flashls – simply because it's Flash. You have to do it somewhere beforehand, in JS – eg. Flowplayer or your own JS. |
Using flowplayer I want to listen for ID3 metadata when it's embedded into the stream. I found this bit of ActionScript code that dispatches an event to the clip in flowplayer:
2cd5287#diff-c64e94b06201787635a3704e6e6cdcc2R96
How would I listen for ID3 events in flowplayer?
The text was updated successfully, but these errors were encountered: