This article wrote when i finished AngularJS tutorial here (https://docs.angularjs.org/tutorial). It's time, i need to sit and think about development framework.
1st Django (https://djangoproject.com/) The power of Django is ORM (https://docs.djangoproject.com/en/1.7/topics/db/models/). You can build you own web site with simple great admin interface very easy.
2nd Twisted Matrix (https://twistedmatrix.com/trac/) I love this tutorial (http://krondo.com/?page_id=1327). Amazing asynchronous programming.
3rd AngularJS.
I would like to say "Keep Django or Twisted do only back-end work and Do amazing User interface with HTML5"
วันพฤหัสบดีที่ 15 มกราคม พ.ศ. 2558
วันพุธที่ 7 มกราคม พ.ศ. 2558
Fews minitue with swift and python
Notthing to do for me today. Then it's time to do something new again.
After finished projects with Kivy then i take a look to HTML5 mobile development framework.
Do i need cross platform? May be yes and may be no!
But new player is comming Swift . The first look on Swift for me is "Is it python version on native language on Apple?"
Let's first start with HTML5 mobile development framework. Then do native if it need.
ref: https://www.apple.com/hotnews/thoughts-on-flash/
ref: https://www.apple.com/hotnews/thoughts-on-flash/
วันอาทิตย์ที่ 26 ตุลาคม พ.ศ. 2557
Learn from both Kivy and Twisted
I, myself searched for many months to see what can i integrate Kivy and Twisted together.
Now my idea is come true.
https://github.com/digitaltrails/piKam
Now my idea is come true.
https://github.com/digitaltrails/piKam
วันเสาร์ที่ 11 ตุลาคม พ.ศ. 2557
Haskell, What is that for me?
Today one guy come and talk with me while he's waiting for finishing of laundering machine. He asked me about freelance in Thailand.
Am i a freelance?
He said "with freelance i can earn money more than i work in company". Is that true?
It's depend on the job you do and what kind of people see you.
In Thailand, the local company in Thailand. Most of them think in difference way.
Let's he see.
Another topic he show me the Haskell Programming Language. I heard this Haskell before , But i now in love with python.
Am i a freelance?
He said "with freelance i can earn money more than i work in company". Is that true?
It's depend on the job you do and what kind of people see you.
In Thailand, the local company in Thailand. Most of them think in difference way.
Let's he see.
Another topic he show me the Haskell Programming Language. I heard this Haskell before , But i now in love with python.
วันอาทิตย์ที่ 5 ตุลาคม พ.ศ. 2557
Another Raspberry PI with Kivy and implementation on Twisted.
I visited this site last month. At that time i did not know how to use it. But now i have any idea to do with this.
please visit this. Then i will do my test.
please visit this. Then i will do my test.
ป้ายกำกับ:
ip camera,
Kivy,
python,
raspberry pi,
twisted
วันจันทร์ที่ 29 กันยายน พ.ศ. 2557
Brewing Gst-Python
From the last post about gstreamer. I would like to do my work on Python. Then i have to brew gst-python again.
Then edit formula. My formula is. $ brew edit GstPython
$ brew create http://anongit.freedesktop.org/git/gstreamer/gst-python.git --set-name GstPython
Then edit formula. My formula is. $ brew edit GstPython
require "formula"
class Gstpython < Formula
homepage "http://gstreamer.freedesktop.org/releases/gst-python/1.3.90.html"
url "http://anongit.freedesktop.org/git/gstreamer/gst-python.git", :using => :git
sha1 ""
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "glib" => :build
depends_on "gstreamer" => :build
depends_on "pkg-config" => :build
depends_on "pygobject3" => :build
depends_on "libffi" => :build
def install
system "./autogen.sh"
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}"
system "make"
system "make install"
end
end
But!!!
Remember i've not install any python yet. Yes we use python site-packages from /usr/local/lib/python2.7/site-packages/ . Homebrew can have their python environment. Then we have to install python first.
First we have to uninstall our previous python package first. Then install python by $ brew install --verbose python
Then you will have to install GStreamer again.
It's time to brewing get-python from now.
$ brew install --verbose GstPython
Then you can try the installation by
Python 2.7.8 (default, Sep 29 2014, 18:34:51)
Type "copyright", "credits" or "license" for more information.
IPython 2.2.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: from gi.repository import Gst, GObject
In [2]: Gst.version()
Out[2]: (1L, 4L, 1L, 0L)
วันอาทิตย์ที่ 28 กันยายน พ.ศ. 2557
Streaming IP Camera to Kivy Video
Finally, after spend 3 weeks with Mac OS X Yosemite , Raspberry Pi, IP Camera that support RTSP Protocol.
Kivy is an amazing framework to start with. It's not new language but it's a new idea to bring the softwares together. GStreamer is a multimedia framework. I used this for media-handling. It's recommend by Kivy. Compiling this framework is awesome. Homebrew , another tool to get package for Mac. Previously i used fink. OS X Yosemite is my Favourite OS.
I do IP camera streaming by install MJPEG Server on Raspberry PI. But it's a Moving JPEG. Then i want to do more on RTSP and If i have luck, i can stream also audio too.
IP Camera on the market today are support both MJPEG an RTSP. But if you want to get both Video and Audio you need RTSP.
Then, this is my target.
First install Kivy. You can easily install Kivy by get the package on the Kivy web site. But I'm interesting to set up GStreamer on OS X Yosemite..
Let's compile the GStreamer.
First you need to install Homebrew. Again you can install Homebrew easy by follow the instruction from the web site.
If you install GStreamer follow the instruction on Kivy. You will only get few of pipeline. I need more pipeline!
(If you're on Debian. Believe me, Building GStreamer on Debian is very funny and easy!)
You have to read more instruction on Homebrew.
0. Install Xcode and Xcode Command Line Tool (CLT)
Without Xcode and Xcode Command Line Tool you will get error when compiling. Please see detail.
1. Install pygobject3
2. Install gstreamer
After you've build gstreamer. Please see the core elements from $ gst-inspect-1.0 . It will help you to understand what gstreamer is.
I recommend to also install gst-libav. it's former ffmpeg.
$ brew install gst-libav
3. Install gst-plugins-base
Before you install gst-plugins-base please see $ brew edit gst-plugins-base output. Then you command will be $ brew install gst-plugins-base --with-orc --with-gtk+ --with-libogg --with-pango --with-theora --with-libvorbis --with-gobject-introspection
At this plugins i would recommend you to see the plugin list here. Then you can decide which plugins you need to install.
After finished please see $ gst-inspect-1.0 output. You will see the list of plugins.
4. Install gst-plugins-good
Again, see the plugins list here. Then run $ brew edit gst-plugins-good . My installation would be
$ brew install gst-plugins-good --with-gobject-introspection --with-orc --with-gtk+ --with-aalib --with-libcdio --with-esound --with-flac --with-jpeg --with-libcaca --with-libdv --with-libshout --with-speex --with-taglib --with-libpng --with-libogg
Again. after finished please $ gst-inspect-1.0 output.
5. Install gst-plugins-bad
Then for gat-plugins-bad i also do the same way. My installation would be
note: disable dirac because it's error.
6. Install gst-plugins-ugly
My installation would be.
note: x264 is a library that often used, don't forget
Luckily i have
Test videotestsrc with this
It's amazing output on OpenGL. This is a very very famous test source for beginner.
The part to install GStreamer with plugins is completed here. But we need gst-rtsp-server
Please visit GStreamer RTSP Server Library page here.
7. Install GStreamer RTSPServer
For this you can now install gst-rtsp-server from ./autogen.sh . But for me. I'm have to do some with brew
Create brewing GstRtspStreamer
Edit GstRtspStreamer Formular
Install our Formula GstRtspStreamer
Yes, you can now have gst-rtsp-server library. You can go to make a test from git like this.
This will failed you! Please update path to support Brew
Kivy is an amazing framework to start with. It's not new language but it's a new idea to bring the softwares together. GStreamer is a multimedia framework. I used this for media-handling. It's recommend by Kivy. Compiling this framework is awesome. Homebrew , another tool to get package for Mac. Previously i used fink. OS X Yosemite is my Favourite OS.
I do IP camera streaming by install MJPEG Server on Raspberry PI. But it's a Moving JPEG. Then i want to do more on RTSP and If i have luck, i can stream also audio too.
IP Camera on the market today are support both MJPEG an RTSP. But if you want to get both Video and Audio you need RTSP.
Then, this is my target.
First install Kivy. You can easily install Kivy by get the package on the Kivy web site. But I'm interesting to set up GStreamer on OS X Yosemite..
Let's compile the GStreamer.
First you need to install Homebrew. Again you can install Homebrew easy by follow the instruction from the web site.
If you install GStreamer follow the instruction on Kivy. You will only get few of pipeline. I need more pipeline!
(If you're on Debian. Believe me, Building GStreamer on Debian is very funny and easy!)
You have to read more instruction on Homebrew.
0. Install Xcode and Xcode Command Line Tool (CLT)
Without Xcode and Xcode Command Line Tool you will get error when compiling. Please see detail.
1. Install pygobject3
$ brew install pygobject3
2. Install gstreamer
$ brew install gstreamer --with-gobject-introspection
After you've build gstreamer. Please see the core elements from $ gst-inspect-1.0 . It will help you to understand what gstreamer is.
I recommend to also install gst-libav. it's former ffmpeg.
$ brew install gst-libav
Before you install gst-plugins-base please see $ brew edit gst-plugins-base output. Then you command will be $ brew install gst-plugins-base --with-orc --with-gtk+ --with-libogg --with-pango --with-theora --with-libvorbis --with-gobject-introspection
At this plugins i would recommend you to see the plugin list here. Then you can decide which plugins you need to install.
After finished please see $ gst-inspect-1.0 output. You will see the list of plugins.
4. Install gst-plugins-good
Again, see the plugins list here. Then run $ brew edit gst-plugins-good . My installation would be
$ brew install gst-plugins-good --with-gobject-introspection --with-orc --with-gtk+ --with-aalib --with-libcdio --with-esound --with-flac --with-jpeg --with-libcaca --with-libdv --with-libshout --with-speex --with-taglib --with-libpng --with-libogg
Again. after finished please $ gst-inspect-1.0 output.
5. Install gst-plugins-bad
Then for gat-plugins-bad i also do the same way. My installation would be
$ brew install gst-plugins-bad --with-gobject-introspeciton --with-faac --with-facc2 --with-gnutls --with-libdvdread --with-libexif --with-libmms --with-rtmpdump --with-schroedinger
note: disable dirac because it's error.
6. Install gst-plugins-ugly
My installation would be.
$ brew install gst-plugins-ugly --with-gobject-introspection --with-mad --with-jpeg --with-libvorbis --with-cdparanoia --with-lame --with-two-lame --with-libshout --with-aalib --with-libcaca --with-libdvdread --with-libmpeg2 --with-a52dec --with-liboil --with-flac --with-gtk+ --with-pango --with-theora --with-libmms --with-x264 --with-opencore-amr
note: x264 is a library that often used, don't forget
Luckily i have
Total count: 163 plugins, 612 features
Test videotestsrc with this
$ gst-launch-1.0 videotestsrc ! autovideosink
It's amazing output on OpenGL. This is a very very famous test source for beginner.
The part to install GStreamer with plugins is completed here. But we need gst-rtsp-server
Please visit GStreamer RTSP Server Library page here.
7. Install GStreamer RTSPServer
For this you can now install gst-rtsp-server from ./autogen.sh . But for me. I'm have to do some with brew
Create brewing GstRtspStreamer
$ brew create http://anongit.freedesktop.org/git/gstreamer/gst-rtsp-server --set-name GstRtspServer
Edit GstRtspStreamer Formular
$ brew edit GstRtspServer
Then i do a bit of change. This is my version of GstRtspServer Formular.
require "formula"
class Gstrtspserver < Formula
homepage "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/"
url "http://anongit.freedesktop.org/git/gstreamer/gst-rtsp-server", :using => :git, :tag => "1.4.2"
sha1 ""
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "gettext" => :build
depends_on "glib" => :build
depends_on "pkg-config" => :build
depends_on "gtk-doc" => :build
depends_on "gstreamer" => :build
depends_on "gst-plugins-base" => :build
def install
system "./autogen.sh"
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}"
system "make"
system "make install"
end
end
$ brew install --debug --verbose GstRtspServer
Yes, you can now have gst-rtsp-server library. You can go to make a test from git like this.
$ git clone --branch 1.4.2 git://anongit.freedesktop.org/gstreamer/gst-rtsp-server
$ cd gst-rtsp-server
$ ./autogen.sh
This will failed you! Please update path to support Brew
$ export PATH="/usr/local/opt/gettext/bin:$PATH"
$ ./autogen.sh
$ ./configure
$ make
Let's go to example folder
$ cd examples/
Then Launch RTSP Server
$ ./test-launch "( videotestsrc ! x264enc ! rtph264pay name=pay0 pt=96 )"
From VLC try to open the network streaming from the streaming you see!
But for me i want to show you the easy from GStreamer, gst-launch-1.0
Open new terminal and then try this command
$ gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/test ! rtph264depay ! decodebin ! autovideosink
Yes for the proxy rtsp-server you can change 'videotestsrc' to 'v4l2src'
Because i'm test on the Raspberry Pi with Raspberry PI Camera Module. It's easy to try!
Kivy Layout.
It's also easy to display the Video Stream from Kivy Please try to change your widget like this
Video:
source: 'rtsp://127.0.0.1:8554/test'
size_hint: .5, .5
state: 'play'
It's also easy to display the Video Stream from Kivy Please try to change your widget like this
Video:
source: 'rtsp://127.0.0.1:8554/test'
size_hint: .5, .5
state: 'play'
สมัครสมาชิก:
บทความ (Atom)