LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-12-2010, 08:52 AM   #1
karthiksharu
LQ Newbie
 
Registered: May 2009
Posts: 15

Rep: Reputation: 0
URL has a video to stream or not.


Hi people,

Is there any way to check if a url points to a streaming video file or not programmatically.

For example with this url : http://www.youtube.com/watch?v=0gfZnWVoqZ8 I should get TRUE

and with the url : http://www.youtube.com/watch?v=0gfZnWVXXxx should return FALSE.

Program in any language will be okay but it ll be good if its Perl or PHP or Python or JAVA, JavaScript or SHELL script.

I am working on LINUX.

(note: i m not going to check with youtube's just for example's sake i ve used youtube.)

Can anyone help me with this please..

Thanks in advance.........

Last edited by karthiksharu; 01-12-2010 at 09:00 AM.
 
Old 01-13-2010, 10:03 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,958

Rep: Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672Reputation: 2672
Quote:
Originally Posted by karthiksharu View Post
Hi people,
Is there any way to check if a url points to a streaming video file or not programmatically.

For example with this url : http://www.youtube.com/watch?v=0gfZnWVoqZ8 I should get TRUE

and with the url : http://www.youtube.com/watch?v=0gfZnWVXXxx should return FALSE.

Program in any language will be okay but it ll be good if its Perl or PHP or Python or JAVA, JavaScript or SHELL script.
I am working on LINUX.

Can anyone help me with this please..
To strictly answer your question, yes, it can be done programmaticaly.

As with most all requests like this, post what you've written so far, and where you're having a problem, and we'll be glad to help. However, I doubt anyone here is going to write programs for you.
 
Old 01-13-2010, 02:09 PM   #3
karthiksharu
LQ Newbie
 
Registered: May 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
To strictly answer your question, yes, it can be done programmaticaly.

As with most all requests like this, post what you've written so far, and where you're having a problem, and we'll be glad to help. However, I doubt anyone here is going to write programs for you.




Hi .... thanks for your response and advice. Using httpfox I figured out where the urls are being redirected. When you make a Get request to that url the response header ll tell you if its a video file or not in 'content-type' field.
and by the way it was a two line program and i ve done it.

Thanks ..........

Last edited by karthiksharu; 01-13-2010 at 02:10 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
video stream pink burkie Linux - Newbie 3 06-17-2009 01:10 AM
Need to stream video on RH. Ideas/Help? devinnull Linux - Software 1 12-20-2005 07:53 PM
Video stream gateway templar_g Linux - Software 0 10-04-2005 03:38 AM
stream video from samba? greenthing Linux - Software 14 06-12-2005 02:41 AM
Capturing Video Stream suriyamohan Programming 0 03-25-2003 08:33 AM


All times are GMT -5. The time now is 04:33 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration