jPlayer playbackRate Audio Speed Control for Podcast Player


Hits: 84  

Today one of my customer need Audio PlayBack Speed Control for HTML5 Audio Player. His requirement is that many people speak too slow on
podcasts. He wants to speed up the playback so that he don’t have to take so much time to listen to the podcast.

He actually wants button for speed [ 0.5x, 1x, 1.5x, 2x, 2.5x ] on HTML5 Audio using jPlayer.

jPlayer playbackRate

jPlayer playbackRate
Number : (Default: 1) : Defines the playback rate. Recommend that the jPlayer({defaultPlaybackRate}) matches this value during initilization.
http://jplayer.org/latest/developer-guide/#jPlayer-option-playbackRate

jQuery(“#jplayer”).jPlayer(“option”,”playbackRate”, 1.5);

jQuery(“#jplayer”).jPlayer(“options”,{defaultPlaybackRate : 1.5});

<script type="text/javascript">

var currentSpeedIdx = 1;  
var speeds = [ 0.5, 1, 1.5, 2, 2.5 ];

function jpSpeedControl()
{

currentSpeedIdx = currentSpeedIdx + 1 < speeds.length ? currentSpeedIdx + 1 : 0;

jQuery("#jplayer").jPlayer("option","playbackRate", speeds[currentSpeedIdx]);

jQuery("#jpSpeedControl").html( speeds[currentSpeedIdx] + 'x' );

}

</script>

<div id="jpSpeedControl" title="Speed" style="cursor:pointer;" onclick="jpSpeedControl();">1x</div>

A Guide to Growing Your Agency by Upselling Clients


Hits: 188  

How upselling clients can help your agency to grow
As a web design agency are you currently concentrating most of your energies on attracting new clients as opposed to upselling existing ones? If you are then this could be a mistake. It can often take a lot less effort to sell a further service to a client you have already worked with than it does to persuade a new client to hire you. Most importantly, the financial rewards can be impressive and can help with the growth of your agency.

It’s unlikely that clients are going to completely update their website on a regular basis so you need to think carefully about services which you can offer. Do not forget that clients are going to be most interested in services that can secure them increased leads, sales and revenue. Let’s take a look at some of the ways in which you can upsell existing clients.

Optimising conversions
Conversions are likely to be one of the most important considerations for your clients. You can offer them the ability to optimise conversions by using the very latest functionality in areas such as check out functionality and live chat features.

Optimising performance
Website performance is always an important factor when it comes to attracting and retaining customers. This is why offering to monitor the performance of a client’s website, and provide suggestions for optimisation, is a good idea. Have any features been added that make the website slow to load, for instance. This is an important issue as slow load times are one of the major factors when it comes to deterring people from using a website.

Optimising analytics
If analytics are not optimised then it’s hard to tell how well aspects of a website are performing. It’s important that a client has the latest analytics in place in order for them to see where changes might be necessary in order to maximise ROI from their website. If you can offer them your analytics expertise you are upselling a vital product.

How to charge when upselling clients
There may not be a one size fits all option when it comes to upselling; you have to decide on solutions that are the best fit for you and the client. Options include:
• Charging by the hour. This is just as it says; the client is charged for each hour you work for them.
• Charging a retainer. You may find it easier to obtain a retainer from the client which guarantees them a certain number of hours service from you which they can use when they need them.
• Charging by subscription. One of the easiest methods of charging for your services is to use a subscription system which involves the client paying a set amount each month or year for an agreed level of service.
These are just some of the charging methods you can consider.
If you speak to any professional web design agency they will tell you how vital their services can be; you can learn more here. This is why agencies should always upsell existing clients with the message that all of the ongoing services we have highlighted are very much needed.

SQL: The Essential Database Language


Hits: 1022  

Structured Query Language (SQL) is a specialised programming language designed for use with databases. SQL is a standard language when working with relational databases, allowing rapid sorting of large databases. If you are serious about a career in IT, then SQL training is essential, even if you don’t plan on becoming a database specialist. There are different levels of tuition, and it is recommended to begin with the introductory course.

Introduction to SQL

The SQL introductory program covers the basics, and shows you the capabilities and key features of SQL. This one-day course is very much hands-on, beginning with an introduction to SQL, followed by an overview of relational databases, and how SQL works within that context. You will work with an example database, and learn how to run SQL queries in order to familiarise yourself with the interface.If you are interested, you can invest in a SQL training course here, with a range of training programs on all aspects of SQL.

Writing basic SQL statements

This involves selecting columns and tables from a database using SQL, then learning how to execute queries. Once this has been covered, you will learn how to limit the data returned by introducing the “WHERE” section of SQL queries, as well as how to sort the outputs.

Grouping data

This involves using the aggregate function to introduce sub totals, followed by an introduction to the “HAVING” statement, and the “GROUP BY” function. The final stage of the introductory SQL course looks at working with functions and dates. Before learning how to use SQL, it is essential to have a sound working knowledge of Microsoft’s Excel program. Here is some useful information regarding Excel and its capabilities.

Advanced SQL training

Beginning with a review of the introductory program, this course will further develop the learner’s ability to manage a relational database, with an introduction to more complex commands and queries. At this stage, you are introduced to data manipulation language (DML) and database definition language (DDL), which will enable you to build database objects and execute complex statements.

You would learn about SQL scripts, which are a set of SQL commands that can be saved as a file, allowing you to repeat queries without having to retype. This includes the use of parameters in your query, in addition to a look at query output presentation. Other essential sections of this level include,

– SQL syntax
– Managing tables
– Managing views
– Getting data from multiple tables
– SQL functions

The final part of this program deals with advanced ways to control select queries using SQL. You will also be shown how to order and produce sub totals from a query. The final section includes applying conditions to your query.

The right training produces competency

If you are planning to become SQL proficient, it is important to choose the right training course, with instructors that understand the problems you will face when using SQL. There are reputable online training institutions that have the knowledge and experience to help you understand and effectively work with SQL.

Live Transcoder for Nimble Streamer


Hits: 1105  

WMSPanel’s Transcoder for Nimble Streamer is a premium add-on for Nimble Streamer which can decode, transform and encode live streaming media.

The Transcoder use H.264, MPEG2 video and AAC, MP3, MP2, Speex audio as Input. It support RTMP pulled and published, RTSP pulled and announced, MPEG-TS via HTTP and UDP as input protocols.

The Transcoder use H.264/AAC with pass-through support as Output. It support HLS, MPEG-DASH, RTMP and RTSP playback and re-publish, MPEG-TS playback and multicast as output protocols.

Transcoder for Nimble Streamer apply existing FFmpeg filters to the processed content.

– FFMPEG Filters are applied without streams interruption
– 4 different strategies for adding key frames alignment
– Resize / crop to create multiple resolutions
– Graphic overlays, picture-in-picture video
– Make filtering chains without additional decoding
– Audio transrating, e.g. 256Kbps to 192Kbps
– Audio re-sampling, e.g. 44KHz to 22KHz
– Mix several audio sources
– Add any custom or third-party filter

The Transcoder is provided per monthly subscription with an affordable pricing. With Nimble Streamer your total cost of ownership will be as low as possible.

Setup SHOUTcast Radio server on Linux


Hits: 2739  

Download and install SHOUTcast DNAS server software

Create new user for running SHOUTCast:

# useradd shoutcast

Download Shoutcast DNAS package: http://download.nullsoft.com/shoutcast/tools/

# wget http://download.nullsoft.com/shoutcast/tools/sc_serv2_linux_x64-latest.tar.gz

Extract SHOUTcast files:

# mkdir sc
# tar -xvf sc_serv2_linux_x64-latest.tar.gz -C sc

Change the ownership from root to the SHOUTcast user:

# chown -R shoutcast:shoutcast sc

Configuring SHOUTcast Server

# cd sc
# nano sc_serv.conf

Copy below content to file sc_serv.conf

adminpassword=password
password=password1
requirestreamconfigs=1
streamadminpassword_1=password2
streamid_1=1
streampassword_1=password3
streampath_1=http://Server-IP-Address:8000
logfile=sc_serv.log
w3clog=sc_w3c.log
banfile=sc_serv.ban
ripfile=sc_serv.rip

Start SHOUTcast server

# ./sc_serv sc_serv.conf

sc2

Please make sure shoutcast port must be open in server firewall

Manage SHOUTcast Server and Create Daemon script

# ps aux | grep sc_serv ## Get Server PID
# killall sc_serv ## Stop server

# vi /usr/local/bin/shoutcast

Content of /usr/local/bin/shoutcast

#!/bin/bash
case $1 in
start)
cd /root/sc/
./sc_serv &
;;
stop)
killall sc_serv
;;
start_daemon)
cd /root/sc/
./sc_serv daemon
;;
*)
echo “Usage shoutcast start|stop”
;;
esac

# chmod +x /usr/local/bin/shoutcast
# /usr/local/bin/shoutcast start
# /usr/local/bin/shoutcast stop

Automatically start the Shoutcast server after server reboot
# echo “/usr/local/bin/shoutcast start_daemon” >> ~/.bashrc

Wowza Live Stream thumbnail images with HTTP Provider


Hits: 3856  

To get thumbnail images from Wowza Transcoder with an HTTP Provider Wowza Media Server 3 or later is required.

Config file to edit for Wowza Live Stream Thumbnails
[wowza-install-dir]/conf/VHost.xml

<HTTPProvider>
<BaseClass>com.wowza.wms.transcoder.httpprovider.HTTPTranscoderThumbnail</BaseClass>
<RequestFilters>transcoderthumbnail*</RequestFilters>
<AuthenticationMethod>none</AuthenticationMethod>
</HTTPProvider>

 

PHP code

//No Authentication
exec(‘curl “http://[wowza-ip-address]:8086/transcoderthumbnail?application=[application-name]&streamname=[stream-name]&format=[jpeg or png]&size=[widthxheight]”‘);

//With Authentication
exec(‘curl – -digest -u [wowza-admin-user]:[wowza-admin-password] “http://[wowza-ip-address]:8086/transcoderthumbnail?application=[application-name]&streamname=[stream-name]&format=[jpeg or png]&size=[widthxheight]”‘);

[wowza-ip-address]: The IP address of the server running the Wowza media server
[application-name]: The application name the stream is running live
[stream-name]: The stream name of the live source stream.
[format]: Format of the image: either jpeg or png
[size]: Size of the thumbnail image.

Error

HTTPTranscoderThumbnail.onHTTPRequest[live/_definst_/[stream-name]]: Live stream encoder not found

Make sure Wowza is configured for Transcoding of live streams with Transcoder Addons.

live_stream_transcoder_addons

You will see some live encoded wowza streams based on selected transcoding template

live_stream_encoder

Importing data from non-wordpress mysql database


Hits: 3052  

You have to create an import php file to get the Questions/Answers from a non-wordpress database and bring them into posts in wordpress.

Question Table

<?php

/// non-wordpress database connection string here

require('./wp-load.php');

$results = mysql_query("SELECT * FROM questions");

while ($row = mysql_fetch_assoc($results)) 
{

    $post_information = array(
	'post_title' => wp_strip_all_tags( $row['question'] ),
	'post_content' => $row['answer'],
	'post_category' =>  array(6,7), // Cat Ids
	'post_date' => date('Y-m-d H:i:s', strtotime( $row['timestamp'] )),
	'post_type' => "post",
	'post_excerpt' => "",
	'post_author' => "admin",
	'post_status' => "publish"
	);
	
	$post_id = wp_insert_post( $post_information );		
	
	$filename = "http://www.domain.com/images/post-image.png";   ////  Post Thumbnail Image
	$wp_filetype = wp_check_filetype(basename($filename), null );
	
	$attachment = array(
	  'post_mime_type' => $wp_filetype['type'],
	  'post_title' => preg_replace('/\.[^.]+$/', '', basename($filename)),
	  'post_content' => '',
	  'post_status' => 'inherit'
	);
	
	$attach_id = wp_insert_attachment( $attachment, $filename, $new_post );
	
	//update_post_meta($post_id,'_thumbnail_id',$attach_id);	
	
	add_post_meta($post_id, '_thumbnail_id', $attach_id, true);

}

?>

Install Red5 Media Server on Ubuntu / Debian


Hits: 4977  

Red5 is free media server based on Java and other open source frameworks. It support FLV, F4V, MP4, 3GP, MP3, F4A, M4A, AAC and protocols like RTMP, RTMPT, RTMPS, RTMPE.

Install Red5 Media server
# apt-get install red5-server

Red5 Need below ports open in firewall / iptable
RTMP: 1935
Debug proxy: 1936
HTTP servlet: 5080
RTMPT: 8088

Red5 Installed location
/usr/share/red5/

Red5 application in the location
/usr/share/red5/webapps

Install demo Red5 Applications
# wget http://www.red5.org/downloads/red5/1_0_1/red5-1.0.1.zip
# mkdir red5/
# cd red5
# unzip ../red5-1.0.1.zip
# cd red5-server-1.0/
# cp -R webapps/root/demos /var/lib/red5/webapps/root/demos
# cp -R webapps/installer /var/lib/red5/webapps/installer
# find /var/lib/red5/webapps/ -type d -exec chown _red5 {} \;
# /etc/init.d/red5-server restart

Red5 Installer
http://server-ip-address:5080/installer/

Red5 Demo
http://server-ip-address:5080/demos/

User Agent Parsing with PHP


Hits: 2856  

Tobie Langel’s ua-parser, a great library which provides simple UA parsing in PHP, JavaScript and Python.

<?php require_once 'uaparser.php';

$ua = $_SERVER['HTTP_USER_AGENT'];
$parser = new UAParser();
$result = $parser->parse($ua);

echo '<pre>';
print_r($result);

?>

Mistserver Manager Login

Find more libraries here...

https://github.com/rjd22/ua-parser/tree/master/php
https://github.com/Synchro/ua-parser