Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Possible to adjust playback speed (framerate) ?


I would like to be able to adjust the playback speed of a video. Is this possible? Maybe some way to change the stage framerate?

Thanks for any ideas!

RKM

21 Community Answers

JW Player

User  
0 rated :

If it's an FLV, the player will play it back at whatever framerate the video was originally encoded at.

So, unless you need to change the framerate on-the-fly, just encode at whatever framerate you want the video displayed at.

JW Player

User  
0 rated :

I am sorry I was not clear. I want to play it back at faster or slower than real-time and I want the rate set by the user.. So if I encoded at 30 fps I want to play it at 15 fps so it is in slow motion (for example). It is H.264 encoded in an MP4 container. It plays just fine currently at normal speed but the user needs to be able to slow it down or speed it up. If it could be done dynamically during playback that would be even better.

JW Player

User  
0 rated :

It's not possible in the current JW Media Player and i don't have any idea of how difficult it might be to implement.

You might consider embedding VLC player which has 2X, 4X, and 8X.

JW Player

User  
1 rated :

There is a way to do it through active script, You can do it through a streaming server like red5 but that takes bandwith and server power. if you do have a streaming server setup you can do this. JW plays the video at 20 frames per second so the calulation is 0.03. if you know code u can edit this for yourself.

<script type="text/javascript">
function forwardCount(fgtmn){
var grm = Math.round(currentRemaining);
if(grm != 0){
if(rs == 0){
fs = fgtmn;
document.getElementById('txt').value=grm;
c=c+1;
forwardtime();
if(fs != 0){
f=setTimeout("forwardCount(fs)",100);
}
}
}else{
stopCount();
}
}

function reverseCount(rgtmn){
var grm = Math.round(currentPosition);
if(grm != 0){
if(fs == 0){
rs = rgtmn;
document.getElementById('txt').value=grm;
c=c+1;
reversetime();
if(rs != 0){
r=setTimeout("reverseCount(rs)",100);
}
}
}else{
stopCount();
}
}

function forwardtime(){
if(state == '2'){
sendEvent('mediaplayer','playpause');
}
var grm = Math.round(currentRemaining);
if(grm != 0){
var gupd = (currentPosition) + 0.03;
sendEvent('mediaplayer','scrub',gupd)
}
}

function reversetime(){
if(state == '2'){
sendEvent('mediaplayer','playpause');
}
var grm = Math.round(currentPosition);
if(grm != 0){
var gupd = (currentPosition) - 0.03;
sendEvent('mediaplayer','scrub',gupd)
}
}
function stopCount(){
fs = 0;
rs = 0;
clearTimeout(f);
clearTimeout(r);
}
</script>
<input type="button" value="full reverse!" onClick="reverseCount('1')">
<input type="button" value="single reverse!" onClick="reversetime()">
<input type="button" value="Play/Pause" onClick="playpau();">
<input type="button" value="single forward!" onClick="forwardtime()">
<input type="button" value="full forward!" onClick="forwardCount('1')">

JW Player

User  
0 rated :

According to posts by Jeroen, the JW Media Player plays FLV video at whatever rate it was encoded at.

See the last post in this thread: [url=http://www.jeroenwijering.com/?thread=6829#msg49593]*MOVIESTAR: H264 MP4 PLAYBACK*[/url]

I do have a Red5 server with lots of cycles available and 100MB bandwidth, so I'm going to try your code.

JW Player

User  
0 rated :

i don't have it perfect but you can change the 0.03 to what ever you want that decides how much the frames are moved ahead.

JW Player

User  
0 rated :

Thanks for the feedback and the suggestions.

As streamBabie suggested I downloaded VLC and was able to embed the player control and play a movie very easily. Unfortunately the "speedUp" and "slowDown" methods are not exposed by the ActiveX control.

philcol's suggestion is very novel and I greatly appreciate the effort and the code snippets. The problem is that you can only 'scrub' to the nearest i-frame when playing a video and standard MP4 i-frames occur at 0.5hz. I already use this idea to implement jump forward and jump back buttons and it works well for that though.

It seems from the research I have done that what I need to do it cause an ActionScript property to be adjusted. The "stage.frameRate" value will do what I want (I believe). Unfortunately I know nothing about ActionScript.

JW Player

User  
0 rated :

So it appears I would need to have a method added that set the "stage.framerate" added so that I could call it just like i currently call the existing methods. Something like (for ease of development and testing I have a ShockwaveFlashObject embedded in a .NET form so the following example is C#)....

int fps = 15;
String xml = "<invoke name=\"setframerate\"returntype=\"xml\"><arguments>" +
"<string>framerate</string><number>" + fps.ToString() +
"</number><undefined/><string>OVP</string></arguments></invoke>";
axShockwaveFlash1.CallFunction(xml);

Can somebody tell me if there is an existing static method to allow setting of properties? Or is there any way to extent the player to have additional methods?

Sorry if these are dumb or ignorant questions. I am a pretty competent Windows developer but all of this Flash is very new to me.

JW Player

User  
0 rated :

i found this code snippet for fast forward and reverse but don't know where to put it in the code could someone please help me out, alot of people have been asking for this. here is the blog where i found it. This would greatly enhance the player.
http://www.quip.net/blog/2007/flash/actionscript-20/how-to-fast-forward-rewind-video

var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
videoPlayer.attachVideo(ns);
ns.play("externalVideo.flv");

var id:Number;

ff.onPress = function():Void {
id = setInterval(function():Void {
ns.seek(ns.time + 0.5);
}, 100);
}
ff.onRelease = function():Void {
clearInterval(id);
}

rw.onPress = function():Void {
var dest:Number = ns.time;
id = setInterval(function():Void {
ns.seek(dest -= 2);
}, 100);
}
rw.onRelease = function():Void {
clearInterval(id);
}

JW Player

User  
0 rated :

will anyone tell me how to change the playing speed on windows media player please..?

JW Player

User  
0 rated :

i'm seeking to play video at a variable speed (preferrably slowed down), controlled by the user? perhaps a similar method could be used (as in philcol's post above) to pause/play the video with a setInterval loop? so that the video would pause/play itself iteratively with a short (milliseconds) pause between each pause/play loop? think this would work?

i am also seeking a method to have audio played slowed down, yet retain a consistent pitch (tone). ie. with music, so it the video and correspondent audio is slowed down, the pitch of the musical notes stay the same. anyone know if this is possible with AS 3.0 audio methods?


JW Player

User  
0 rated :

Im looking for a speed controller like you can set x1 speed, x2 speed or x4 and soon is this posible?


---
[url=http://www.virtuosomaster.com/]Ecommerce Website Development[/url]

JW Player

User  
0 rated :

hihi,
In Windows media player, ver 11, right click anywhere on the top or bottom bar, select View, Enhancements, Play Speed Settings, adjust as needed.

JW Player

User  
0 rated :

For those still looking for a slow motion solution, check out the Shortcuts plugin on this site. It requires the use of shortcut keys to enable slow motion, but it works great!

JW Player

User  
0 rated :

I am looking for such media player for Mac myself but for now it seems that only GOM player is capable of doing that. So google GOM player, very easy to control GL

JW Player

User  
0 rated :

GOM only for Windows..

JW Player

User  
0 rated :

i am using flash media player and when i try to fast forward the video it stops and starts playing after a long time. could someone help me!!

JW Player

User  
0 rated :

JetAudio allows you to adjust the speed of playback.

JW Player

User  
0 rated :

VLC Player can play the video in 0.25 times of its original speed if you want. It is better tatn WIndiws Media Players 0.5 for sure.

JW Player

User  
0 rated :

when i play videos from youtube or mediaplayer, the actors sound like chipmunks. is there any way to fix this?

JW Player

User  
0 rated :

@mikeyjr

Can you post a link to a page demonstrating the error?

This question has received the maximum number of answers.