tags:

views:

104

answers:

6

It there any way of displaying videos on a website that would allow me to show just a clip of a video without physically slicing the file into actual clips?

EDIT: Specifically, I'd like to play the clips using an open source flash player. I could make specific clips, but that is time consuming and a maintenance nightmare.

Second EDIT: youtube won't work because it is very important we be able to control who views these videos. Also, this web application is running off of a classic LAMP stack.

A: 

You edit the video into another file, and embed that file as the video on your page ;-)

Joel Martinez
Yes, that is an option. However, automation of the process, including adding new clips and file management, seems difficult. And there would be way way too many to do it entirely by hand.
Eugene M
You can preprocess them using something like the AVIFile API: http://www.codeproject.com/KB/audio-video/avifilewrapper.aspx
Joel Martinez
A: 

you could try to execute ffmpeg or similar from php to generate a clip section on the fly- but that would be cheating, wouldn't it? - i believe that there must be an obscure way to select the starting and ending point of a video in many video players, that's why the user can switch to a point in the video while watching...

ricardowong
A: 

it depends a lot on the video technology you use. Quicktime clips, for example, have a clear and easily manipulable distinction between media (data) and 'movie' (metadata).

Long ago, you could open a clip in 'simplemovie' (the video equivalent of notepad :-) ), select the part you want, copy, new (empty) file, paste, save, and pick "with references". The result was a very small file that contained no media but was absolutely valid movie file for every purpose, as long as the 'big' file was still around.

I'm sure SMIL has a similar capability; but who implements that? As for other containers, i have no idea.

I guess your best bet is to check the API of the player you're embedding in your webpage. It probably has some parameters to specify new 'beginning' and 'end' points. With some luck, it could even make it seem as the sub-clip is all there is.

Javier
+2  A: 

The free Flow Video Player will play video files and it includes source code and api functions to change the seek position:

http://flowplayer.org/

icemanind
Yes, this looks good. Just two questions, if you don't mind. Are there any specific requirement to use the seek feature? Like some sort of streaming setup with the server or anything? Secondly, do you know what I would have to do to limit the duration so it doesn't just play to the end of the video? It looks like I'd probably just have to cut it off manually.
Eugene M
A: 

Based on your comments, it seems you are still considering slicing the files / as long as its automated.

The issue, is you didn't mention what platform / languages you are using. If it happens to be .net, a modification of this is working well for us: http://jasonjano.wordpress.com/2010/02/09/a-simple-c-wrapper-for-ffmpeg/. The sample is for conversion, but can be adapted to use the features you need from ffmpeg i.e. to just grab a piece of the video.

eglasius
A: 

I don't think its the best way, but you could use some AS3 to load the movies as movieclips then use .addFrameScript(), gotoAndPlay() and .Stop() to manually control the clips.

JohnFly