Користувальницькькі налаштування

Налаштування сайту


video-editing

Кодирование видео

Mencoder

XviD

time mencoder -vf yadif=0,hqdn3d=0:0:15:15,scale=360:288 -ovc xvid -xvidencopts bitrate=500:threads=2 -nosound -lavcopts acodec=libmp3lame:abitrate=64  -o /mnt/multimedia/encoded.avi /mnt/multimedia/Мой\ фильм.avi
time mencoder -vf yadif=0,hqdn3d=0:0:15:15 -ovc xvid -xvidencopts bitrate=1200:threads=2 -oac lavc -lavcopts acodec=libmp3lame:abitrate=64  -o /mnt/multimedia/encoded.avi /mnt/multimedia/Мой\ фильм.avi
  time (mencoder -dvd-device /temp/ dvd://1 -vf yadif=0,scale=704:528,dsize=4/3 -nosound -ovc xvid -xvidencopts pass=1:bitrate=1200:threads=2 -o Rojdennie_mislit-1-video.avi && mencoder -dvd-device /temp/ dvd://1 -vf yadif=0,scale=704:528,dsize=4/3 -nosound -ovc xvid -xvidencopts pass=2:bitrate=1200:threads=2 -o Rojdennie_mislit-1-video.avi)

x264

/x264-enc-2p.sh "-nosound /mnt/multimedia/Films/ToRecompress/show_32.avi" 935 "scale=576:432,dsize=4/3,"
x264-enc-2p.sh
#!/bin/bash 
# x264-enc-3p.sh
source="$1" 
bitrate="$2" 
filters="$3" 
name="$(date +%F-%T)".avi 
log="$name".log
 
# With niceness = 19 (the lowest priority
#E1="nice -n 19 mencoder "$source" -vf pullup,softskip,"$filters"harddup -ovc x264 -x264encopts threads=2:subq=1:frameref=1:bframes=3:b_pyramid=normal:direct_pred=auto:bitrate=$bitrate"
#E2="nice -n 19 mencoder "$source" -vf pullup,softskip,"$filters"harddup -ovc x264 -x264encopts threads=2:psnr:ssim:b_adapt=2:deblock:cabac:chroma_me:subq=9:partitions=all:8x8dct:me=umh:nofast_pskip:nodct_decimate:me_range=16:trellis=2:frameref=5:bframes=3:b_pyramid=normal:weight_b:mixed_refs:direct_pred=auto:bitrate=$bitrate"
 
# With niceness = 0 (normal priority)
#E1="mencoder "$source" -vf pullup,softskip,"$filters"harddup -ovc x264 -x264encopts threads=2:subq=1:frameref=1:bframes=3:b_pyramid=normal:direct_pred=auto:bitrate=$bitrate"
#E2="mencoder "$source" -vf pullup,softskip,"$filters"harddup -ovc x264 -x264encopts threads=2:psnr:ssim:b_adapt=2:deblock:cabac:chroma_me:subq=9:partitions=all:8x8dct:me=umh:nofast_pskip:nodct_decimate:me_range=16:trellis=2:frameref=5:bframes=3:b_pyramid=normal:weight_b:mixed_refs:direct_pred=auto:bitrate=$bitrate"
E1="mencoder "$source" -vf "$filters"harddup -ovc x264 -x264encopts threads=2:subq=1:frameref=1:bframes=3:b_pyramid=normal:direct_pred=auto:bitrate=$bitrate"
E2="mencoder "$source" -vf "$filters"harddup -ovc x264 -x264encopts threads=2:psnr:ssim:b_adapt=2:deblock:cabac:chroma_me:subq=9:partitions=all:8x8dct:me=umh:nofast_pskip:nodct_decimate:me_range=16:trellis=2:frameref=5:bframes=3:b_pyramid=normal:weight_b:mixed_refs:direct_pred=auto:bitrate=$bitrate"
 
 
time (\
time $E1:pass=1 -o /dev/null && \
time $E2:pass=2 -o "$name" && \
echo "Encoding time:")
 
rm -v divx2pass.log
 
 
#(time (\ 
#time $E1:pass=1 -o /dev/null && \
#time $E2:pass=2 -o "$name" && \
#echo "Encoding time:") &> "$log"; \
#)&
 
#rm -v divx2pass.log
#(time (\ 
#time $E1:pass=1 -o /dev/null && \ 
#time $E2:pass=2 -o "$name" && \ 
#echo "Encoding time:") &> "$log";\ 
#rm -v divx2pass.log*\ 
#) &
 
#(time (\ 
#time $e:pass=1 -o /dev/null && \ 
#time $e:pass=3 -o /dev/null && \ 
#time $e:pass=3 -o "$name" && \ 
#echo "Encoding time:") &> "$log";\ 
#rm -v divx2pass.log*\ 
#) &
#tail -f "$log"
x264-enc-3p.sh
#!/bin/bash 
# x264-enc-3p.sh
source="$1" 
bitrate="$2" 
filters="$3" 
name="$(date +%F-%T)".avi 
log="$name".log
# 21 
#e="mencoder "$source" -vf pullup,softskip,"$filters"harddup -ovc x264 -x264encopts threads=auto:psnr:ssim: b_adapt=2:deblock:cabac:chroma_me:subq=9:partitions=all:8x8dct:me=umh:nofast_pskip:nodct_decimate: me_range=32:trellis=2:frameref=16:bframes=16:b_pyramid:weight_b:mixed_refs:direct_pred=auto: keyint=750:keyint_min=25:direct_8x8=-1:aq_mode=1:aq_strength=1.0:psy_rd=1.0,0.0:bitrate=$bitrate"(
#e="mencoder "$source" -vf pullup,softskip,"$filters"harddup -ovc x264 -x264encopts threads=2:psnr:ssim:b_adapt=2:deblock:cabac:chroma_me:subq=9:partitions=all:8x8dct:me=umh:nofast_pskip:nodct_decimate:me_range=32:trellis=2:frameref=16:bframes=16:b_pyramid:weight_b:mixed_refs:direct_pred=auto:keyint=750:keyint_min=25:direct_8x8=-1:aq_mode=1:aq_strength=1.0:psy_rd=1.0,0.0:bitrate=$bitrate"
 
# With niceness = 19 (the lowest priority
#E1="nice -n 19 mencoder "$source" -vf pullup,softskip,"$filters"harddup -ovc x264 -x264encopts threads=2:subq=1:frameref=1:bframes=3:b_pyramid=normal:direct_pred=auto:bitrate=$bitrate"
#E2="nice -n 19 mencoder "$source" -vf pullup,softskip,"$filters"harddup -ovc x264 -x264encopts threads=2:psnr:ssim:b_adapt=2:deblock:cabac:chroma_me:subq=9:partitions=all:8x8dct:me=umh:nofast_pskip:nodct_decimate:me_range=16:trellis=2:frameref=5:bframes=3:b_pyramid=normal:weight_b:mixed_refs:direct_pred=auto:bitrate=$bitrate"
 
# With niceness = 0 (normal priority)
E1="mencoder "$source" -vf pullup,softskip,"$filters"harddup -ovc x264 -x264encopts threads=2:subq=1:frameref=1:bframes=3:b_pyramid=normal:direct_pred=auto:bitrate=$bitrate"
E2="mencoder "$source" -vf pullup,softskip,"$filters"harddup -ovc x264 -x264encopts threads=2:psnr:ssim:b_adapt=2:deblock:cabac:chroma_me:subq=9:partitions=all:8x8dct:me=umh:nofast_pskip:nodct_decimate:me_range=16:trellis=2:frameref=5:bframes=3:b_pyramid=normal:weight_b:mixed_refs:direct_pred=auto:bitrate=$bitrate"
 
#E2="mencoder "$source" -vf pullup,softskip,"$filters"harddup -ovc x264 -x264encopts threads=2:psnr:ssim: b_adapt=2:deblock:cabac:chroma_me:subq=6:partitions=all:8x8dct:me=umh:nofast_pskip:nodct_decimate:me_range=32:trellis=2:frameref=5:bframes=3:b_pyramid:weight_b:mixed_refs:direct_pred=auto:keyint=750:keyint_min=25:direct_8x8=-1:aq_mode=1:aq_strength=1.0:psy_rd=1.0,0.0:bitrate=$bitrate"
#E2="mencoder "$source" -vf pullup,softskip,"$filters"harddup -ovc x264 -x264encopts threads=2:subq=1:frameref=1:bframes=3:b_pyramid=normal:direct_pred=auto:bitrate=$bitrate"
 
 
time (\ 
time $E1:pass=1 -o /dev/null && \
time $E2:pass=2 -o "$name" && \
echo "Encoding time:")
 
rm -v divx2pass.log
 
 
#(time (\ 
#time $E1:pass=1 -o /dev/null && \
#time $E2:pass=2 -o "$name" && \
#echo "Encoding time:") &> "$log"; \
#)&
 
#rm -v divx2pass.log
#(time (\ 
#time $E1:pass=1 -o /dev/null && \ 
#time $E2:pass=2 -o "$name" && \ 
#echo "Encoding time:") &> "$log";\ 
#rm -v divx2pass.log*\ 
#) &
 
#(time (\ 
#time $e:pass=1 -o /dev/null && \ 
#time $e:pass=3 -o /dev/null && \ 
#time $e:pass=3 -o "$name" && \ 
#echo "Encoding time:") &> "$log";\ 
#rm -v divx2pass.log*\ 
#) &
#tail -f "$log"

FFMpeg (avconv)

Кодирование аудио

mplayer -dvd-device /mnt/cdrom/ mplayer dvd://1 -vc null -vo null -ao pcm:file=audio.fifo:waveheader:fast
oggenc -o Rojdennie_mislit-1-audio.ogg -q2 audio.fifo

Мультиплексирование

mkvmerge -o Rojdennie_mislit-1.mkv Rojdennie_mislit-1-video.avi -y 0:250 Rojdennie_mislit-1-audio.ogg
mkvmerge -o Patria.mkv 2010-05-23-01\:13\:27.avi -y 0:0 /mnt/data/Patria_o_muerte.ogg
mkvmerge -o show_31.mkv 2010-05-23-07\:37\:34.avi -y 0:400 show_31.ogg

Фильтры

Видеофильтры

Изменение размера

mplayer -vf crop=620:432:10:0,scale=576:432,dsize=4/3 -nosound /mnt/multimedia/Films/ToRecompress/show_22.avi
mplayer -vf scale=576:432,dsize=4/3 -nosound /mnt/multimedia/Films/ToRecompress/show_26.avi
mplayer -vf scale=576:432,dsize=4/3 -endpos 1497 -nosound /mnt/multimedia/Films/ToRecompress/show_33_34.avi

Обрезка краёв

mplayer -vf crop=624:480:16:0,scale=576:432,dsize=4/3 -ss 1497 -nosound /mnt/multimedia/Films/ToRecompress/show_33_34.avi
mplayer -vf crop=624:480:16:0,scale=576:432,dsize=4/3 -nosound /mnt/multimedia/Films/ToRecompress/show_35.avi

Подавление шумов

mplayer -ss 510 -vf hqdn3d=0:0:15:15 -ao null dvd://2 -dvd-device /mnt/lan/data/Родина\ или\ смерть\!\ \(Фидель\ Кастро\)/

Добавление чёрных полос

Аудиофильтры

Полезные ссылки

video-editing.txt · В останнє змінено: 2013/05/15 04:34 by wombat