You can skip all the way down to GOAL, stuff below is to simply describe what has been done.
I’m currently hosting an automotive community web site that has a Download section with 20+ videos (size varies from 2mb to 100mb, all FTP’ed to the server). All the videos were re-encoded by me using latest XVID codec (bitrate varies from 400 to 700) and MP3 (128kbps) through VirtualDub. Originally they were wmv/qt/ram/dvix and etc, but I was looking to have them all in the same format for both mine and visitor’s convenience.
:: WHAT I HAVE
I have a simple index file set up that shows the files available (php script called http://www.bitfolge.de/snif-en.html SNIF, yet I was looking for a more professional solution that will allow visitors either to receive more information regarding the files or have an option of streaming them without downloading. I know this can be done through seperate scripts combined and that is what I’m trying to accomplish right now.
My 3 options for re-encode were XVID/WMV or RealMedia. Real Media was thrown out since it requires installation of RealPlayer (or RealAlternative) which is 2mb+ download either way. I had issues encoding to WMV using the Media Encoder since it failed to recognize a lot of the formats. I ended up with XVID/MP3 since it seemed to give the best quality/size ratio plus most users already have some kind of divx variant codec installed and almost everyone has mp3 support. I was really satisifed with the results of the re-encode.
:: POSSIBLE SOLUTIONS
Now these are the solutions that I’m exercising right now for hosting my videos online.
http://ffmpeg.sourceforge.net/index.php ffmpeg - FFmpeg is a complete solution to record, convert and stream audio and video. My host will not allow this due to hefty CPU usage.
Image gallery script - http://gallery.menalto.com Menalto / http://coppermine.sourceforge.net Coppermine = those will need ffmpeg to deal with video properly as well as ImageMagick library (available) to display thumbnails.
http://gstreamer.freedesktop.org Gstreamer - open source multimedia network. This sounds interesting, however I wasn’t able to find any scripts that utilize this which can help me in my project
I also found some commercial products (try and buy) such as Wimpy AV player, however like most others it requires to have conversion into it’s own format (Flash media in this case).I will be looking around some more on SourceForge and FreshMeat in attempt to find something that suits my needs.
An open source (or just freeware) customizable solution that will allow me to host video (XVID most likely) on my site and if possible to offer streaming option besides just the download.
1. Files will be uploaded by FTP, so the solution has to be able to read from URL or public_html (if using relative paths)
2. Needs to have an index file or a playlist to display all the files available.
3. Must be free/open source/creative commons license/gpl or etc
4. Needs to have support for XVID format (video) and MP3 (audio). Re-encode is possible, but I doubt there’s a better solution.
5. This is optional but it would prefferable if there was an option to generate thumbnails from existing video clips (on-the-fly or manual, either way is fine) to give visitors a preview of the media before they download/view it.
6. If it’s a player or a script it needs to have options such as forward/skip/next/full screen/etc. Just basic stuff will do, but it needs to be there.
7. Needs to be lightweight so that if visitors indeed do need to download some extra content in order to view the media, it has to be less than 1MB ( for example ffdshow is about 500kb/streamplug plug-in is 240kb, both can be downloaded in less that a minute on broadband)
Please post your comment/suggestions/ideas/questions/etc below. To motivate you: whoever will propose the most optimal solution that will suit my needs, will have his banner displayed on my community’s web site (700+ visitors a day). Thank you.
This probably won’t answer all your questions, but here it goes.
Generally speaking, unless someone has ample bandwidth, AVI isn’t really meant for streaming. Windows Media, Real Media, and QuickTime (when you pick 'prepare for internet streaming') were more designed for streaming. There’s info to manage packet loss or synchronize frames in case of line delays, etc. hence the overhead (if you transcode an asf file made with (for example) netshow encoder or windows media tools (not encoder) into avi using a tool like asftools, you will find the avi is quite a bit smaller, although the video data and audio data is identical, bit by bit). Of course this is not a solution to your question, but it’s something to keep in mind when encoding your video.
Once (and if) you have streaming videos, I don’t believe just placing them on an ftp server will allow them to stream (unless the client has ample bandwidth as well). I do believe there’s specialized server software to manage video streaming for various users with varying bandwidths (windows media services (part of IIS i think), quicktime streaming server, helix server).
Of course this could all be too complicated and you’ll just want to leave it as avi on ftp for simple downloading...
For generating thumbnails I used to use ACDSee, which can generate thumbnails embedded in html files, or just a plain image file with all the thumbnails on them (called contact sheet), but it’s pay (with a free trial period). XnView (free) has an option to create contact sheets. Select your files, then go to tools, create contact sheet. I haven’t played with contact sheet generators much, but they’re full of options, like spacing, thumbnail size/aspect ratios, background color(s), margins, what text to include (file name, size, etc). I haven’t tried IRFanView, but it’s likely it may have similar capabilities.
Thanks for quick reply.
I was told that MPEG-4 was designed with streaming in mind as well, by few people in #xvid channel, which is basically what XVID is.
I was looking for a software that can generate thumbnails server side via PHP function most likely. This can be easily done via ImageMagick, however it only works with image files. I will have no problems makign thumbs from video files offline. I’m sure that even VirtualDUB can do so.
Quicktime and Real Alternative are respective players, however they require additional software to be downloaded which is quite heavy and filled with unnecessary features.
WMV and XVID seemed to be my only choices. Like you suggested I will probably make thumbnails by hand and upload them. Yes server side solution is required indeed. But the only 2 I found were VideoLan and FFMPEG which are really heavy on CPU.
Thank you for your reply. I’m still looking.