maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   How to script? (https://talk.maemo.org/showthread.php?t=69173)

SakkeMO 2011-01-31 13:03

How to script?
 
Hi

Probably a very dumb question but i cant find answer to it and i need it pretty fast. So here comes.

Recently i found this: http://blog.pclewis.com/2010/02/stre...camera-to-vlc/
---- from teh internez and i love it, great to monitor my... cat or something else :) Anyways its loads of fun.

So the basic thing is that i need to help launch the gstreamer easier than typing this to terminal:

Code:

gst-launch v4l2camsrc device=/dev/video0 ! \
dsph264enc ! \
rtph264pay ! \
udpsink host=192.168.0.100 port=5434

>>>> script

And it should work with n900 of course.

Thanks.

AlMehdi 2011-01-31 13:11

Re: How to script?
 
Quote:

Originally Posted by SakkeMO (Post 932532)
Hi

Probably a very dumb question but i cant find answer to it and i need it pretty fast. So here comes.

Recently i found this: http://blog.pclewis.com/2010/02/stre...camera-to-vlc/
---- from teh internez and i love it, great to monitor my... cat or something else :) Anyways its loads of fun.

So the basic thing is that i need to help launch the gstreamer easier than typing this to terminal:

Code:

gst-launch v4l2camsrc device=/dev/video0 ! \
dsph264enc ! \
rtph264pay ! \
udpsink host=192.168.0.100 port=5434

>>>> script

And it should work with n900 of course.

Thanks.

If you launch the terminal and then do as follow you will have a script...

(i am not sure if you need root to do this..)

1. sudo gainroot
2. leafpad /usr/sbin/myscript
3. copy/paste

Code:

#!/bin/sh

gst-launch v4l2camsrc device=/dev/video0 ! dsph264enc ! rtph264pay ! udpsink host=192.168.0.100 port=5434

echo "if you want to have some output"

4. chmod +x /usr/sbin/myscript
5. and run it...

To run it from terminal:
1. sudo gainroot
2. myscript

Or make an QueenBeecon and put it on the desktop as an icon.

SakkeMO 2011-01-31 13:34

Re: How to script?
 
Thanks, works like a charm.


All times are GMT. The time now is 12:14.

vBulletin® Version 3.8.8