Question

I have a large repository of videos, and a MySQL database to describe/organize them (as well as metadata about the videos). What I currently have is a php front-end that can use a system() call to do something like this:

mplayer vidfile.mp4 -ss 110 -endpos 5 -fs vidfile.mp4 -ss 130 -endpos 9 -fs

This lets me play segments of the same video (or multiple videos) in a chained fashion. This works great.

However, somewhat obviously, this only works if you are on the server. If you serve this file to clients over the web, that's not going to work.

So, assuming I have all the videos in a folder called /home/videos, is there an easy way to make a similar call using a flash container, HTML5 container, or other method? (Redirecting stdout to something?)

EDIT: If it matters, the videos are all in h.264/mp4 format and I'm not willing to convert them.

Was it helpful?

Solution

I don't know much about mplayer, but you could use ffmpeg to create flv's out of existing videos:

ffmpeg -i vidfile.mp4 -vcodec copy -acodec copy vidfile.avi

You can follow the ffmpeg guide http://ffmpeg.org/trac/ffmpeg/wiki/StreamingGuide, if you want to stream the files without saving the converted content.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top