Tuesday, May 22, 2018

Open source software technology seminar at TUIT

From 15th, May to 17th, May, a seminar sponsored by NIPA was held at TUIT, Uzbekistan.  This seminar was the 3rd follow-up action of Korean-Uzbekistan government MOU for the invigorating open source activity and I presented for the last day with "GStreamer & IoT". In my session, I introduced the basic concept of IoT and some use cases of GStreamer in IoT domain, and also I didn't forget to say what Open source software developer does.



Most of the attendees were students or government officials who are willing to be involved in open source project in a direct or indirect way. Usually, they seemed to be interested in developing Uzbekistan industry through the international exchange like this seminar. Especially, according to a professor at TUIT, they started a long-term plan to develop agriculture with IoT technology so they need advisors around the world.


After the session was over, we had extra time for QnA. Although I could give them answers properly, there's one unanswered question,  "How can open source software developer help the developing world?".  It is because I haven't thought of this serious question except for donating. It might be a big homework for me.

I'd like to thank my sponsors; Collabora for time, NIPA for flight and accommodation.

Monday, February 19, 2018

SRT, typical examples

Following last week's blog post announcing SRT in GStreamer, I'd like to briefly discuss another way to use an SRT stream: with VLC 3.0!

Released earlier this month, the latest version of the free & open source multimedia player (which also uses the GStreamer framework) now contains SRT modules which had been in development in VLC's master branch. Let's take a look at what VLC says.

$ vlc --list | grep srt
VLC media player 3.0.0 Vetinari (revision 3.0.0-3-g7821ebf808)
  access_output_srt      SRT stream output
  access_srt             SRT input

These modules can be seen in VLC’s preferences menu if “Show All” is checked in the preferences window.

As we can infer from the name, VLC has input/output SRT modules. The basic usage isn’t different from the case when using UDP or TCP-based stream. From Olivier's article, we got a typical example to stream via SRT, then let's create SRT stream.

gst-launch-1.0 v4l2src ! video/x-raw, height=1080, width=1920 \
    ! videoconvert ! x264enc tune=zerolatency ! video/x-h264, profile=high \
    ! mpegtsmux ! srtserversink uri=srt://:8888/


Then, now, VLC can play the SRT stream with the URL, "srt://ip_address:8888/".



Limitations

Yes, The current SRT modules in VLC is able to work as an SRT player and an SRT stream generator. However, there are some limitations because VLC released version took a part of SRT module patch set.

 - Stream Encryption

To encrypt and decrypt SRT stream, a passphrase is required. The passphrase property patches have already been merged into VLC master, but not yet released. We are looking forward that next version of VLC has this feature.

 - Connection modes

We have created 4 different elements for GStreamer, but the current VLC modules only support client mode. That means the current version of VLC can play only if an SRT stream generator runs in listener(server) mode. Supporting all modes in SRT modules of VLC would be next challenge for us.

Conclusion

Hopefully, SRT modules in VLC, also GStreamer SRT plugins will have helped you to build SRT applications. Let's discuss the details of SRT with VLC and GStreamer!

Wednesday, January 17, 2018

Windows 10을 위한 GStreamer 이미지 빌드

다른 방법: GStreamer 릴리즈 버전을 Windows 10에서 사용하는 방법

GStreamer 최신 버전은 릴리즈 버전과 다르게 새로운 기능들을 많이 포함하고 있어 기능을 테스트 해보기에는 좋으나  Windows 10에서 빌드는 생각보다 쉽지 않아 Docker를 통해 빌드 하는 방법을 포스팅합니다.

주의점:
  • 테스트 목적으로 사용할 것을 권고
  • 실행 시점의 GStreamer master 브랜치를 사용하기 때문에 항상 다른 결과물을 얻게됨

Docker 이미지 빌드


아이러니하게도 현재 가능한 방법 중 가장 쉬운 빌드 방법은 리눅스를 이용하여 크로스 컴파일 하는 것입니다. 크로스 컴파일 환경 구성부터 사용자 별로 다를 수 있기 때문에 테스트 가능한 환경을 Dockerfile로 작성해보았습니다.

  $ curl -o Dockerfile \
    https://gist.github.com/justinjoy/df218013356815ad6e3d0211458a4214
  $ docker build  -t joykim/cerbero-build .

Docker 이미지 실행


위 명령으로 생성된 Docker 이미지를 손쉽게 사용하기 위한 docker-compose.yml은 다음과 같습니다.

version: '3'
services:
  cerbero-build:
    image: joykim/cerbero-build:latest
    hostname: cerbero-build
    volumes:
      - ./work:/work

혹은 다음 명령으로 다운로드 할 수 있습니다.

  $ curl -o docker-compose.yml \
    https://gist.github.com/justinjoy/1641cd0d65f7ea285e144e3b615f3431

Docker 이미지에서 bash를 실행하여 빌드가 가능한 쉘을 실행하도록 합니다.

  $ docker-compose run cerbero-build bash

cerbero 빌드

Docker 내부에 cerbero를 가져와서 빌드를 시작합니다.
  worker@cerbero-build:~$ git clone git://anongit.freedesktop.org/gstreamer/cerbero
  worker@cerbero-build:~$ cd cerbero
  worker@cerbero-build:~/cerbero$ ./cerbero-uninstalled -c config/cross-win64.cbc bootstrap
  worker@cerbero-build:~/cerbero$ ./cerbero-uninstalled -c config/cross-win64.cbc package gstreamer-1.0

빌드가 성공적으로 끝나면, 생성된 두 파일을 Windows 10 으로 복사하여 사용할 수 있습니다.

  • gstreamer-1.0-windows-x86_64-1.13.0.1-devel.tar.bz2 (헤더와 정적 라이브러리)
  • gstreamer-1.0-windows-x86_64-1.13.0.1.tar.bz2 (동적 라이브러리)