Wednesday 25 June 2008

Remote Desktop Connection

Linux equivalent: rdesktop

Monday 23 June 2008

Accessing ftp

Sometimes necessary to use socksify ftp
if proxy server is in the way.

Also, go via dpgate since it has socksify installed.

To remove "500 Illegal PORT command" error. Type: passive

Thursday 19 June 2008

Streaming webcam across the internet

Content of file ffserver.conf

Port 8090
# bind to all IPs aliased or not
BindAddress 0.0.0.0
# max number of simultaneous clients
MaxClients 1000
# max bandwidth per-client (kb/s)
MaxBandwidth 10000
# Suppress that if you want to launch ffserver as a daemon.
NoDaemon


File /tmp/feed1.ffm
FileMaxSize 5M


# FLV output - good for streaming

# the source feed
Feed feed1.ffm
# the output stream format - FLV = FLash Video
Format flv
VideoCodec flv
# this must match the ffmpeg -r argument
VideoFrameRate 15
# generally leave this is a large number
VideoBufferSize 80000
# another quality tweak
VideoBitRate 200
# quality ranges - 1-31 (1 = best, 31 = worst)
VideoQMin 1
VideoQMax 5
VideoSize 352x288
# this sets how many seconds in past to start
PreRoll 0
# wecams don't have audio
Noaudio


# ASF output - for windows media player

# the source feed
Feed feed1.ffm
# the output stream format - ASF
Format asf
VideoCodec msmpeg4
# this must match the ffmpeg -r argument
VideoFrameRate 15
# generally leave this is a large number
VideoBufferSize 80000
# another quality tweak
VideoBitRate 200
# quality ranges - 1-31 (1 = best, 31 = worst)
VideoQMin 1
VideoQMax 5
VideoSize 352x288
# this sets how many seconds in past to start
PreRoll 0
# wecams don't have audio
Noaudio




on local PC run

> ./ffserver -f /PATH/TO/ffserver.conf &

> ffmpeg -r 15 -s 352x288 -f video4linux -i /dev/video0 http://localhost:8090/feed1.ffm


On remote PC, point web browser at

http://IPADDRESSOFFFMPEGMACHINE:8090/test.asf

or

http://IPADDRESSOFFFMPEGMACHINE:8090/test.flv


depending on which format stream you wish to access.

ffserver errors

The error that is received after attempting to insert a ffmpeg stream into an ffserver feed "Could not find input stream matching output stream #0.0" can be caused if no audio is present in the captured stream.

It can be fixed by changing the "AudioBitRate X" setting to NoAudio in the stream descriptor in the ffserver.conf file.

Friday 13 June 2008

Capturing from a webcam with ffmpeg

ffmpeg -f video4linux2 -s 384x288 -r 10 -i /dev/video0 /tmp/out.avi

Will capture from the device at /dev/video0 and save to /tmp/out.avi

Capture can be viewed using

ffplay /tmp/out.avi

Thursday 12 June 2008

WG111v3 wireless modem and SuSE Linux 10.2

After using following these instructions and installing ndiswrapper, I managed to get the wireless connection working on my SuSE 10.2 box only when I disabled all encryption in the wireless router. Before that, it was hanging while waiting to recieve its IP info from the DHCP server.

Wednesday 11 June 2008

Netstat

Linux:
netstat -natq will show you current network connections

Monday 9 June 2008

Searching for strings in Linux

Forward slash '/' in man/more/etc will allow you to search for a string. 'n' will search for the next instance.

Searching for strings in Linux

Forward slash '/' in man/more/etc will allow you to search for a string. 'n' will search for the next instance.

if statement in Linux scripts

When comparing two strings, if the strings contain spaces then you must have a dollar sign at each end of the variable name...

if [ $IP$ = $OLDIP$ ]
then
blah
blah
fi


Note also the spaces between the variable names and the '=' symbol...

IP address lookup from Linux

use:
host
or
nslookup

How to fix Error 1327: Invalid Drive f:

Another one of those tiresome bugs that pop up from time to time...


If you try to install or uninstall a program in Windows, and get this:

Error 1327. Invalid drive f:\

where f is a drive you’ve never heard of, then run regedit and find HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders. Change any instance of f: to %USERPROFILE%.




Seems to do the job.

Friday 6 June 2008

VideoLAN VLC....

....can capture video via DirectShow (on Windows at least) and write it out as an H264 MPG transport stream.

Thursday 5 June 2008

PHP

PHP can support sockets, making it much easier to suck data from other processes.

Wednesday 4 June 2008

Flash...

To stream HD-SDI, live to a Flash scene:
SDI -> Flash Encoder -> Flash Server (possible Red5?)

Blender texturing

To add a UV texture to a Blender model so that it will be rendered, go into object mode, select the object with the previously assigned UV texture, press F5 to edit Material and select TexFace from the Material Tab. For some objects (Planes) it may be necessary to select Mat from the Material window.