echo $line | tr -dc '~' | wc -c
semplice, no?
un blog morbido
echo $line | tr -dc '~' | wc -c
#!/bin/bashet voilà! viene fuori un file .mp4 perfettamente intellegibile da vlc (apri sorgente rete -> rtsp://server/file.mp4).
BRATE=5000
rm -f divx2pass.log
mencoder $1 -o /dev/null -ovc x264 -x264encopts pass=1:turbo:bitrate=$BRATE:bframes=1:me=umh:partitions=all:trellis=1:qp
_step=4:qcomp=0.7:direct_pred=auto:keyint=300 -vf scale=-10:-1,harddup -oac faac -faacopts br=192:mpeg=4:object=2 -chann
els 2 -srate 48000 -ofps 24000/1001 &&
mencoder $1 -o $1.avi -ovc x264 -x264encopts pass=2:turbo:bitrate=$BRATE:bframes=1:me=umh:partitions=all:trellis=1:qp_st
ep=4:qcomp=0.7:direct_pred=auto:keyint=300 -vf scale=-10:-1,harddup -oac faac -faacopts br=192:mpeg=4:object=2 -channels
2 -srate 48000 -ofps 24000/1001 &&
mplayer $1.avi -dumpaudio -dumpfile $1.aac &&
mplayer $1.avi -dumpvideo -dumpfile $1.h264 &&
mp4creator -create=$1.aac $1.mp4 &&
mp4creator -create=$1.h264 -rate=23.976 $1.mp4 &&
mp4creator -hint=1 $1.mp4 &&
mp4creator -hint=2 $1.mp4 &&
mp4creator -optimize $1.mp4 &&
mp4creator -list $1.mp4 &&
rm $1.avi $1.aac $1.h264