home Get a blog for free contact login

Home

Акси на 3

Акси наближава да стане на 4 и все се каня да си запиша какви скилове имаше преди да направи 3.

Та преди да съм забравил:

Малко преди да навърши три се оправяше с YouTube и си пускаше клипчета, които я кефят. Можеше да си пуска програмка за рисуване от десктопа, да си сменя цветовете и инструментите и да си прави сладки детски драсканици :-)

Можеше разбира се да мести, крие и показва всякакви иконки, прозорци, плазмоиди, тоолбарове и др наляво надясно, така че на мама десктопа да се вижда в чудо.

Напоследък не цъка много на компа. Мама и дърпа юздите. Иначе може да прекарва доста време в сайтчета с флаш игрички.

Учим буквите от известно време, и наскоро ми прочете от една синя табела на улицата буква по буква "НОТАРИУС" :-)


Posted in dir: /blog/
Tags: Акси

отново нумерология

Днес имаме време почти като истиснкото :-)

date -d '@1324567890'
Thu Dec 22 17:31:30 EET 2011

date -d '@1234567890'
Sat Feb 14 01:31:30 EET 2009

Posted in dir: /blog/
Tags: нумерология

111111 11:11:11

Специален поздрав за любителите на числата и съвпаденията :-)


Posted in dir: /blog/
Tags: нумерология

Linux and webcams

I've recently got a nice webcam - Logitech C600

  • UVC driver
  • Wide angle (about 70 deg)
  • Good video ( capable of 30 fps at 1280x720 when using anything but YUYV camera output format )
  • Good sound

The supported camera outputs are:

  • YUYV
  • MJPEG
  • RGB3
  • BGR3
  • YU12
  • YV12

The best video quality is in the YUYV mode, however it is using less(or no) compression, so the high frame rates are available at 640x480@30 fps, and 800x600@25 fps.

Strangely, the webcam does some cropping when used at high video resolution & high frame rates. The controls pan/tilt are only usable in this crop mode. Skype also does a switch to one of the crop modes after e.g. 30 seconds of the call (I'm using the skype option to capture at 640x480 which it probably uses initially ).

Useful software:

  • guvcview
  • mplayer
  • vlc
  • v4l2ucp (video for linux 2 universal control panel)
  • luvcview

GUVCView

GUVCview is able to show what your webcam can do. You can easily switch resolutions, frame rates, camera output format . It can record video in different formats and capture still images. All of V4L2 settings which your camera supports could be changed. By default it presents a preview screen, so you can see how the switch of settings is affecting the captured video. The actual frames per seconds are also displayed on the video preview window. You can also use it as a camera control application when the capture is done by another app (e.g. skype). Just start it like:

guvcview -o

Another very nice feature is that you can capture video with sound. You can easily choose which mic to use - the camera built in or the one sitting on your desktop.

It is a good idea to keep an eye of the processor load (and on the terminal window) while capturing. Some formats use the CPU heavily and video/audio can easily get out of sync.

MPlayer

MPlayer is usable for fast preview. To play video with mplayer you can just do:

mplayer tv://

or give it some more options:

mplayer -tv driver=v4l2:input=0:width=640:height=480:device=/dev/video0

It appeared hard to get mencoder to capture the video right, especially when it does frame rate switching during the capture. Mine does that when it has the option "Exposure auto priority" checked. I was not able to get mplayer play video and audio at the same time too. But may be I've not tried hard enough. VLC on the other hand can do this.

VLC

VLC needs to know the video and sound devices when you open a capture device. I've specified them as:

/dev/video0 (the webcam)
hw:1 (or hw:1,0) (this was my webcam mic)

You can list your capture devices by:

arecord -l

VLC output is a little laggish in comparison to mplayer or guvcview preview window. I was able to fix this by specifying a smaller buffer time (300ms by default), however at a later try this did not work. I've not played with VLC enough too. As you might know it is quite powerful - may be the most mature video player with a GUI available for Linux. I still use mplayer from the command line for video playing though and haven't found a reason to replace it with anything else :-)

v4l2ucp/luvcview

v4l2ucp is covered by the "Image control" tab of guvcview. Luvcview looks like older version of his G brother. You can get the list of video modes your camera support by doing:

luvcview -L

Another software which I've barely tried is the popular "cheese".

The ultimate webcam software for linux is GUVCView.

Some extra commands to test sound from your webcam mic:

$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC883 Analog [ALC883 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 2: ALC883 Analog [ALC883 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: U0x46d0x808 [USB Device 0x46d:0x808], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

# No sound here
$ arecord -D hw:U0x46d0x808,0 | aplay
Recording WAVE 'stdin' : Unsigned 8 bit, Rate 8000 Hz, Mono
arecord: set_params:1065: Sample format non available
Available formats:
- S16_LE
aplay: playback:2467: read error


# This played the sound. Note that some of the times I started a command
# the sound did not show up. Next time I've tried it it did. The same was
# true for VLC sound capture tests. So I guess the device is not
# always initialized right.
$ arecord -D hw:U0x46d0x808,0 -f S16_LE | aplay
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
Warning: rate is not accurate (requested = 8000Hz, got = 16000Hz)
         please, try the plug plugin 
Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
^CAborted by signal Interrupt...
Aborted by signal Interrupt...

# Specify the proper rate
$ arecord -D hw:U0x46d0x808,0 -f S16_LE -r 16 | aplay
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
^CAborted by signal Interrupt...
Aborted by signal Interrupt...

# Use mmap instead of read:
$ arecord -D hw:U0x46d0x808,0 -f S16_LE -r 16 -M | aplay
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
underrun!!! (at least -1900024418,571 ms long)
^CAborted by signal Interrupt...
Aborted by signal Interrupt...
$

Another note here is that kmix was not always showing the webcam mic. Sometimes it showed unplug events without me actually touching the camera. Thus the webcam mic became unmanageble with it. Thus alsamixer was my friend.

Links:


Posted in dir: /articles/
Tags: guvcview Linux webcam

Java multiline strings

Едно от най-тъпите неща в Java-та е, че не поддържа multiline stings !


Posted in dir: /blog/
Tags: Java

Oracle NLS_ settings

Select * From Nls_Database_Parameters;
Select * From Nls_Instance_Parameters;
Select * From Nls_Session_Parameters;
select * from v$nls_valid_values;

Select value From Nls_Session_Parameters where parameter = 'NLS_SORT';

Alter Session Set Nls_Comp = 'BINARY';
Alter Session Set Nls_Comp = 'LINGUISTIC';
Alter Session Set Nls_Sort = 'BINARY';
Alter Session Set Nls_Sort = 'UNICODE_BINARY';
Alter Session Set Nls_Sort = 'UNICODE_BINARY_CI';
Alter Session Set Nls_Sort = 'BINARY_CI';

Select * From Mloc.T_User Where First_Name = 'делян';
select * from MLOC.t_user where first_name like 'делян';
select * from MLOC.t_user where UPPER(first_name) = UPPER('делян');

Also see: http://www.adp-gmbh.ch/ora/misc/dynamic_performance_views.html


Posted in dir: /commands/
Tags: oracle

Our first holiday in Greece

The following text was written as a a review for http://booking.com .


First, Makrigyalos is a small village about 45 km south from Thessaloniki. "Dias Apartments" is really close to the beach, just as advertised. The beach in the village itself is verry narrow and a high wall separates it from the road. There is a good beach about 2-3 km south of the village, just under Bora-Bora bar. Several other nice beaches are available within 15 km south of the village. The water in the area is not very clear though. We have visited east cost of Kassandra (Halkidiki) and it was much better. The village is also not far from Litohorou, which is an entry point to Olympus mountain.

The building is separated in two parts. One part is for "Dias Apartments", the other is for "Dias hotel". There is an isolated parking space next to the building but it is available for the hotel guests only, not the apartments. You don't need to pay for the parking as there is plenty of FREE parking space nearby. E.g. I parked on the street just infront of the room window. The breakfast was good and plenty for me. The host was kind to offer private parking space with it (as advertised) which I did not use.

I can confirm the problem with the TV's remote control. Looks like the owners don't pay for the cable/sat TV. My mosquito net also got big holes. The shower in the bathroom was very old and dirty. The water which fall out of the cabin's curtain was flowing in the corridor due to bad inclination. The WiFi was unusable most of the time. The bar was too expensive.

After the first 4 nights the owner politely asked us to move to a nearby hotel because he "has messed with the reservations and was expecting a large group for 10 nights". He explained that we will stay under the same contract. After viewing the conditions we have moved to the nearby "Electra" family hotel which had the sign of the same "Andromeda" travel agency. The conditions there were analogous and we have agreed to move. I just can't understand how can these greeks take 40-70 eur per night for such rooms and can't change a shower handle which can be bought for less than 5 eur. The owners, a very old couple, did not provide the remote for the air conditioner. They required 6€ per night for it. No towels were available. When I asked for some they only gave us one set. The room conditions which were printed on the door said that the room must be abandoned before 12:00. The old lady came at about 10:30, entered the room and start moving our luggage which we were just preparing. She nearly threw us out of the room and was complaining that we had little children(which should have stayed for free when using existing bedding as per dias apartments conditions).


Hopefully we'll have a better experience during our next stay in Greece. This was a last minute booking and this hotel was among the few ones offering a good **user rating/price** ratio according to booking.com

Posted in dir: /blog/
Tags: Greece

Linux 3.11 - Linux for workgroups

I think I will call 3.11 Linux for Workgroups.

... application developers are very important. They're not "real men" like kernel developers, he says, but still are "necessary" for Linux to succeed.

Linus Torvalds

http://www.linux.com/news/enterprise/biz-enterprise/485159-a-conversation-with-linus-torvalds


Posted in dir: /blog/
Tags: linux quotes

Люлин-Младост - 37 мин

С колелото днес от Люлин до Младост за 37 минути (11:57 - 12:34):


View Larger Map

Sys admin day

Честит празник на системните администратори! :-)

Поради спиране на тока нощес имах привилегията да си ъпдейтна десктопа:

root@work:/# cat /etc/issue.net
Debian GNU/Linux wheezy/sid
root@work:/# last reboot | head -3
reboot   system boot  3.0.0-1-686-pae  Fri Jul 29 15:11 - 20:29  (05:17)    
reboot   system boot  2.6.38-2-686-big Fri Jul 29 13:25 - 15:09  (01:43)    
reboot   system boot  2.6.38-2-686-big Thu Apr  7 20:41 - 15:09 (112+18:28) 
root@work:/# uname -a
Linux work 3.0.0-1-686-pae #1 SMP Sun Jul 24 14:27:32 UTC 2011 i686 GNU/Linux

И макар и леко на патерици - Честита 20 годишнина на Линукс и честита ни 3-та версия! :-)


Posted in dir: /blog/
Tags: debian linux

Page 23 of 29 (286 articles found)
start ... < ... 18 19 20 21 22 23 24 25 26 27 28 ...end

All tags SiteMap Owner Cookies policy [Atom Feed]