Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Start and Stop points with RTMP streams

32 replies [Last post]

Does the JW FLV Media Player support setting start and stop points in the playlist on each file?

For example, in my playlist I want to be able to point to an mp3 from a rtmp stream and say start playback from 00:00:15 and finish playing at 00:00:30.

I don't want the user to be able to play the entire file.

Can the player do this or does this have to be done in javascript?

Any help would be greatly appreciated!

The v3.x players only support the start parameter for RTMP streaming. Use it like this in a playlist:<meta rel='start'>15</meta>Seconds only.

If you can execute PHP scripts on your server, you can use a modified stream.php script that supports start and end/duration parameters for HTTP download NOT RTMP. If you would like to try that, I can post the code and an example location element.

Or you can use the RTMP start parameter to seek to the start position and JavaScript to stop the player when it reaches the end position.

@comedian

Thank you for your reply! We are using rtmp streaming so I will use the start parameter. PHP is not an option, so If I understand correcly the player doesn't support stopping without using javascript?

Can anybody give a tip on how the flash code it self could be edited to stop at a given seconds parameter?

Thanks,

Brandon

The start points are indeed already there. They work good with every streaming type. I'll take a look at the 'end' points.

Is there anyway that we can use the start and end points to act as trimming points where the user cannot play any part of the file outside the points we set?

For example if I have an mp3 file that is 1 minute long but I only want the user to be able to play starting 20 seconds in and finishing 20 seconds before the end. So to the user the file would only appear to be 20 seconds long.

Any tips on accomplishing this?

Thank you for any assistance.

@Brandon

maybe you can do like the "snippetplayer" demo on the demopage: (note the demo uses a v.3.x player and swobject v.1.5)

http://home5.inet.tele.dk/nyboe/flash/mediaplayer/snippetplayer.htm
http://home5.inet.tele.dk/nyboe/flash/mediaplayer

note though that this method is not suited for fileprotection as such, as the full file and url will be available in the browser cache

Could someone help with with getting the RTMP to work? For some reason I can't get my file to show up.

Can I use flashvar "start" and "duration" to accomplish this effect? 4.1 FLV player came out, but did not include "End" as was suggested by JW

@David,

start works with an RTMP server, LightTPD, or a script for "fake"streaming. start also works with progressive download if the media file is small and the download is fast; otherwise, the user has to wait for the media to download to the start point.

end is not yet supported, but can be used with a serverside script that utilizes ffmpeg to determine the end point of the media file.

any 'end' succes? trying in 4.2 and not working yet...

No indeed. It's not there yet. Still working on this.

Can we assume this partial playback of a larger file will take up the entire scrubber length?

And is there any estimate for which version this will be included in?

Thanks!

I took a look at this for the 4.3 release. There's actually two mechanisms:

* With a 'start' flashvar, one is now able to jump into a specific file. This can be used for chapter lists, and it already works.
* With the 'duration' flashvar, one can set the duration of a video manually. In the 4.3 player, the player actually respects the duration you set, prefering it to what the metadata of the file says.

So the showing of only a part of the file (taking the entire scrubber length) is possible in the 4.3 player. The start is always 0 though, since that flashvar is used for jumping into files.

The defining of a specific part in a video is also already working, through the 'start' flashvar. With this, one can create chapterlists. The only flaw here is that the player doesn't automatically rollover to the next chapter yet after a breakpoint has been changed. That is something that has to be done with a more custom controlbar though (whick will send ITEM calls when scrubbing to a new position). Such a bar (Hulu-style, with preview images) is in the making as a plugin.

Excellent, when are you planning to release version 4.3?

Next week or so? If you checkout the subversion trunk, you'll actually have the 4.3 version already (though it's not completely tested yet).

Sorry, if you speak about issue that interest me!

Does it possible to jump any where in the video (for long video), before buffered? I mean any where=any second where I like to move the slider?

Please respond me.

@Valon,

To jump ahead of the download, you have to use a streaming server.

1) LightTPD with the streaming mods.

2) RTMP such as FMS, Wowza, or Red5

3) "fake" HTTP streaming using a serverside script such as the XMOOV script.

Use Search this Site and Google to find more information.

there is an issue with using "start" and "duration" in 4.3. from svn (yesterday)

The problem is if you say start 10, at tenth second, the progress bar starts from the 10th second (ie middle if duration is 20). Shouldn't it display 10th second as second 0 - the beginning of the content. This would make much more sense for virtual scenes,... which we heavily utilize. I think for majority that would be better than the current solution (and duration does cut the last part of the scene, but start doesn't do the same with the first)

does anyone know how to solve this?

I'll take a look at this. I'll first have to think if there's any behaviour we break this way. If not, then your suggestion is the way to go (shouldn't be too hard to implement anyway).

kLink thank you.
But please help me more. I cannot include xmoov.php in Joomla plugins for video publishing! I have tried with moseasymedia, AllVideos. And I dont have idea how to include xmoov.php once for all published videos.

Please kLink, nobody know to answer this question!!!

Hello I am new to the thread, I have an MP3 player which always starts from the first song in the list each time I start, is there a way I can set it so that it starts from the song it played last?
thanks for the help

I am using the player start, stop and respectduration flashvars on a RTMPT stream. This works like a dream for the end point. The start point isn't working the way I expect it to. The scrubber starts at the actual 0 of the stream, and then seeks start flashvar value. The user can scrub back to something before the start flashvar.

Is there anyway possible to get the videoscrubber to only display the the start point to duration and nothing before? Is this something being worked on? Or has this been resolved? Thanks

Naomi, I asked this same question and the answer I got from someone at longtail was:

"This functionality is indeed not in the Player, and we're not planning to support this. It's too specific to certain RTMP servers and won't work with all other streaming formats. We only support the ability to restrict the duration (if your video is ten minutes and you want it to be only one, you can set "duration=60&respectduration=
true in player 4.4)."

So no, you can't do this, and it's not being worked on, and it won't be worked on. It's frustrating because the player I'm using instead has several bugs, but I can't switch over to JW because this functionality is essential for our site. It seems we're left with the option of creating our own player (or trying to modify JW). However, this would be too expensive in terms of developer time so we're stuck with what we have.

Thanks very much for posting Longtail's response. It's dissapointing when the functionality was half way there in the last player!

I've been resisting it, but I think its getting to the point now where there may be enough of an argument to actually create a bespoke player.

Another way to deal with this situation, is to use ffmpeg to re-mux the main video into clips.

ffmpeg re-muxes very fast, so there is only a slight delay the first time that the clip is requested. The clip is also saved in a cache, so on subsequent requests, the clips are served from the cache, reducing the server load and making everything zippy fast!

You just need a simple PHP script & ffmpeg.

If you want to use an RTMP/T server, just copy the cache of clips to your server's stream directory.

Better, faster, and zippier, is to use a fast server like nginx to serve the clips.

I have code
How I can use this
I treid with RTF Player to view this but it did not work.

Any work.

rtmp://fms187.blogtv.com:1935/BlogTV/stream&id=229714_206741&autostart=true

http://www.zahipedia.com

Hi Zahid,

I'm not quite sure I understand - could you please explain your issue in a bit more detail?

lost,

So all I need to do is:

1) Convince my client to buy a server to run PHP for this task
2) Write code to make the PHP server do all this
3) Convince my client to use ffmpeg every day to split their broadcasts into separate clips

You know, it would be a whole lot easier if I could set a flashvar. That would take about 1 minute. Your approach would take days or weeks, and it would cost my client thousands of dollars. On top of that it would require them to pay someone to do the splitting every day - that's work they don't have to do right now. I think we'll just stick with our current flash player, even with its problems, since we don't have infinite money and time.

@Michael,

You're wrong on all points.

1) Virtually every server already has PHP, after all, it's "The Language of the WEB".

2) I would be happy to share proven, working code, so there is no work for you or anyone else to do.

3) Nobody has to do anything that they aren't already doing. Once the playlist is finished, running it once (repeat=list) creates the clips.

My approach doesn't cost anybody anything.

Meanwhile, you're depriving your client of the functionality they need.

lost,

1) Our servers do not run PHP. But that's not the point - even if they did, they have specific roles and can't be burdened with other tasks. We would definitely have to buy a new server to do this.

2) Your code can't magically split all of our videos. Even if I could utilize your code, I'd need to write more code to make it work in the end.

3) What playlist? There is no playlist. We have to run "it" once? What's "it", and how is running "it" not additional work?

The current player we're using has problems like "no sound on macs every once in a while.. goes away with refresh", but it's not a deal breaker, and we have all the functionality we need. So I'd like to try out JW Player to see if it does not have these problems. But to do that, we'd need to completely change our production process, and yes your approach would cost thousands (likely tens of thousands) of dollars.

Your company obviously needs to hire some competent professional help.

And you need to get psychiatric help for your mental disorders.

Why are you so viciously attacking some stranger who never did you any harm, but only offered to help?

    ...because you're sick — very sick!