Menu

30 August 2011

Wxpython and GST based webcam viewer

Screenshot-video_test_1

Fork @ https://gist.github.com/6111868f00736fd4575c#


#!/usr/bin/env python
# Wxpython Port of Example 8.1 http://pygstdocs.berlios.de/pygst-tutorial/webcam-viewer.html

import wx
import gst

import gobject
gobject.threads_init()


class WxWebCamTest(wx.Frame):
def __init__(self, parent, ID, title):

wx.Frame.__init__(self, parent, ID, title)
self.SetSize((500, 400))
self.Bind(wx.EVT_CLOSE,self.destroy)
vbox = wx.BoxSizer(wx.VERTICAL)
hbox = wx.BoxSizer(wx.HORIZONTAL)

self.button = wx.Button(self,label="Start")
hbox.Add(self.button, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 4)
self.button.Bind(wx.EVT_BUTTON, self.start_stop)

vbox.Add(hbox, 0, wx.EXPAND, 0)
self.movie_window = wx.Panel(self)
vbox.Add(self.movie_window,1,wx.ALL|wx.EXPAND,4)
self.SetSizer(vbox)
self.Layout()
self.Show()

self.player = gst.parse_launch ("v4l2src ! autovideosink")
bus = self.player.get_bus()
print bus
bus.add_signal_watch()
bus.enable_sync_message_emission()
bus.connect('message', self.on_message)
bus.connect('sync-message::element', self.on_sync_message)

def start_stop(self, event):
if self.button.GetLabel() == "Start":
self.button.SetLabel("Stop")
self.player.set_state(gst.STATE_PLAYING)
else:
self.player.set_state(gst.STATE_NULL)
self.button.SetLabel("Start")

def on_message(self, bus, message):
t = message.type
if t == gst.MESSAGE_EOS:
self.player.set_state(gst.STATE_NULL)
self.button.SetLabel("Start")
elif t == gst.MESSAGE_ERROR:
self.player.set_state(gst.STATE_NULL)
self.button.SetLabel("Start")
print "Error: ", message.parse_error()

def on_sync_message(self, bus, message):
if message.structure is None:
return
message_name = message.structure.get_name()
if message_name == 'prepare-xwindow-id':
imagesink = message.src
imagesink.set_property('force-aspect-ratio', True)
imagesink.set_xwindow_id(self.movie_window.GetHandle())

def destroy(self,event):
#Stop the player pipeline to prevent a X Window System error
self.player.set_state(gst.STATE_NULL)
event.Skip()

if __name__=="__main__":
app = wx.App()
f = WxWebCamTest(None, -1, "Video Test 1")
f.Centre()
f.Show(True)
app.MainLoop()


By- Narendra Sisodiya

23 August 2011

Some New Eduvid Demos

SVG + Audio = http://code.narendrasisodiya.com/svg-whiteboard/svg-audiocast-demos/1/svg-player.html - timings generated using http://code.narendrasisodiya.com/svg-whiteboard/editor/svg-editor-recorder.html
Slides + Audio = http://code.narendrasisodiya.com/slidecast/demo-slidecasting.html - timings hand coded
Slides + Video = http://code.narendrasisodiya.com/video-slidecast/demo.html - timings hand coded

My next target to create a demo which will have multiple Elements like, multiple audio, multiple video, Slides , multiple SVG animations. All will be played in a particular sequence (will be loaded from config file).

--
┌─────────────────────────┐
│    Narendra Sisodiya
│    http://narendrasisodiya.com
└─────────────────────────┘

13 August 2011

Public Education Software News - August 2011

---------- Forwarded message ----------
From: Guru गुरु <Guru@itforchange.net>

Font

Public Software for the Public Sector
www.public-software.in

Public Education Software News
with support from UNESCO
Vol.1 No.2 August 2011
IN THIS ISSUE

         Update from the Public Software Centre
       Testimonials from public software users

         Resources of the month

         News

UPDATE FROM THE PUBLIC SOFTWARE CENTRE

Subject Teacher Forum, Rashtriya Madhayamik Shikshana Abhiyaan, Karnataka - The Public Software Centre (PSC) continues to work with government high school teachers, to create digital learning resources in Mathematics, Sciences and Social Sciences, using public educational software applications, through the Subject Teacher Forum programme of Rashtriya Madyamik Shikshana Abhiyan (RMSA), Karnataka. These teachers will, as 'State Resource Persons', train their colleagues in 15 districts across the state, over this year.

Public Software in higher education - At the invitation of the Department of Technical Education (DTE), Karnataka, and the National Institute of Technical Teachers' Training and Research (NITTTR), the PSC has participated in the syllabus revision processes for the fifth and sixth semesters of the courses offered by polytechnics under DTE. This revision identified and listed public educational software alternatives to popular proprietary tools used. Subsequently, the DTE and the NITTTR have asked the PSC to be part of the capacity building exercise, in line with the revised syllabus, to help teachers learn the identified public educational software tools. We have also worked on a pilot programme for MEI Polytechnic (Bengaluru), introducing the faculty to Ubuntu and these tools. A core group of faculty members are working with PSC to create video learning resources (called spoken tutorials) in different curricular areas. This activity is supported by the Spoken Tutorial project, part of the National Mission for Education through ICT (NMEICT), a Ministry of Human Resource Development (MHRD) programme to promote ICTs in higher education.

NEWS

The Draft Policy on Device Drivers for Procurement of Hardware for e-Governance of the Department of Information Technology, Government of India, discusses the need for device drivers on GNU/Linux operating systems. Since GNU/Linux is freely shareable and freely modifiable, implementing this policy would help government departments avoid 'vendor lock-in' into specific proprietary products only for which drivers are made available by the vendor. Read our detailed feedback.

Recent discussions about the choice of the software applications to be incorporated in the free laptops

distributed this year to students in Tamil Nadu (India) have highlighted the attempts across India to promote the use of public software in education and other fields. The state government's tender specifications specifies the GNU/Linux operating system, as well as Windows starter edition. There are pedagogical arguments for using only public software resources in education. Read more here.

The Indian Income Tax Return form ITR has successfully been migrated to public software (LibreOffice/OpenOffice) for the assessment year 2011-2012 and is available on http://freedom-matters.in. For the coming years, this initiative should be undertaken by the Income Tax department itself, in order to ensure its availability for all, and cover the remaining ITR forms as well.

The All India Council for Technical Education (AICTE) has provided a list of public educational software alternatives to proprietary applications used in engineering. This is a welcome move by AICTE to promote public software in engineering colleges, which otherwise spend huge amounts procuring proprietary software licenses or pirate software.

UK government departments have been ripped off by a 'cartel' of big IT firms

, a report by a committee of UK Members of Parliament has exposed. Some were paying as much as ten times the commercial rate for equipment and up to 3,500 pounds for a single desktop PC. In its report, the public administration committee recommends that departments use more small and medium-sized IT suppliers to increase competition and bring down prices. The full article is available here.

In India too, departments often procure IT equipment at DGS&D (Directorate General Of Supplies & Disposals) rates. The rationale of DGS@D price ceilings are relevant when prices increase, whereas in case of IT products, the prices keep reducing. Kerala IT procurement on open bidding gets IT products at prices 30% lower than DGS@D rates. One more factor which will keep procurement prices low is to encourage SMEs to participate. Many bids specify very high turnover requirements, which restrains participation in bids to very large vendors only and therefore affects competition and pricing.

   TESTIMONIALS

“The Catalyst Group strongly believes in the ideology of public-software. Given the large number of clients and the varied type of work it engages in, full adoption of public software is gradual, with a number of challenges. However, we have successfully utilised public software applications such as Kdenlive (for making videos), Thunderbird (email client) and Google Chrome and Mozilla Firefox (internet browsers) in our work. We use “project-open” as our ERP system. For new software that we need, we explore public software options. We thank Public Software Centre, ITfC for their support in helping us optimise the use of public software in our work.”

Ms. Siddhi Mankad, Catalyst Group, Bengaluru


“I have found your sessions very informative. They have got me interested in exploiting computers in my classroom transactions.”


Mary Kumari J, Lecturer (D.Ed), Bengaluru
Participant in our "Public educational software" workshop for faculty in
D.Ed institutions
which prepare elementary school teachers

      More testimonials here.

    RESOURCES OF THE MONTH

These black and white A4 posters are also available in Kannada. They can be printed and put on notice boards in public institutions to popularise and promote public software in public institutions. Lack of awareness about public software is the biggest obstacle to its widespread adoption by public institutions. These posters can create awareness through their simple messages.

Video of a presentation by Anvar Sadath, Director of the IT@Schools programme, Kerala (India), made at the Public software workshop in Bengaluru in February 2010. IT@Schools is the world's largest deployment of public educational software.


Public Software Website - www.public-software.in
To subscribe, unsubscribe or send us your feedback: PS-Bulletin-owner@public-software.in

By- Narendra Sisodiya

10 August 2011

USB LAN working fine

Usb_lan1

LAN Port of my laptop is broken.. I have purchased a USB LAN (Rs - 250) from Nehru Place-Delhi yesterday.
It is working well with Ubuntu 11.04 and I have not faced any problem atall.
I have attached its pic

lsusb :

Bus 002 Device 004: ID 0fe6:9700 Kontron (Industrial Computer Source / ICS Advent)

By- Narendra Sisodiya

08 August 2011

How to Learn PHP ?

Gautam Chaudhary
I've been into php for more than 3 years now, and at very stage i felt that i'm an expert only to realise that there are still so so many things i don't know!!
One needs to keep developing different things and you get new experiences with every project.

Ankur Gupta

‎1) Book / Manual which I should eat
PHP/MySql Novice To Professional
2) Website which should I scan fully
Nettuts, DevShed, Planet PHP
4) framework or plain coding ??
CodeIgniter, Zend Framework


Nilesh Govindrajan
Don't go for frameworks at learning stage. Use a framework, write framework code and try to understand how it works, what coding pattern has been used, etc. Zend Framework is the best for this, I learned from Zend.

To master PHP, all you need to do is write more & more programs. Read the official PHP manual, its pretty exhaustive.

One of the best ways to learn PHP is, take a complex framework like Zend, understand its features, and try to build a framework from scratch. This is just for learning, using your own framework is strictly not recommended, you yourself know the difference between closed & open source and advantages of open source.

Sayan Chakrabarti
‎1) Book / Manual which I should eat
The PHP manual is excellent. Peruse the comments.
Try any O'reilly book if you are new to web programming in general.
2) Website which should I scan fully
w3schools, tizag
3) php programming patterns which got repeated in common website
devhshed, google
4) framework or plain coding ??
CodeIgniter or Kohana to start with, if at all. Best is to code in raw PHP at first. Symfony, CakePHP, Zend etc are great, but to my taste, they are too imposing: You need to learn the framework more than PHP.

Biswajit Kumar Das JoNy
It depends on which timeframe you are looking for. If you are good Developer or you know basic frameworks of Programming Concepts you are good to go with w3schools and php.net and start doing your coding stuff. Hardly 3-4 days, and you can start building almost 99% of stuffs which available on NET by PHP. ;-)

Framework? I am not sure why do you need that, apart from if you are not so confident about your style of Coding. :P

By- Narendra Sisodiya

03 August 2011

Android 3.2 में भी हिन्दी समर्थन नहीं, कृपया हिन्दी समर्थन हेतु वोट करें

---------- Forwarded message ----------
From: ePandit | ई-पण्डित <sharma.shrish@gmail.com>
Date: 2011/8/3
Subject: [चिट्ठाकार] Android 3.2 में भी हिन्दी समर्थन नहीं, कृपया हिन्दी समर्थन हेतु वोट करें
To: Chithakar <Chithakar@googlegroups.com>


Android 3.2 (टैबलेट वाले हनीकॉम्ब का नवीनतम संस्करण) जारी हो गया है पर हिन्दी समर्थन नहीं। तीन साल हो  गये ऍण्ड्रॉइड में हिन्दी का इन्तजार करते, इस इन्तजार में बूढ़े न हो जायें। आम हिन्दी उपयोक्ता ऍण्ड्रॉइड वाले फोन तथा टैबलेट खरीदना चाहता है पर हिन्दी समर्थन न होने से मन मसोस कर रह जाता है।

खैर इसमें गूगल की गलती नहीं हम भारतीयों की है। पहले अरबी का समर्थन भी नहीं था, 2010 में इसका बग दर्ज किये जाने पर कुछ महीनों में ही उसे कोई 5000 वोट मिले तो अगली रिलीज में अरबी शामिल कर ली गयी। जबकि हिन्दी सम्बन्धी बग 2008 से दर्ज हैं पर वोट सैकड़े से आगे जाते ही नहीं, पर्याप्त वोट न होने से वो प्राथमिकता सूची में नहीं आता। अब बताइये दोष किसका है गूगल का या हमारा? आम फोन, टैबलेट उपयोक्ता को छोड़ भी दें तो नेट पर हजारों हिन्दी पढ़ने-लिखने वाले होने पर भी हम वहाँ जाकर वोट करने का भी जहमत नहीं उठा सकते।

http://code.google.com/p/android/issues/detail?id=12981

अब तक एक इश्यू को अधिकतम 570 के करीब वोट मिले हैं। अगर वोट हजारों में पहुँच जायें तो प्राथमिकता सूची में ऊपर जाने पर गूगल बाबा इस तरफ जरुर ध्यान देंगे।

मेरे विचार से हमें नेट पर सभी माध्यमों (समूह, ट्विटर, फेसबुक, ब्लॉग आदि) का उपयोग करके इस काम के लिये वोट जुटाने चाहिये। अपने अधिक से अधिक मित्रों को इसके लिये वोट करने को कहें।

इस प्रकार के कुछ पुराने इश्यू यहाँ देखें।
http://code.google.com/p/android/issues/detail?id=17011
http://code.google.com/p/android/issues/detail?id=4153
http://code.google.com/p/android/issues/detail?id=1618
http://code.google.com/p/android/issues/detail?id=3029

कृपया सभी बग्स पर जाकर वोट करें। वोट करने के लिये ऊपर बायें कोने में स्टार पर क्लिक करें यह पीला हो जायेगा।

By- Narendra Sisodiya

01 August 2011

[idea] Linux Daily Links

There are appx 100-200 Twitter whom you have to follow to get daily information on new news on FOSS or tutorial or digest.. following all these 200 accounts and reading 2000 Tweets per day is a pain.
in Twitter there are 3 types of things happen
1) personal tweets -- airtel sucks ?
2) discussion -- what is your email Id ?
3) links -- here is my new blog on FOSS --- ?

third part is the informative and what we need.
So I need a mechanism where we can get all FOSS news in daily and weekly digest.
We can create a team and web services. Here is the idea.

We can setup a crawler account on Identi.ca/Twitter which follow all 200-500 FOSSy guys all around.
1) daily at 10pm, our web-application fetch all Dents and Tweets. I guess it can be done via RSS feeds and API.
2) Delete all Dents and Tweets which do not contain URL
3) Next System will find duplicate. How ? If two URL are same then delete one post.
4) Next Show all Dents/Tweets into one single page where our team member will login and see all the post and they can now delete or rearrange their order or edit text. duplicates can be removed at this stage. non-relevant URL/posts can be removed. If 20 user login and do this task, then it will be a 10-15 minute job which we can spend rather then spending 2-3 Hour on polling.
5) At Morning it can released as news Collaborative FOSS News Paper..

How is the idea ??

By- Narendra Sisodiya