Skip to main content

Upload to YouTube using MRSS feed

In this blog, I will talk about one of the requirements related to YouTube integration. Here's the context. Your customer will publish RSS feed and your customer does not want to manually log into YouTube site and upload. The customer wants the uploading activity to be automated. He wants you to design loosely coupled application.

This is one of the typical integration requirements in the media space. Google provides YouTube APIs through which one can build stand-alone application.

Here is one of the solutions that can be implemented. In this case, design a stand-alone YouTubeUploader application that can be scheduled through Cron job. While YouTube enables developers with APIs, authentication mechanisms, client libraries, it is important to segregate roles and responsiblity of your classes. In my solution, I will make YouTubeUploader as main class which can be scheduled through cron job. This class invokes FeedParser which can access feed through http URL. Usually, the publishers now a days, use MRSS feed to syndicate the content.

Let your FeedParser parse the MRSS feed and persist in database to make sure that duplicate entries are not persisted. Develop MediaContentDownloader to download the binary content through http URL into temporary folder. Finally, develop MediaContentUploader to upload the binary content to YouTube site. Make sure to define the customer specific configuration with regard to YouTube credentials, Feed URL.

Some tips for YouTube direct Upload.

1. Use ClientLogin authentication

2. Use direct and resumeable method (first request for Upload with metadata and subsequent requests for uploading actual binary content)

3. Persist target 'Location' in a database, so that this can be used while resuming upload

4. For duplicate content check, one can produce md5 digest and persist in the database against an entry. Before uploading, make sure to create md5 digest and verify against the md5 digests persisted in the database. However, this process may have implications on performance.

Deployment diagram for your reference ...

Comments

Popular posts from this blog

Key to adopt open source product

Friends, I am working on business solution implementation on open source product called Kaltura. Kaltura is a media management solution and has loads of features that compel any business to take a peek into it. More-over this is the only complete end-to-end open source software available to handle digital assets. But it comes with its own head ache. Considering its open source, its understandable. I feel, handling these would ensure you the success in your open source product implementation. 1. In my opinion, before adopting any open source software, build the capability to deal with the inconsistency bundled in the open source software. 2. I would avoid involving external consultants for 2 reasons.      a. I am not sure, they would bring necessary expertise on to table      b. I fear that there would be little ownership, they will not see big picture of my business (neither I am interested to share it all) 3. Alternative to that is to build the tea...

Socialism Vs Capitalism

I was discussing sociallism vs capitalism with my father, who is a retired economics professor. Found some interesting facts ... Sharing them ... Socialism believes in distributing wealth equally. For example: If there is INR 10000 and 10 people in the pool, every one gets INR 1000. Wow, that sounds great in a diversified society like ours. Will this work? My take is NO. Because, the focus is only on sharing the wealth. If every one gets equal share, high acheiver will downgrade himself or herself and low acheivers will still downgrade themselves. This is a chain reaction and will reach a point where you will not have anything to distribute. The opposite side is 'Capitalism' where only the acheiver gets the rewards for his or her efforts. India adopts hybrid policy of Socialism and Capitalism, where the distribution of wealth happens through public sector enterprises and wealth creation happens through private sectors. The policies will be made in such a way that private se...

Plan your hosting options - CIR or Monthly transfer?

This blog provides an insight to plan your hosting options. Calculating CIR What is CIR? In simple terms, it is the quantity of bandwidth measured as Committed Information Rate in megabits. CIR allows you to channel as much web traffic as possible within a given bandwidth. CIR calculation will help you to model your deployment option, whether to avail hosted model, or host the application in one's own dedicated server, or avail hosting provider service for monthly transfer or avail hosting provider service in pro-rata basis. What are the important parameters one needs to consider? One important parameter is, total number of simultaneous sessions that your web application is expecting. With this value, we can derive certain other parameters that would help us in arriving at CIR. Do not mean that simultaneous sessions imply simultaneous connections. This only means that, if we assume each session represents one user, we have that many users using the application at any gi...