суббота, 12 октября 2013 г.

Конвертация видео с использованием ffmpeg (gentoo)

Конвертирование видео с использованием ffpmeg (cосоль)
Cобирать с такими флагами

media-video/ffmpeg 3dnow ssse3 opus amr avx fdk

Теперь перейдём собственно к конвертации:
ffmpeg -i input.avi -s qcif -r 12 -ac 1 -ar 8000 -b 30 -ab 12 output.3gp
Здесь ключи определяют:
  • -i input.avi - имя входного файла;
  • -s qcif -r 12 - кодировать видео с разрешением 176×144 и 12 кадров в секунду;
  • -ac 1 -ar 8000 - кодировать звук в один канал (моно) с частотой дискретизации 8000 (это даст максимальную воспроизводимую частоту в 4000 Гц);
  • -b 30 -ab 12 - установить видео битрейт 30 кбит/с и аудио битрейт 12 кбит/с;
  • output.3gp - результирующий файл.

    ffmpeg -i test.avi -ab 192k -ac 2 -ar 44100 -b 1500k -s 1280x720 -level 21 -refs 2 -bt 1500k test.cvt.mp4

вторник, 10 сентября 2013 г.

.xinitrc

#!/bin/bash
#this is fucking .xinitrc

setxkbmap -layout us,ru -variant ,winkeys -option grp:alt_shift_toggle,grp_led:scroll,compose:ralt &
feh --bg-scale /home/factor/pic/u12.jpg &
lxpanel &
conky &
tilda &
xset -dpms;xset s off &
ck-launch-session dbus-launch &
synclient TapButton1=1 &
xbacklight -set 10 &
exec openbox-session

среда, 17 июля 2013 г.

Make.conf

My make.conf for gentoo on notebook

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
#CFLAGS="-march=native -O2 -pipe"
CFLAGS="-march=core2 -msse4 -mcx16 -msahf -fomit-frame-pointer -pipe -O3"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j4"
#MAKEOPTS="-j1"
LINGUAS="ru_RU ru"
ACCEPT_KEYWORDS="~amd64"
ACCEPT_LICENSE="*"
CHOST="x86_64-pc-linux-gnu"
INPUT_DEVICES="keyboard mouse evdev synaptics"
VIDEO_CARDS="intel"
ALSA_CARDS="hda-intel"
AUTOCLEAN="yes"
FEATURES="sandbox"

# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
#CHOST="x86_64-pc-linux-gnu"
# These are the USE flags that were used in addition to what is provided by the
# profile used for building.

USE="bindist mmx sse sse2 unicode minimal X udev alsa dbus -kde -qt -cups -ipv6 -debug  -doc -gnome -qt4 -pulseaudio vaapi"

conky

.conkyrc

alignment top_right
background no
border_width 1
cpu_avg_samples 2
top_cpu_separate no
default_color white
default_outline_color white
default_shade_color white
double_buffer yes
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
gap_x 5
gap_y 50
#maximum_width 180
max_port_monitor_connections 10
#max_specials 512
max_user_text 16384
#minimum_size 360 20
net_avg_samples 2
no_buffers yes
out_to_console no
own_window_colour white
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
own_window_type normal
own_window yes
stippled_borders 2
update_interval 2
uppercase no
use_spacer yes
use_xft yes
xftalpha 0.8
xftfont Sans:bold:size=8
override_utf8_locale yes

TEXT
${font Sans:size=9:weight=bold}${color white}Load CPU ${hr 2}$color
${color white}CPU 1 ${color white}${cpu cpu0}%     $alignr${color white}CPU 2     ${color white}${cpu cpu1}% $color
${cpugraph cpu0 25,120 000000 ffffff }  ${cpugraph cpu1 25,120 000000 ffffff }
${font Sans:size=9:weight=bold}${color white}Temperature CPU ${color white}${acpitemp}
$color Load CPU ${hr 2}$color${font Sans:size=8:weight=bold}${color white}
Proc name               ${alignr}ID      ${alignr}CP  $color
1. ${top name 1}     ${alignr}${top pid 1}   ${alignr}${top cpu 1}
2. ${top name 2}     ${alignr}${top pid 2}   ${alignr}${top cpu 2}
3. ${top name 3}     ${alignr}${top pid 3}   ${alignr}${top cpu 3}
4. ${top name 4}     ${alignr}${top pid 4}   ${alignr}${top cpu 4}
#5. ${top name 5}     ${alignr}${top pid 5}   ${alignr}${top cpu 5}

Load RAM ${hr 2}$color${font Sans:size=8:weight=bold}${color white}
Proc name                ${alignr}ID     ${alignr}RAM $color
1. ${top_mem name 1}     ${alignr}${top_mem pid 1}   ${alignr}${top_mem mem 1}
2. ${top_mem name 2}     ${alignr}${top_mem pid 2}   ${alignr}${top_mem mem 2}
3. ${top_mem name 3}     ${alignr}${top_mem pid 3}   ${alignr}${top_mem mem 3}
4. ${top_mem name 4}     ${alignr}${top_mem pid 4}   ${alignr}${top_mem mem 4}
#5. ${top_mem name 5}     ${alignr}${top_mem pid 5}   ${alignr}${top_mem mem 5}

${font Sans:size=9:weight=bold}${color white}RAM and SWAP ${hr 2}$color${font Sans:size=8:weight=bold}
${color white}RAM$color  ${memperc}% ${mem} ${color white}${membar 3.180}
${color white}SWAP$color  ${swapperc}% ${swap} ${color white}${swapbar 3.180}

${font Sans:size=9:weight=bold}${color white}Free space partition ${hr 2}$color${font Sans:size=8:weight=bold}
${color white}Root$color  ${fs_free_perc /}%$alignr${fs_free /}/
${fs_size /}
${color white}${fs_bar 3 /}
${color white}Home$color  ${fs_free_perc /home}%$alignr${fs_free /home}/
${fs_size /home} ${color white}${fs_bar 3 /home}
#${color white}Disk_D$color  ${fs_free_perc /disk_d}%$alignr${fs_free /disk_d}/ ${fs_size /disk_d}
#${color white}${fs_bar 3 /disk_d}
#${color white}Disk_E$color  ${fs_free_perc /disk_e}%$alignr${fs_free /disk_e}/ ${fs_size /disk_e}
#${color white}${fs_bar 3 /disk_e}

${font Sans:size=9:weight=bold}${color white}Network lan (IP: ${addr eth0}) ${hr 2}$color${font Sans:size=8:weight=bold}
${color white}Data transfer rate
${color white}Input $color ${downspeed eth0}${alignr}${color white}Output$color${alignr} ${upspeed eth0}
${downspeedgraph eth0 25,120 000000 ffffff} ${alignr}${upspeedgraph eth0 25,120 000000 ffffff}$color
${font Sans:size=9:weight=bold}${color white}Trafik ${hr 2}$color${font Sans:size=8:weight=bold}
${color white}Input ${totaldown eth0} ${alignr}${color white}Output ${alignr} ${totalup eth0}
${font Sans:size=9:weight=bold}${color white}Ping ${hr 2}$color${font Sans:size=8:weight=bold}

# ${execi 5 ping 8.8.8.8}
${font Sans:size=9:weight=bold}${color white}Connect ${hr 2}$color${font Sans:size=8:weight=bold}
${if_gw eth0}Input
${execi 3 netstat --tcp --udp --numeric-hosts --program 2>/dev/null | grep ESTABLISHED | awk ' { sum[ $7 ] += $3; count[ $7 ]++ } END { for ( s in sum ) printf "%7d %dx %s\n", sum[ s ], count[ s ], s }' | sort --numeric --key=1 --reverse | head --lines=15 }
Out
${execi 3 netstat --tcp --udp --numeric-hosts --program 2>/dev/null | grep ESTABLISHED | awk ' { sum[ $7 ] += $2; count[ $7 ]++ } END { for ( s in sum ) printf "%7d %dx %s\n", sum[ s ], count[ s ], s }' | sort --numeric --key=1 --reverse | head --lines=15 }
${endif}