Youtube live streaming client

Once I needed a solution for live streaming videos. Yes, I have experience with Adobe Media Server, and it worked very well. Recent I discovered that Youtube has free services for online streaming videos, just one streaming video per account, but that’s enought. Adobe Flash Media Encoder is not on the list of supported encoders in the Youtube Streaming FAQ, but that does not mean that the encoder is bad.

Also Vmix is another app for streaming. I can say is one of the best choice if you have advanced requirements on the source side (Cameras, Videos to send on streaming). Vmix is the app all-in-one: streaming client and video switcher, and many other functions (even tally lights).

Streaming audio on mobile phone

We use mobile phones to send audio signal from mixer to other end of phone call. Here is the cable pinout.

                |‾‾‾‾‾‾‾‾‾‾‾‾‾
/‾\/‾|‾‾|‾‾|‾‾‾‾| Headphone Jack
\_/\_|__|__|____| Samsung Phone
 |    |  |  |   |_____________
 |    |  |  |
 |    |  |  |      C1    100 nf
 |    |  |  |_________||__________\ Mic     | Headphone Jack
 |    |  |       |    ||          / Line-in | Audio Mixer
 |    |  |      |‾| R1 
 |    |  |      | | 1.4 kOhm
 |    |  |       |
 |    |  |_______|________________\ Gnd     | Gnd Headphone Jack Audio Mixer
 |    |                           /         | Gnd Insert Line Audio Mixer
 |    |
 |    |___________________________\ Right   | Insert Line
 |                                / Out     | Audio Mixer
 |
 |________________________________\ Left    | Insert Line Left
                                  / Out     | Audio Mixer

Detect caller id tty

Read /dev/ttyUSB2 device from 3g dongle for incomming Caller ID number and send them to php script (Don’t forget to activate CLIP service from AT commands AT+CLIP=1). Main script that must be run in background.

#!/bin/bash
# Read ttyUSB2 device from 3g dongle for CLIP messages
# and send them to php script
 while :
do
    read -d,,,,0 RESPONSE < /dev/ttyUSB2;
    php pager.php $RESPONSE
    #echo $RESPONSE | grep +CLIP
    #sleep 1
done

The pager.php contains the following code:

include_once 'config.php';
if (isset($argv[3])) {
    $phone = str_replace('"', '', $argv[3]);
    if (is_numeric($phone)) {
        $stmt = $mysql->prepare("REPLACE INTO pager VALUES (:phone, NOW());");
        $stmt->bindParam(':phone', $phone);
        $stmt->execute();
    }
}
$mysql = null;

And the config.php file:

### MYSQL MAIN CONFIG ###
define("MYSQL_USER", "mysql_user");
define("MYSQL_PASS", "mysql_pass");
define("MYSQL_URL",  "localhost");
define("MYSQL_DB",   "mysql_db");
$mysql = new PDO('mysql:host='.MYSQL_URL.';dbname='.MYSQL_DB, MYSQL_USER, MYSQL_PASS);
$mysql->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

### DEFAULT TIMEZONE ###
date_default_timezone_set('Europe/Chisinau');

### ENABLE DEBUGING MODE ###
error_reporting(E_ALL);
ini_set('display_errors','On');

### UPLOAD BIG FILES ###
ini_set('post_max_size', '64M');
ini_set('upload_max_filesize', '64M');

How to avoid burnout as a developer

Recently, I felt on my own skin what this is. After 5 years of many successful projects all this ended with the change of my working place. Probably this was the best choice because I feel better now.

What were some mistakes that I recommend avoiding. I was the only guy in the company who works as a developer, thats why there were many tasks to do. My salary was too small to support my family (without a child, me and my wife, we could not afford a vacation in a year). Even if I work from home, it does not really help me to maintain a balance between personal life and work.

Now I’m working in a team of developers. Even if it meant for me moving from PHP to JAVA, the tasks are relative simpler than the previous. After the working hours I am free to take care of other things. And the salary is higher than the previous.

So if you have troubles in your life, do not be afraid to make changes.

Useful sources: How to Deal With Burnout