Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
Система - gentoo linux 2008.0
необходим совет по ПО (для X) для конвертирования видео в .flv с накладыванием вотемарка на картинку.
желательна поддержка многопоточности (для 8ми ядерника)
Буду благодарен за советы.
советую юзать командную строку (mencoder, faac, MP4Box, yamdi).
у меня работает скрипт, который перегоняет в flash (h264+AAC) видео XVID.
а весь GUI - это надстройки над указанными мной программами.
если интересует, могу скинуть свои скрипты. видео жмется в два прохода, качество просто отличное. работает перемотка в любое место видео без необходимости скачивания всего ролика, как на youtube.
#!/bin/sh
mplayer=/usr/src/video/mplayer/mplayer
mencoder=/usr/src/video/mplayer/mencoder
MP4Box=/usr/src/video/gpac/bin/gcc/MP4Box
faac=/usr/bin/faac
FILENAME=$1
# framerate: ntsc=29.97, pal=25, film=23.976
FPS="23.976"
#
AUDIO_BITRATE=56
# 320x240 pixels - 400kbps - 3MB/minute
# 480x360 pixels - 700kbps - 5MB/minute
# 720x540 pixels - 1000kbps - 7.5MB/minute
VIDEO_BITRATE=400
#
# Very high quality (6fps ; 0dB)
# subq=6:partitions=all:8x8dct:me=umh:frameref=5:bframes=3:b_pyramid:weight_b
# High quality (13fps ; -0.89dB)
# subq=5:8x8dct:frameref=2:bframes=3:b_pyramid:weight_b
# Fast (17fps ; -1.48dB)
# subq=4:bframes=2:b_pyramid:weight_b
#
OPTIONS_PASS_1="-passlogfile ${FILENAME%.*}-${VIDEO_BITRATE}_temp.log -ovc x264 -x264encopts bitrate=$VIDEO_BITRATE:threads=auto:subq=6:partitions=all:8x8dct:me=umh:frameref=5:bframes=3:b_pyramid:weight_b:pass=1 -vf harddup -ofps $FPS -of rawvideo -nosound"
OPTIONS_PASS_2="-passlogfile ${FILENAME%.*}-${VIDEO_BITRATE}_temp.log -ovc x264 -x264encopts bitrate=$VIDEO_BITRATE:threads=auto:subq=6:partitions=all:8x8dct:me=umh:frameref=5:bframes=3:b_pyramid:weight_b:pass=2 -vf harddup -ofps $FPS -of rawvideo -nosound"
#
START_DATE=`date`
echo ""
echo ""
echo "* * * Start Date $START_DATE * * *"
echo ""
echo ""
echo "* * * Removing temporary files ... * * *"
#if [[ -f "${FILENAME%.*}"_temp* ]] ; then rm -f "${FILENAME%.*}-${VIDEO_BITRATE}_temp*" ; fi
echo ""
echo ""
echo "* * * Starting video encoding pass 1 ... * * *"
echo ""
echo ""
if [ -f $FILENAME ] ; then
if [[ ! -f "${FILENAME%.*}-${VIDEO_BITRATE}_temp.log" ]] ; then
EXEC="$mencoder $FILENAME -o /dev/null $OPTIONS_PASS_1"
echo $EXEC
$EXEC
if [ $? -ne 0 ] ; then
echo ""
echo "* * * Error: Last execution return not zero value: $?! Exiting! * * *"
exit 1
fi
else
echo ""
echo "* * * 1ST PASS ALREADY ENCODED ... * * *"
fi
else
echo ""
echo "* * * Error: File $FILENAME doesn't exists! * * *"
exit 1
fi
echo ""
echo ""
echo "* * * Starting video encoding pass 2 ... * * *"
echo ""
echo ""
if [ -f $FILENAME ] ; then
if [[ ! -f "${FILENAME%.*}-${VIDEO_BITRATE}_temp.h264" ]] ; then
EXEC="$mencoder $FILENAME -o ${FILENAME%.*}-${VIDEO_BITRATE}_temp.h264 $OPTIONS_PASS_2"
echo $EXEC
$EXEC
if [ $? -ne 0 ] ; then
echo ""
echo "* * * Error: Last execution return not zero value: $?! Exiting! * * *"
exit 1
fi
else
echo ""
echo "* * * 2ND PASS ALREADY ENCODED ... * * *"
fi
else
echo ""
echo "* * * Error: File $FILENAME doesn't exists! * * *"
exit 1
fi
echo ""
echo ""
echo "* * * Extracting Audio to a 48khz WAV file ... * * *"
echo ""
echo ""
if [ -f $FILENAME ] ; then
if [[ ! -f "${FILENAME%.*}-${VIDEO_BITRATE}_temp.wav" ]] ; then
EXEC="$mplayer $FILENAME -af resample=48000:0:2,volnorm=2:0.25 -ao pcm:fast:waveheader:file=${FILENAME%.*}-${VIDEO_BITRATE}_temp.wav -vc null -vo null -benchmark"
echo $EXEC
$EXEC < /dev/null
if [ $? -ne 0 ] ; then
echo ""
echo "* * * Error: Last execution return not zero value: $?! Exiting! * * *"
exit 1
fi
else
echo ""
echo "* * * AUDIO STREAM ALREADY DUMPED * * *"
fi
else
echo ""
echo "* * * Error: File $FILENAME doesn't exists!"
exit 1
fi
echo ""
echo ""
echo "* * * Encoding Audio to HE-AAC plus file ... * * *"
echo ""
echo ""
if [ -f "${FILENAME%.*}-${VIDEO_BITRATE}_temp.wav" ] ; then
if [[ ! -f "${FILENAME%.*}-${VIDEO_BITRATE}_temp.m4a" ]] ; then
EXEC="$faac -b ${AUDIO_BITRATE} -w ${FILENAME%.*}-${VIDEO_BITRATE}_temp.wav -o ${FILENAME%.*}-${VIDEO_BITRATE}_temp.m4a"
echo $EXEC
$EXEC
if [ $? -ne 0 ] ; then
echo ""
echo "* * * Error: Last execution return not zero value: $?! Exiting! * * *"
exit 1
fi
else
echo ""
echo "* * * AUDIO STREAM ALREADY ENCODED * * *"
fi
else
echo ""
echo "* * * Error: File ${FILENAME%.*}-${VIDEO_BITRATE}_temp.wav doesn't exists! * * *"
exit 1
fi
echo ""
echo ""
echo "* * * Generating final MP4 container ... * * *"
echo ""
echo ""
echo "* * * Adding video to MP4 container ... * * *"
if [ -f "${FILENAME%.*}-${VIDEO_BITRATE}_temp.h264" ] ; then
EXEC="$MP4Box -add ${FILENAME%.*}-${VIDEO_BITRATE}_temp.h264#video:fps=$FPS ${FILENAME%.*}-${VIDEO_BITRATE}.m4v"
echo $EXEC
$EXEC
if [ $? -ne 0 ] ; then
echo ""
echo "* * * Error: Last execution return not zero value: $?! Exiting! * * *"
exit 1
fi
else
echo ""
echo "* * * Error: File ${FILENAME%.*}-${VIDEO_BITRATE}_temp.h264 doesn't exists! * * *"
exit 1
fi
echo ""
echo ""
echo "* * * Adding audio to MP4 container ... * * *"
if [ -f "${FILENAME%.*}-${VIDEO_BITRATE}_temp.m4a" ] ; then
EXEC="$MP4Box -add ${FILENAME%.*}-${VIDEO_BITRATE}_temp.m4a#audio ${FILENAME%.*}-${VIDEO_BITRATE}.m4v"
echo $EXEC
$EXEC
if [ $? -ne 0 ] ; then
echo ""
echo "* * * Error: Last execution return not zero value: $?! Exiting! * * *"
exit 1
fi
else
echo ""
echo "* * * Error: File ${FILENAME%.*}-${VIDEO_BITRATE}_temp.m4a doesn't exists! * * *"
exit 1
fi
echo ""
echo ""
echo "* * * Removing temporary files ... * * *"
echo ""
echo ""
rm "${FILENAME%.*}-${VIDEO_BITRATE}_temp*"
END_DATE=`date`
echo ""
echo ""
echo "* * * End Date $END_DATE * * *"
echo ""
echo ""
exit 0