![]() |
|
contribution for videos - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html) +--- Thread: contribution for videos (/thread-5528.html) |
contribution for videos - yohann - 2009-07-24 hello, i've spend a lot of time to figure out how i can show my videos using flowplayer3. either i had image only either i had sound only or just nothing here is a litle script to do the work and put a correct video on the gallery. you'll need to have mplayer (wich contain mencoder), gpac and faac. then simply execute the script using original file as argument. script will create a file_final.mp4 ready to be read by flowplayer ` #!/usr/bin/env bash #extract video (2 pass) echo "extracting video..." echo "pass #1..." mencoder $1 -of rawvideo -nosound -ovc x264 -x264encopts subq=1:frameref=1:bitrate=900:bframes=1:pass=1 -vf scale=1280:720 -o ${1%.*}.264 > ${1%.*}.log 2>${1%.*}.err echo "pass #2..." mencoder $1 -of rawvideo -nosound -ovc x264 -x264encopts subq=6:frameref=5:bitrate=900:me=umh:partitions=all:bframes=1:me_range=16:cabac:weightb:deblock:pass=2 -vf scale=1280:720 -o ${1%.*}.264 >> ${1%.*}.log 2>>${1%.*}.err #extract audio echo "extracting audio..." mplayer $1 -vc dummy -ao pcm:fast:file=${1%.*}.wav >> ${1%.*}.log 2>>${1%.*}.err echo "compressing audio..." faac -o ${1%.*}.m4a ${1%.*}.wav >> ${1%.*}.log 2>>${1%.*}.err #merge audio and video to create final file echo "merging audio and video..." MP4Box -add ${1%.*}.264 -add ${1%.*}.m4a -fps 23.976 ${1%.*}_final.mp4 >> ${1%.*}.log 2>>${1%.*}.err echo "removing temporary files" rm divx2pass.log ${1%.*}.264 ${1%.*}.wav ${1%.m4a} echo "finish" ` |