Ug,
I was going to put this in the Mod forum, but wasn't sure if it really qualifies. First time I've posted here.
This is for MPEG video's, but could be adapted for other vid types (?).
Edit:
4images/templates/default/media/mpg.html<!-- Template file for MPEG Movies -->
<embed src="{media_src}" border="0" width="352" height="288" type="application/x-mplayer2"></embed><br />
<a href="{media_src}.pls">Stream PLS</a><br />
<a href="{media_src}.m3u">Stream M3U</a><br />
Run this batch file (actually there are two). It will batch all the mpg's in the directory it is run in. You need to have
Imagemagick and
ffmpeg installed, and in your path.
makevidthumbs.bat@echo off
echo You must include 4images media file path as command line option Example: http://djbarney.silentflame.com/4images/data/media/6/
echo "Continue?"
pause
:: Make thumbs AND playlists for all mpg video's in current directory by calling another batch file.
for %%i in (*.mpg) do makevidthumbs_1.bat %%~ni %1
makevidthumbs_1.batNOTE: "iconvert", is actually Imagemagick "convert". I renamed it because it conflicts with a Windows XP utility.ffmpeg -i %1.mpg -an -ss 00:00::00 -t 00:00:01 -r 1 -y %1_%%d.png
del %1_2.png
iconvert %1_1.png -resize 200 -quality 80 %1.jpg
del %1_1.png
:: Make PLS
echo [playlist] > %1.mpg.pls
echo numberofentries=1 >> %1.mpg.pls
echo File1=%2%1.mpg >> %1.mpg.pls
echo Title1=%1 >> %1.mpg.pls
echo Version=2 >> %1.mpg.pls
:: Make M3U
echo %2%1.mpg > %1.mpg.m3u
Now upload videos to the usual /media/<id> directory. Also put the playlists in that directory.
Upload thumbnails to /thumbnails/<id> directory.
Check for new images and you should have video / thumb / playlists ready for each entry.
BC_Man
PS.. Note I corrected this message today (14/02/08). I changed the title sent to the playlist to "%1" instead of one of my games "Breed" !