Ok, today I published the version 1.0 of the video plugin in my GitHub repository.
- New default tag
videoext, but you can reactivate the old
video tag with the config parameter
- Moved the complete logic in a class, for easier reuse on templates and other plugins.
- The class support the
media and the
type attribute of the
<source> HTML tag.
When you have ideas for a new feature, please open a new issue on the GitHub page of this plugin.
Release v1.2 is on GitHub available.
I am just wondering, where do I have to set autoplay to be ‘true’?
Is there an option to set it for each video individually or is it a global option?
you have two options.
First you can set the config parameter in the
config.php file of kirby. But this is then the default value for all videos.
The second variant is the more flexible method. Set the value at the kirbytag.
(video: mp4: video.mp4 autoplay: true)
Here can you found some other examples.
Ok, I found there is a bug with this parameter. I created a issue for this problem.
Installed with Kirby 2.1 and crashed Kirby immediately. Deleting the videoext folder from the plugins folder brought Kirby back-to-life. Just FYI, get a serious certificate warning when I go to your website and not all sample videos loaded, at least for me.
@russlipton My website run with a certificate from cacert.org. Windows machines don’t know the root certificate and so every windows machine get a certificate error. But the test videos are working by me on a windows machine.
I don’t upgraded my installation to 2.1. I will test it on the weekend and release a new version.
In the mean time I create a issue on GitHub (https://github.com/fanningert/kirbycms-extension-video/issues/5). When you have any infos to this problem, can you please post it on the issue page.
No worries: I am thankful that you contributed this to the community. Just for completeness, received the certificate warning on OS/X. I look forward to the updated plugin!
I made a fresh installation of Kirby with no other plugins (only webhelper and videoext) and I get now error or other problem. It is working out of the box.
Can you say me what other plugins are you installed, or did you any changes on kirby?
Thank you for this great plugin.
As I develop on Windows, I have rewritten and expanded the script, I named this script “
ECHO "%~nx0" "%~1"
REM # Windows-/DOS-Script
REM This script ("do_ffmpeg.bat") takes any (high resolution) video file as input and converts it to MP4 (H264 & AAC), WebM (VP8 & Vorbis) and OGV (theora & vorbis) for HTML5 <video>. For each format, it creates a high quality ('.hq') and a low quality ('.lq') version.
REM ffmpeg has to be installed, see http://ffmpeg.zeranoe.com/builds/ for downloads.
REM Usage: do_ffmpeg.bat <inputfile>
REM Tip: Drag the video file (inputfile) in the windows explorer and drop it on the icon of this script or the icon of a link to this script.
REM This is heavily inspired by
REM - https://github.com/kornl/video-conversion/blob/master/convert_video_for_html_5.sh
REM - https://github.com/mickro/video2html5/blob/master/video2html5.sh
REM - http://diveintohtml5.info/video.html#webm-cli
REM Start of your configuration area
REM path to the utility ffmpeg.exe (surrounded by " . With or without drive like "C:". Without drive [e.g.
for an USB-drive], if this script and the utility ffmpeg.exe are on the same drive):
REM add all options you like or need:
REM End of your configuration area
ECHO %%1 ='%1'
ECHO infile =%infile%
ECHO outfile ='%outfile%'
ECHO filename ='%filename%'
ECHO ffmpeg =%prog%
ECHO ffmpeg-options ='%progoptions%'
IF /I "%1t" == "t" GOTO novideofile
IF /I NOT EXIST %prog% GOTO noprogfile
ECHO NO video file was passed as first parameter!
ECHO The file %prog% was not found (wrong path?)!
ECHO low quality MP4 (%filename%.lq.mp4)
START "ffmpeg lq.mp4" /WAIT %prog% -i %infile% -acodec aac -vcodec libx264 -vb 2000k -vf scale=iw/2:ih/2 -f mp4 %progoptions% -y "%outfile%.lq.mp4"
ECHO high quality MP4 (%filename%.hq.mp4)
START "ffmpeg hq.mp4" /WAIT %prog% -i %infile% -acodec aac -vcodec libx264 -vb 8000k -f mp4 %progoptions% -y "%outfile%.hq.mp4"
ECHO low quality WebM (%filename%.lq.webm)
START "ffmpeg lq.webm" /WAIT %prog% -i %infile% -acodec libvorbis -vcodec libvpx -vb 2000k -vf scale=iw/2:ih/2 -f webm %progoptions% -y "%outfile%.lq.webm"
ECHO high quality WebM (%filename%.hq.webm)
START "ffmpeg hq.webm" /WAIT %prog% -i %infile% -acodec libvorbis -vcodec libvpx -vb 8000k -f webm %progoptions% -y "%outfile%.hq.webm"
ECHO low quality OGV (%filename%.lq.ogv)
START "ffmpeg lq.ogv" /WAIT %prog% -i %infile% -acodec libvorbis -vcodec libtheora -vb 2000k -vf scale=iw/2:ih/2 %progoptions% -y "%outfile%.lq.ogv"
ECHO high quality OGV (%filename%.hq.ogv)
START "ffmpeg hq.ogv" /WAIT %prog% -i %infile% -acodec libvorbis -vcodec libtheora -vb 8000k %progoptions% -y "%outfile%.hq.ogv"
ECHO a single image (for "poster: %filename%.jpg")
START "ffmpeg image" /WAIT %prog% -ss 0.5 -i %infile% -vframes 1 -q:v 2 %progoptions% -y "%outfile%.jpg"
ECHO The seven new files wait at "%~dp1%"
The script has been revised (more robust against spaces in the paths and more informative).