Monday, July 18, 2011

Linux - Ubuntu - 2 Media tips

Two quick Linux media tips:

- Webcam - Viewer / recorder
To use my webcam i found this great peace of software:
"GUVCView"

To install it on ubuntu (simply):
# apt-get install guvcview

And that's it, you can launch it and view / record or take snapshots with your webcam.

- ffmpeg - great tool to encode and transform your videos, avi, mpeg, mov...etc.
# apt-get install ffmpeg
and use it:
$ ffmpeg -formats
$ ffmpeg -i yourfile.ext -vcodec wmv2 -sameq -acodec wmav2 -f avi outfile.avi

I run into some trouble with the xvid codecs, but found the solution here:
https://wiki.ubuntu.com/ffmpeg


That's it.

Thursday, May 19, 2011

Socat - nifty tool ;)

Here's some tips to test "socat"

: connect to port 80
> socat - tcp4-connect:192.168.1.1:80
-----------------------------------------------------------

: connect to port 80 + verbose
> socat -d -d - tcp4-connect:192.168.1.1:80
-----------------------------------------------------------

: listen to port 80
> socat -d -d - tcp4-listen:80
-----------------------------------------------------------

: Port forward : listen on port 443 -> send to 80 of the host
> socat -d -d tcp4-listen:443 tcp4:192.168.1.1:80
-----------------------------------------------------------

There's lot's more, try socat -h
.

examples:
http://technostuff.blogspot.com/2008/10/some-useful-socat-commands.html

Tuesday, March 29, 2011

Bash - simple "for loop"...

This may be usefull, it's a simple loop in BASH

#!/bin/bash
for hostname in $(cat text.txt); do
host $hostname
done

Just substitute the "text.txt" with a file containing the hosts.
.
.

Thursday, August 19, 2010

Windows - Create file to test filesystem - utility

To create a file filled with zero's on windows;

fsutil file createnew name-of-file.txt 2000 (this is the length in bytes)

This will create a new file with 2000 bytes.


This can usefull for copy / perfomance disk testing.
.
.