Compare commits

..

3 Commits

3 changed files with 12 additions and 23 deletions

View File

@ -1,3 +1,3 @@
#!/bin/bash
ffmpeg -loglevel error -threads 4 -f alsa -probesize 10M -channels 2 -sample_rate 48000 -thread_queue_size 2048 -i default /tmp/raw.wav
[ ! -z "${1}" ] && filename="${1}" || read -p 'type in filename >' filename && [ -z "$filename" ] && filename="audio"
ffmpeg -threads 12 -f alsa -probesize 80M -channels 2 -sample_rate 48000 -thread_queue_size 16384 -i plughw:0,0 -c:a libvorbis -filter_complex "[0]asetpts=N/SR/TB,highpass=300,lowpass=20000,asendcmd=0.0 afftdn sn start,asendcmd=5.0 afftdn sn stop,afftdn=nr=80:tr=on:tn=on:nt=c:om=o,atrim=5,volume=2,asetpts=PTS-STARTPTS" /tmp/"${filename}".ogg

View File

@ -1,14 +1,12 @@
#!/bin/bash
inres="1366x768"
fps="25"
bitrate="3000k"
read -p 'type in filename >' filename
if [ -z "$filename" ];
then
filename="test"
fi
inres="1920x1080"
fps="30"
bitrate="6000k"
[ ! -z "${1}" ] && filename="${1}" || read -p 'type in filename >' filename && [ -z "$filename" ] && filename="test"
ffmpeg -threads:0 3 -threads:1 1 \
-f x11grab -probesize 42M -video_size $inres -framerate $fps -thread_queue_size 1024 -i :0.0 \
-f alsa -probesize 10M -channels 2 -sample_rate 48000 -thread_queue_size 1024 -i default \
-c:v libopenh264 -allow_skip_frames true -b:v $bitrate \
-f x11grab -probesize 42M -video_size $inres -framerate $fps -thread_queue_size 4096 -i :0.0 \
-f alsa -probesize 80M -channels 2 -sample_rate 48000 -thread_queue_size 16384 -i loopout \
-c:v libx264 -b:v $bitrate \
-c:a aac -af asetpts=N/SR/TB /tmp/$filename.mp4
#-allow_skip_frames true

View File

@ -4,20 +4,11 @@ while true; do
curtime="$(date +%T)"
curtimeicon=""
curdate="$(date +'%a %d/%m')"
curtemp="$(bc -l <<< "scale = 1; $(cat /sys/class/thermal/thermal_zone0/temp)/1000")"
curfreq="$(bc -l <<< "scale=2; ($(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq) + 5000) / 1000000")"
vol="$(amixer get Master)"
curvol=$(awk '{FS="[][]"} {print $2}' <<< "${vol}" | grep -o "[0-9]*")
curvolstatus=$(awk '{FS="[][]"} {print $6}' <<< "${vol}" | grep "\S")
curram="$(free -h | grep Mem | awk '{print $3"/"$2}')"
curramicon=""
mhz="$(bc -l <<< "${curfreq} < 1")"
if [ ${mhz} -eq 1 ]; then
curfreq="$(printf "%0.f\n" $(bc -l <<< "0.93 * 1000"))"
curfreq_suffix="MHz"
else
curfreq_suffix="GHz"
fi
if [ $curvol -ge 51 ]; then
curvolicon=""
elif [ $curvol -lt 51 ] && [ $curvol -gt 0 ]; then
@ -28,7 +19,7 @@ while true; do
if [ $curvolstatus != "on" ]; then
curvolicon=""
fi
rootname="${curramicon} ${curram} - ${curtemp}º - @${curfreq} ${curfreq_suffix} - ${curvolicon} ${curvol}% - ${curdate} ${curtimeicon} ${curtime}"
rootname="${curramicon} ${curram} - ${curvolicon} ${curvol}% - ${curdate} ${curtimeicon} ${curtime}"
xsetroot -name "${rootname}"
sleep 0.9
done