YouTube Video Download usign Application

You must Login before you can answer or comment on any questions.

Hello.

how to make an application using that user can download videos from youtube in iphone/ipod and can watch it later.

3 Answers

Hi Jay

I assume you have worked with Google to licence their videos of for offline use within your app? This will be a much harder process than the actual code.

To achieve this though you will need to go through these steps;

  • Use HTTPClient to retrieve a the web page the Video is shown in, this can be done using their standard URL and the unique video code.
  • Parse the HTML that was returned - looking for the EMBED, OBJECT or VIDEO tag dependant on how the page is made up using Regular Expressions. There are different pages for each main type.
  • Take that returned snippet and another Regular Expression to determine the URL portion.
  • Use HTTPClient again to download that File.
  • Done.

BTW you should remember that iOS can only show MP4 style video and not flash videos, so downloading anything ending .swf or .flv will not help, but .mp4 or .mov will be more likely.

Good luck.

simply provide logic to get the flashVideo downloader functionality. for this you will have to google it that how to support flash video download in iphone app. you will get bunch of articles. my suggestion for you is, use module development approach for this.

1: build a native module and use it in titanium app. 2: to build native module you will get helping code from all these links.

link1, link2, link3,link4.

— answered 11 months ago by Ashish Nigam
answer permalink
2 Comments
  • link 3 seems better than other to go with module development approach.

    — commented 11 months ago by Ashish Nigam

  • I was searching for titanium Help not for xcode.. thank for sharing

    — commented 11 months ago by jayesh joshi

hey Jay, i was looking for your problem, i found this is useful and its java script based so, it will work with titanium as well. checkout this link

— answered 11 months ago by Ashish Nigam
answer permalink
3 Comments
  • Hi Ashish

    This will only resolve flash videos - which cannot be played on iOS devices.

    — commented 11 months ago by Malcolm Hollingsworth

  • Malcolm, you can also download high definition video, and most important is you can convert the file format before downloading, but that thing can be achieved using some tools and app or you can write your own module for that.

    — commented 11 months ago by Ashish Nigam

  • Or you could download the mp4/mov and not have to do any of that.

    — commented 11 months ago by Malcolm Hollingsworth

Your Answer

Think you can help? Login to answer this question!