Posts

Showing posts from April, 2014

Getting started with Samsung Smart TV Apps

Image
To get started with Samsung Smart TV Apps, you need to install the SDK and the Emulator from : http://www.samsungdforum.com/Devtools/SdkDownload The emulator is a virtual box image file which can be imported to Virtual Box . You can download virtual box from  https://www.virtualbox.org/wiki/Downloads . Once you have downloaded the SDK and unzipped it, you should be able to open the IDE and from Preferences->Samsung Smart TV -> Emulator, you can choose the import virtual machine to be the emulator. Now from File->New->Project->Samsung Smart TV Apps you can create either Javascript App Project  Apps Framework App Project PNaCl App Projects We will go with Apps Framework App Project. We will name our project: And now we proceed without selecting any template project: A new project is created with the following directory structure: -app -htmls -Scene1.html -scenes -Scene1.js -stylesheets -Sce...

Getting started with Objective C in Linux

Image
Objective C is a general purpose, object-oriented programming language and is used by Apple for iOS and OS X operating system. Objective C source code program have a .m extension with their hearder files with extension .h. Installing GNUStep in ubunut: sudo apt-get install gnustep gnustep-devel gobjc Let's write the first objective C program which will print 'Hello World': File: hello.m #include int main(int n, char** argv) { printf("Hello World \n"); return 0; } We can compile the above program with the command : gcc -o hello hello.m And then we can run the compile program with the command ./hello If you compile simply as gcc hello.m then the compiled program would be a.out which you can run as ./a.out

Dynamic bit-rate RTMP streaming via CloudFront with JWPlayer

Image
CloudFront is a service in AWS , which has serves as CDN for downloadable data and stream-able data. Videos stored in Amazon S3 can be streamed using CloudFront which is in rtmp format. Here in this post I am going  to make a multi-bitrate selection for videos in JW Player which will have a result as shown in the below picture where we can choose bit-rate of videos to be played: The code for the player page is as follows: <html> <head> <script src="http://jwpsrv.com/library/H5ZwPmjuEe.js"></script> </head> <body> <div id="mediaplayer"> Loading the player... </div> <script type="text/javascript"> jwplayer('mediaplayer').setup({ playlist: [{ sources: [{ file: "videos_playlist.smil" }] }], primary: "flash" }); </script> </body> </html> Now lets create Synchroni...

Calling a script file before video plays in Roku

Image
I came across a question in stackoverflow  :  http://stackoverflow.com/questions/20958093/roku-using-urltransfer-to-call-script-file/21725120#21725120  , where one of the user wanted to execute a script before the video actually starts playing. You should be able to see more details of the problem in the above mentioned link too. The solution to this is to make HTTP call using roUrlTransfer object just before you call play function for roVideoPlayer, or if you are using roVideoScreen then just before the show function of roVideoScreen.  A pseudo code is as follows: For roVideoPlayer player=CreateObject('roVideoPlayer') * Your code to add content for the player * Your call to script player.play() For roVideoScreen player=CreateObject('roVideoScreen') * Your code to add content for the player * Your call to script player.show()

Using Amazon S3 with php SDK

Image
On signing up with Amazon Web Services, you get a Free Tier Usage for EC2, S3, for one year. Here in this post, I am going to help you understand about Amazon S3 and use it with PHP. First of all, you need to have an amazon account once you have signed up with AWS, you now can use the various AWS services. Here in this post, I am going to help you with using Amazon S3 using PHP.  You can download the PHP SDK from  https://github.com/aws/aws-sdk-php . Make AWS connection use Aws\S3\S3Client; $client = S3Client::factory(array( 'key' => 'key_value', 'secret' => 'secret_value' )); List all buckets $buckets = $client->listBuckets(); Display owner id echo $buckets->getPath('Owner/ID'); Listing items in a bucket $iterator = $client->getIterator('ListObjects', array( 'Bucket' => 'name_of_bucket' )); foreach ($iterator as $object) { echo $object['Key'] . "\n...

Connect AWS EC2 via FileZilla

Image
Today in this post, I am going to help you connect to your AWS EC2 instance via Filezilla. Before you can follow this instruction in this post, I believe you are capable of launching an EC2 instance and do SSH login to the amazon EC2 instance. With this in mind, my assumptions are that you have either the IP  /Public DNS of the Amazon EC2 instance and the key-file and you also know the user to use for SSH login.  Now to connect to your amazon EC2 instance with Filezilla, open your Filezilla and add a site configuration with the following configuration. HOST: public DNS or the IP of the EC2 Protocol: SFTP - SSH File Transfer Protocol Logon Type: Interactive User: ubuntu or root or ec2-user [ based on your amazon ami user] After  you are done with the configuration add key file from Menu Bar-> Edit -> Settings [ Connection->SFTP] A screenshot is also attached below where you are supposed to add the key file: And now you should be able to connect to ...