NetStream with OSMF is firing NetStream.Play.Stopped too early.
Hi,
I've been digging into a bug report where the ends of adverts are clipped by up to three seconds in Android and, after a _lot_ of painful debugging, I have come to the conclusion that the issue is with the underlying NetStream object.
After a bit of jiggery pokery to locate the NetStream on NetStreamLoadTrait, I was able to listen to the changes to NetStream.time and to compare against the TimeTrait values, also to see what events were happening where and when. After placing this code on an Event.ENTER_FRAME handler, I was able to see clearly that there is _ALMOST_ALWAYS_ a huge jump in the last two frames... This equates to clipping off the last few seconds of the video as the jump tends to occur a couple of seconds prior to the end. Having placed break-points in OSMF code, it appears that the end is "correct" in that it is always in response to a NetStream.Play.Stopped... just that the NetStream.Play.Stopped is firing at the wrong time.
Does anyone have _any_ idea what could be causing this? Is it likely to be with the media being supplied (third-party advertsing video...) or the plugin itself?
Thanks,
G
I have created a bug report here: https://bugbase.adobe.com/index.cfm?event=bug&id=3504086
Please take a look, use my supplied test script, and vote for the issue if you can reproduce it.
G
Similar Messages
-
Is there some way to download music with higher volume? It plays back too softly.
I downloaded a song for our tap class, but it doesn't play loud enough for us to hear it.
That's what iTunes -> Preferences -> Playback -> Sound Check does - equalizes the volume across tracks to provide a more-even playback.
-
Remember Reminders are firing too early
Hello all.
My remember reminders are firing exactly one hour too early. Calendar reminders and alarm clocks are fine but any reminder for a task created in the remember app is one hour premature. This is very annoying. Has anyone else met this and if so how to resolve?
I just updated to 10.2.1.2941 and hoped it would help but it hasn't.
ColmHi,
Bumping this one in hopes!
This one is a huge show-stopper as _nobody_ will be happy with the potential for losing the terminal three seconds of their adverts upwards of half the number of times they are played!
Seriously, am I the only one to have noticed this?
G -
NetStream.Play.Stop and Complete fired early on RTMPE streams
Hi there
I am experiencing an issue with playback on RTMPE streams. after investigation it seems that the FMS server is firing the NetStream.Play.Complete message at random points, indicating that a stream has ended. This is happening and random points during the stream, not even close to the end.
The order of Status messages is as follows:
Thu Oct 20 2011 04:15:17 PM :: NetStream.Play.Start : status
Thu Oct 20 2011 04:32:40 PM :: NetStream.Play.Stop : status
Thu Oct 20 2011 04:32:40 PM :: NetStream.Buffer.Flush : status
Thu Oct 20 2011 04:32:58 PM :: NetStream.Buffer.Empty : status
Thu Oct 20 2011 04:32:58 PM :: onPlayStatus : NetStream.Play.Complete
As you can see roughly 17mins into playback...although the stream is 1 hour 24mins long
I have tested this numerous times, and each time it is at a different point in the stream.
Intermittently the NetStream.Play.InsufficientBW warning is being fired prior to NetStream.Play.Stop.
I am using a player built on OSMF 1.5.
Just need to know why these messages would be fired and how to handle them
Thanks
SteveHi Steve,
Thanks for the information. Did you check with flvcheck tool to see if the file is a valid FMS file ? If not, can you do that please ? -
OSMF NetStream firing end event too early
HI,
I originally posted this here: http://forums.adobe.com/message/5067347#5067347 but I got no responses and then remembered an OSMF specific forum where I hoped I might find more help!
I've been digging into a bug report where the ends of adverts are clipped by up to three seconds in Android and, after a _lot_ of painful debugging, I have come to the conclusion that the issue is with the underlying NetStream object.
After a bit of jiggery pokery to locate the NetStream on NetStreamLoadTrait, I was able to listen to the changes to NetStream.time and to compare against the TimeTrait values, also to see what events were happening where and when. After placing this code on an Event.ENTER_FRAME handler, I was able to see clearly that there is _ALMOST_ALWAYS_ a huge jump in the last two frames... This equates to clipping off the last few seconds of the video as the jump tends to occur a couple of seconds prior to the end. Having placed break-points in OSMF code, it appears that the end is "correct" in that it is always in response to a NetStream.Play.Stopped... just that the NetStream.Play.Stopped is firing at the wrong time.
Does anyone have _any_ idea what could be causing this? Is it likely to be with the media being supplied (third-party advertsing video...) or the plugin itself?
Thanks,
GHi,
Bumping this one in hopes!
This one is a huge show-stopper as _nobody_ will be happy with the potential for losing the terminal three seconds of their adverts upwards of half the number of times they are played!
Seriously, am I the only one to have noticed this?
G -
NetStream.Play.Stop : Problem:
Hi,
I have develop video streaming application with Flash Media server 3.5 + and Use Dynamic stream feature , this player work correct in all way but issue with NetStream.Play.Stop() command set while playing video without EOF
i.e video file .f4v format has 30 sec lenght ,
-player face NetStream.play.stop() command @ 2.30 without indicate any stop command ,its automatically halt but last 0.30 is remaning.
Any idea regarding this dobet please help me ..
Thanks ,
aQuestion 1: When I put the .FLV files to play in the
"\streams\_definst_" of
the application directory of the Flash Media Server
installation, does that
automatically turn it into streaming FLV and no longer
progressive FLV?
The distinction between progressive and streaming is the
NetConnection.connect
Question 2: What's the best way to detect or to signal my app
that the
streaming FLV has completed playing?
Not sure what the best way is. But I subclass the NetStream
class similarily
to how it is presented in the Flash Communications Server
book example 5-5.
http://www.flash-communications.net/sourceCode/index.html
It uses a combination of NetStream.Play.Stop and bufferLength
== 0 as one
signal to toggle a stopped state flag and
NetStream.Buffer.Empty and that
stopped flag as another signal. The stopped flag is turned
off on the next
NetStream.Play.Start.
Lon Hosford
www.lonhosford.com
May many happy bits flow your way!
"naz404" <[email protected]> wrote in
message
news:e3ffu4$a6c$[email protected]..
Hi. I built a dynamic FLV player using XML playlists but
using progressive
downloads.
I've been trying to migrate it to a Flash Media Server 2.01
solution, but
after I did,
"NetStream.Play.Stop" no longer seems to be happening
properly.
Question 1: When I put the .FLV files to play in the
"\streams\_definst_"
of
the application directory of the Flash Media Server
installation, does that
automatically turn it into streaming FLV and no longer
progressive FLV?
Question 2: What's the best way to detect or to signal my
app that the
streaming FLV has completed playing?
Also, "NetStream.Play.Complete" never seems to occur, even
if the stream
has
completed playing.
Thanks! -
Subscribe immediately followed by Netstream.Play.Stop
We are in general successfully using Stratus with our
redesigned, previously fully FMS3(TCP), coaching application.
We still do all non-audio/video comms, including the
signalling for audio/video and chat, the traditional way, using
shared objects.
Now we have one customer with whom we can't get audio/video
going this way. All other things work. We get a peer id from him,
then subscribe to that, but the subscribe is immediately followed
by a Netstream.Play.Stop event.
With the Stratus sample app we get nothing going at all.
Although my suspicion goes to local firewall and NAT issues,
I still would like to hear your interpretation of this sequence of
events. We have lately seen no other firewall/NAT issues, so I
wondered whether NAT is still an issue with Stratus and a potential
cause of this type of behaviour?I posted the following message to the FLASHMEDIA mailing list
about a month ago about how to use a server I run in my garage
http://cc.rtmfp.net to test
NAT/firewall properties:
IF the connection to cc.rtmfp.net has the same properties as
the connection to/from the peer, then the results can be used to
make a good guess as to whether or not a peer-to-peer connection
can be formed. The fact that the connection in some cases does NOT
have the same properties is why the results can't be relied upon
completely. (As an example, two peers in the same organization
behind the same firewall have different properties between each
other than they each have to cc.rtmfp.net)
In order to guess, one needs to know that there are different
types of NAT behavior. (I'll use the older common terminology
below, rather than the new recommended terminology, as most people
know the older terminology better):
Some reuse the same address and port when talking to
different peers
("cone") and some pick a new address and port ("multiple IP
address,
symmetric") or the same address but new port ("single IP
address, symmetric"). There is also different filtering behavior of
NATs and firewalls. (Note that a firewall may filter and not be a
NAT, or a NAT can also act as a firewall and have filtering). The
typical kinds of filtering behavior are none (for a cone NAT we
would call that "full cone"), restrict to only talking to addresses
we have talked to before ("address-restricted"), and restrict to
only talking to addresses AND port numbers we have talked to before
("address- and port-restricted").
There are also firewalls that block UDP entirely.
Unfortunately, there are also even more complicated NAT and
firewall behaviors that aren't easily characterized. For instance,
some act as a symmetric NAT that preserves port numbers at first,
then when they run out of resources they switch to being a cone
NAT. Some act as one type of NAT for the first client that connects
to a server, then a different type if a second client behind the
NAT tries to connect to the same server. So this is another case
where a simple analysis, like the one performed by cc.rtmfp.net,
can fail to properly predict what will happen for the peer-to-peer
connection.
But, if the connection to cc.rtmfp.net has the same
properties AND the NAT or firewall has predictable behavior, here's
what the results mean:
At the top, a successful RTMFP connection will result in
"Analysis Complete". If you don't get that, UDP is probably
blocked. (Or the cc.rtmfp.net RTMFP server has a problem... it runs
on a machine in my garage, with no redundancy)
The for each yes/no answer, there's the following meaning:
"Knows public IP address of self" means that the Flash
Player's idea of its local addresses has one address that matches
the one that cc.rtmfp.net saw when the connection came in. If that
is the case, there's no address translation.
"Public UDP port number same as local UDP port number" means
that the Flash Player's idea of which UDP port number it is using
matches what cc.rtmfp.net saw when the connection came in. If that
is the case, there's no port translation. So if this and the above
are "yes", then there's probably no NAT of any kind (but there
still might be a firewall)
"Can receive from same IP address, same UDP port number" is
always true, because if you couldn't do this you couldn't establish
the initial connection.
"Can receive from same IP address, different UDP port number"
tells you whether or not your firewall is "port restricted",
requiring an outbound connection to the same address AND port
number before inbound traffic is permitted from that address and
port number, even after traffic was sent to the same address but
different port number previously.
"Can receive from different IP address, different UDP port
number" tells you whether or not your firewall is "address
restricted", requiring an outbound connection to be made to a new
IP address before inbound traffic is permitted from that IP
address.
"Can send to different IP address after server introduction"
should always be true if the initial connection can be made
because, unless there is very strange firewall behavior, this is
just like opening a new RTMFP connection initially. If this fails
then either there's a problem with how the player received or
treated the introduction request, or the firewall is totally
unpredictable.
"Source IP address is preserved from original connection"
means that either you have a cone NAT, or a symmetric NAT with only
one IP address, or a symmetric NAT with multiple IP addresses *but*
the same address happened to be used this time. If repeated tests
cause this to change between yes and no, then you have a symmetric
NAT with multiple IP addresses, and sometimes you happen to use the
same address.
"Source UDP port number is preserved from original
connection" means that you have a cone NAT. If this is "no", then
you have a symmetric NAT.
Now, how does this tell you what will and won't work?
Symmetric NATs break peer-to-peer connectivity in some cases.
Flash Player can work with almost all cone NAT configurations
(though with some caveats if there are multiple layers of NAT
and/or lack of "hairpinning" support), and many firewall
configurations, but symmetric NAT in combination with certain
firewall or NAT cases at the other end blocks the ability to
establish a peer-to-peer connection.
If one end is a symmetric NAT with a single IP address, then
connections to peers behind other symmetric NATs or behind
port-restricted cone NATs (or port-restricted firewalls) are
impossible.
If one end is a symmetric NAT with multiple IP addresses,
then connections to peers behind other symmetric NATs or behind
address-restricted (and likely port-restricted) cone NATs (or
address-restricted or port-restricted firewalls) are impossible.
This is because no matter what the Flash Player tries to do
to "punch a hole" through the restricted cone NAT or restricted
firewall in order to let the other peer through, the other end
keeps moving to a new address and/or port number that doesn't match
up, so the hole that was created is no longer applicable.
The best choice is to allow UDP traffic through and to use a
NAT and/or firewall device that complies with the NAT
implementation recommendations of the IETF BEHAVE working group.
Alternatively, an organization may choose to use the TURN proxy
support in the player to send traffic to a proxy in a DMZ that can
comply with those recommendations.
Application developers may also want to create fallbacks to
client-server RTMP and/or RTMPT in order to cover the cases where a
firewall or NAT blocks a direct peer-to-peer connection. It depends
on whether you want your application to always work, or you want to
never have to relay media through your server.
Matthew Kaufman -
How can I append multiple parts to NetStream with appendBytes
Hi,
I hope someone can help me.
Problem:
I load a flv file with the FileReference class. After that I append a part of the ByteArray to the NetStream with appendBytes.
Later I want a next part append to the NetStream. It doesn't work.
Is that possible?
Code:
public function init():void
myFileRef = new FileReference();
myFileRef.addEventListener(Event.SELECT, selectFile);
myFileRef.addEventListener(Event.COMPLETE, playFile);
myOpenButton.addEventListener(MouseEvent.CLICK,browserForFile);
private function browserForFile(e:MouseEvent):void
myFileRef.browse([new FileFilter("Flash-Videos (*.flv)", "*.flv;")]);
private function selectFile(e:Event):void
myFileRef.load();
private function playFile(e:Event):void
byteArr = myFileRef.data;
var bytes:ByteArray = new ByteArray();
byteArr.readBytes(bytes, 0, 3031964);
_netConnection = new NetConnection();
_netConnection.connect(null);
ns = new NetStream(_netConnection);
ns.addEventListener(NetStatusEvent.NET_STATUS, netStreamStatusHandler);
ns.client = new Object();
display.attachNetStream(ns);
ns.play(null);
ns.appendBytes(bytes);
videoDisplay.addChild(display);
private function loadNext():void
var bytes:ByteArray = new ByteArray();
byteArr.readBytes(bytes, 3031964, byteArr.bytesAvailable);
ns.appendBytes(bytes);
friendly
DanielEnable the menu bar with Ctrl+B. Then use File > Add Folder to Library.
tt2 -
Loading, playing in "sync" multiple videos with OSMF
Hi All,
I've just started to use OSMF in a Flex project.
I was wondering if it was possible to manage loading 2 videos with OSMF, start playing both videos when they're both downloaded (or when there's enough data downloaded to play them both)
Both videos have the same length, but I was just wondering if there was a way to do that
Thanks for the helpThanks for the answer Ryan,
Exactly what I was looking for.
To take things a bit further, I was wondering if you could tell me if the following was possible (or if the OSMF is meant to be used this way) :
I'm developing a flex application using the OSMF, I'd like to use the parallel element (two videos), have of it's elements be displayed in a flex canvas, and have the second element displayed in another canvas, I'd just like to know if that's possible/logical
Thanks for your help
Julien -
Simply loop a video with a play/stop button in the middle?
Hello, I am new to flash but I have CS4, so I have all the tools.
I have a .mov file and I want to simply encode the video (i assume with flash media encoder) to be a flash file which loops continuiously with a Play/stop button. I'll then have this movie playing on my html page...
How would i best achieve this? I cannot figure it out using the encoder!Easiest way is to import the mov directly into Flash, follow the importing prompt, embed inside of a movie clip to loop. add your buttons on top and code to stop(), and play().
-
my ipod nano 6th generation plays , stops , fast foward and rewinds songs by itself. it also speaks song titles non stop even with the setting off . please help me.
Found this solution in another thread, what you want to do is go into the Nike Fitness thing, go to run, go to Spoken Feedback and set it to off. This should fix your problems.
-
I had installed DivX and it includes DivX Web player but, when i remove it, the problem happend. When I click on a video, the bar which contains play, stop... buttons is there. But when the video nearly play, it disapears. The problem just happen with Firefox and Chrome, but it doesn't mean with IE. Help me plz, I hate using IE just love FF but the problem prevent me from watching video on youtbe which is very terrible with me.
This is my problem, see the picture.
-
Google IMA integration with OSMF?
Hi there
Just wondering if anyone has had any experience integrating the Google IMA library into an OSMF, am struggling for ideas as to the best possible method.
http://code.google.com/apis/ima/docs/sdks/googleflashas3_apis.html#AdsManager
The integration requires a Video Class Object to be passed to it in order to playback a video ad, and record the impressions correctly.
As the ads are intended to be pre-rolls, I am trying to use the same Video screen of my OSMF player - but i cant get access to it from the OSMF api !
I am trying to prevent having to create a separate video class screen object just to play ads and add/remove it when necessary.
Any suggestions welcomed!
Thanks
SteveHi Steve,
Obviously can't post the whole thing as it is proprietary code for a customer, but here is a snippet; this is the play trait:
[code]
package XXXX {
import flash.net.NetStream;
import org.osmf.traits.PlayState;
import org.osmf.traits.PlayTrait;
public class GoogleIMAPlayTrait extends PlayTrait
public function GoogleIMAPlayTrait(ns:NetStream=null)
super();
netStream = ns;
public function get netStream():NetStream {
return _netStream;
public function set netStream(ns:NetStream):void {
_netStream = ns;
// this.setCanPause(_netStream!=null);
private var _netStream:NetStream;
* Called immediately before the <code>playState</code> property value is changed.
* <p>Subclasses can override this method to communicate the change to the media.</p>
* @langversion 3.0
* @playerversion Flash 10
* @playerversion AIR 1.5
* @productversion OSMF 1.0
override protected function playStateChangeStart(newPlayState:String):void
if(netStream) {
switch(newPlayState) {
case PlayState.PAUSED :
netStream.pause();
break;
case PlayState.STOPPED :
break;
case PlayState.PLAYING :
// Assume that netStream from ad has already had play start
// so that this is just an "unpause" command
netStream.resume();
break;
private var paused:Boolean = false;
[/code]
Process was quite straightforward, though, this is what I did / do:
1. Extended LoaderBase to build a GoogleIMALoader class
2. Extend LoadableElementBase to build a GoogleIMAMediaElement class
3. Implement custom traits for all the things I need to control as per the above
4. Create a MediaFactoryItem that will recognise my advert resources to map them
5. Register the MediaFactoryItem with the DefaultMediaFactory
That way, I can send advert URLs to my MediaFactory in the same way as for any other media and they will seamlessly blend into the OSMF player.
G -
Creating Dynamic Audio/Video with OSMF Framework?
Hi All, Thanks to this forum and the OSMF framework - I learn ways to improve my application each day with OSMF. I am experimenting creating dynamic sound as well as video and was wondering if that is possible with the OSMF framework. Can I write a plugin that will allow me to stream a media file and modify it before playing it in the flash player? I could do this with the sampleDataEvent in Sound class and also had some success using netstream appendBytes in flash 10.1. Can i use the OSMF framework for such applications? Does the plug-in architecture allow me to create a media element as a byte array ?
ThanksTony
Let us back track through the details.
Premiere Elements 11 on Windows XP 32 bit.
What are the video compression and file extension of the file created in PowerPoint? What version PowerPoint? What is the frame size and frame rate?
What are the audio compression and file extension (mp3 or .wav) of the audio created with this Cubase software? Are you dealing with mono, stereo, or 5.1 channel?
From your description, it sounds like you are letting version 11 set the project preset for you. What is it setting? We can find that out from the reading under Edit Menu/Project Settings/General - Editing Mode, Timebase, Frame Size, Pixel Aspect Ratio, even if the fields appear to be grayed out.
If you import your .wmv export back into the Premiere Elements project, do you see content in both the video and audio tracks? If so, do both play back when you press the play button of the Edit area monitor?
Have you checked Edit Menu/Preferences/Audio Hardware and ASIO and have you checked out your audio in the Edit area with the Audio Meter opened to verify sound level? See Window Menu/Audio Meters.
Is the problem confined to this PowerPoint video and Cubase audio? What happens if you try this with a video from your camera and soundtrack from one of the SmartSound soundtracks?
Please review the above and then let us know the answers to the questions.
Thank you.
ATR -
Flash CS3 Play/Stop audio button problem
I made a play/stop audio button with this youtube tutorial (youtube.com/watch?v=XU6oMEFUFF8) but after the sound is finished I want the play button to show up agian.
Here is the actionscript:
import flash.events.MouseEvent;
play_btn.addEventListener(MouseEvent.CLICK,clickha ndler);
stop_btn.addEventListener(MouseEvent.CLICK,clickha ndler);
function clickhandler(event:MouseEvent):void{
swapChildren(play_btn,stop_btn);
what code should I add to my current code?
I also can send you the Fla.You should consider using the Sound class. Here's a quick overview of it:
http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d21.html
You'll be able to add event listeners to the sound to know when it completes so you can execute more code, such as swapping the play and stop button. There is an example in that overview of listening for the SOUND_COMPLETE event (e.g. channel.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete);). It should contain everything you need.
A basic example of what you'll end up with (there's many ways to do it) might look something like this:
// just set up and wait for click
var isPlaying:Boolean = false;
var mySound:Sound = new MySoundInLibrary();
var myChannel:SoundChannel = new SoundChannel();
myChannel.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete);
// buttons
play_btn.addEventListener(MouseEvent.CLICK,clickhandler);
stop_btn.addEventListener(MouseEvent.CLICK,clickhandler);
function clickhandler(event:MouseEvent):void
swapChildren(play_btn, stop_btn);
if (isPlaying)
isPlaying = false;
myChannel.stop();
else
isPlaying = true;
myChannel = mySound.play();
function onPlaybackComplete(e:Event):void
isPlaying = false;
swapChildren(play_btn, stop_btn);
The basic idea is keeping a flag if the audio is currently playing. If it isn't then assign the sound to a channel and play it while setting the flag (isPlaying) to true. If it's already playing, set the flag to false and stop playing the audio.
The swapChildren is run in the onPlaybackComplete() method so when the audio completes the play button is swapped back in front.
Rather than swapping the children I'd urge you to toggle the .visible property instead. It's easy to run commands in the wrong order and get desynched on depth.
Maybe you are looking for
-
I have a vi that will not let me make many edits before it crashes.
I have been working on a data acquisition program for over a year. Over time it has grown and become more and more complicated. Now the vi will no longer let me make substantial changes. After making edits, when I click, save, LabView crashes. There
-
Which G/L accounts to be created as Cost Elements
Hi I wanted to know which G/L accounts should be created as cost elements since there are some G/L accounts that are usually not created as cost elements. Wats the logic that one needs to keep in mind while creating cost centres?
-
how to unlock iphone 5 backup ?
-
Prob with Swing Refreshing --Help Me
Hii I have created a GUI in Swings, i need to apply some changes with one button click, but the changes dont get implemnet till i minimise and again maximize the frame, I am using repaint() method to get it refresh ,but it wont work Pls Help me if u
-
Why can't I burn my slide show made in photoshop elements 13 to DVD.
PE 13 makes a nice slide show, but I can't share it with anyone. I can only play it on my computer. How do I burn it to DVD. It does not give me that option. Do I have to buy an upgrade to be able to do it.?