Can someone explain the difference between these two Youtube URLs? - youtube

Im building a site which opens Youtube videos onsite using Shadowbox.
I have found out that linking to a video this way ...
http://www.youtube.com/watch?v=wDZFf0pm0SE
..doesn't work (Shadowbox opens, video doesnt play). But linking this way...
http://www.youtube.com/v/wDZFf0pm0SE
.. does.
Can someone explain to me what is going on here?

The /v/ link is a direct link to the video, which is used for embedding it. You use it like this:
<embed src="http://www.youtube.com/v/wDZFf0pm0SE&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="800" height="600"></embed>
However, due to licensing restrictions some videos will fail to play in the /v/ format.
The &autoplay=1 part just tells it to start the video on page-load. (Remove it to not do that).
The normal link is used to watch the video from Youtube itself.
Hope this helps.

Related

Play music on background , Ruby on rails

What is SIMPLE and good practice to play background music in Rails App.
It's a really simple rails website. It has several static pages.
How do I playing music on background?
thanks!
I am not looking for detailed answer or code.
I just want somebody kindly point me some links, or some keywords I can search.
I googled around and did not find what I want/ Or I didnt realize that was I need.
with HTML 5, you can now use the tag like this. You can place this on any page that you want your music to play on. (layouts/application.html.erb if you want site-wide)
<audio src="public/my_audio_file.mp3" autoplay controls loop>
<p>Your browser does not support HTML5 audio playback</p>
</audio>
This link provides further details and options
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_HTML5_audio_and_video
Add this to the pages on which you want the sound
<embed src="path/to/background.mp3" autostart="true" loop="true" hidden="true"><embed>
Add it to the layout if you want it in all the pages

Why the link get from youtube get_video_info doesn't work for download?

I test with browser with the link I get from "http://www.youtube.com/get_video_info?&video_id=xx" to see if it is be able to download.
After remove some parameters from original link, some works but some still don't.
I read some post here but most of are pretty old. A lot of change since then.
I wonder if there are somebody working on this recently.
The purpose I need this is because my youtube view program need a better quality video to display.
This is link doesn't work:
http://r17---sn-tt17rn7e.c.youtube.com/videoplayback?fexp=902529%2C932000%2C906383%2C902000%2C919512%2C929903%2C931202%2C900821%2C900823%2C931203%2C931401%2C908529%2C919373%2C930803%2C906836%2C920201%2C929602%2C930101%2C930603%2C900824%2C910223&ipbits=8&expire=1364854787&sver=3&mt=1364829200&newshard=yes&id=26c94a41dba396f5&key=yt1&upn=GrcnDUPfreQ&cp=U0hVSVhQUl9NUUNONV9QSlZIOm9BbnVkMTJzOXE5&sparams=algorithm%2Cburst%2Ccp%2Cfactor%2Cid%2Cip%2Cipbits%2Citag%2Csource%2Cupn%2Cexpire&ip=173.248.214.165&itag=34&ms=au&source=youtube&mv=m&signature=9593596F58B377FAA4C8F5A4516C7F53CE473340.507CA2EA250CEED2E2B2377FD70EE1A0478EE322&type=video/mp4; codecs="avc1.42001E, mp4a.40.2"&itag=18&
What wrong with it? I removed fallback_path and replace sig with signature.
The working link is for webm. This is for h264. Both have the same kind of parameters.
And this is working now.
http://r17---sn-tt17rn7e.c.youtube.com/videoplayback?fexp=909708%2C912514%2C930802%2C932400%2C916624%2C931009%2C932000%2C906383%2C902000%2C919512%2C929903%2C931202%2C900821%2C900823%2C931203%2C931401%2C908529%2C930807%2C919373%2C906836%2C920201%2C929602%2C930101%2C930603%2C900824%2C910223&ms=au&itag=44&mt=1364825784&ipbits=8&cp=U0hVSVhQT19NUUNONV9QSlNCOlp5ZGoyMXJ3emlq&ip=173.248.214.165&upn=ohH0s8EjPyo&newshard=yes&source=youtube&ratebypass=yes&mv=m&sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&id=26c94a41dba396f5&expire=1364851187&key=yt1&sver=3&signature=798EED35782B846D2B0EA190A17E837A0DBA18EA.AD56BCF6365AAD974C18F09F352F9422084C50AC&type=video/webm; codecs="vp8.0, vorbis"&quality=large,itag=35&
That's not a supported method of interacting with YouTube. You need to use one of the official YouTube Player mechanisms to display YouTube videos.
Please familiarize yourself with the YouTube API Terms of Service if you have any more questions.

How to get video download link from youtube?

I searched far and wide and came up with nothing.
Ok, that is not completely true, there are in fact tons of solutions on the Internet (even here on stackoverflow) on how to get a download link for youtube video, but not a single one of them is working anymore, since youtube seems keep changing things all the time.
What I want to do, is to write a PHP script which will be able to download video from specified youtube page and then save it on the server in flv or mp4 format.
I can get some video information by downloading this: http://www.youtube.com/get_video_info?&video_id=VIDEO_ID
But thats about it, no matter what I do, I just cannot figure out how find the link pointing to the video download.
I tried to use this link: http://youtube.com/get_video?video_id=VIDEO_ID&t=TOKEN&fmt=18&asv=2 from one more recent solution I found, but either there is something missing in it, or it's completely outdated already too.
So how can I dig out some working link for direct video download from youtube?
There has to be some way to do it, since there are some web pages out there which provide this service.
Thank you for any advices.
I prefer RealPlayer to download videos from youtube and other video sharing sites like metacafe, funnyordie and others. You're able to download in both mp4 or flv format, save them, and view them whenever you'd like.. even if you're not online which is great for travel. http://www.real.com/realdownloader

how embedd youtube video in my webpage give me the steps to do that

hi hello i'm new in this forum and new in youtube
i also created a sample
let me tell the steps
copied a sample youtube html script from http://groboclown.net/yt_playlist/howto-embed-long.html
and on clicking the sampl.html it just show the youtube player black color that all
what is the problem i put an alert in the onYouTubePlayerReady() {
but its not printing any thing WHY? how can i do the youtube embeddig please help me any body how can i do it
is a webserver as (tomcat or jboss etc)is always needed for it then how can do this please help me any body can
The simplest way to embed a youtube on a webpage is to use the embed code provided on the youtube page the video is on. It normally looks like this:
<object width="640" height="385"><param name="movie" value="http://www.youtube.com
/v/ZZZZZZZZZZZ&hl=en_US&fs=1"></param><param name="allowFullScreen" value="true">
</param><param name="allowscriptaccess" value="always"></param><embed
src="http://www.youtube.com/v/ZZZZZZZZZZZ&hl=en_US&fs=1" type="application/x-
shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385">
</embed></object>
Where ZZZZZZZZZZZ is the video id.
The script you are using is for creating youtube playlists. It is possible they are not playing because either embedding is disabled for the video you are trying to play, or the actual URL is invalid. Youtube video IDs have a specific length, and most frequently, people mistake the ID field as the whole URI. It is not, and a Gdata resource of http://www.yout makes a very poor youtubeID.
I would suggest getting the firebug plugin for firefox to check for errors and monitor the javascript calls to make sure they are actually being called when clicked.
If you are using the youtube API, check your server log to see if the incorrect Gdata resource is being cUrled, otherwise this will = FAIL.
Normally, youtube videos are in an .flv file format, so re-embedding the video in a separate flash player might cause it to not work properly if the direct URL to that file is not accessible. Normally the raw .FLV is never accessable because this in turn is separate sub-FLV embedded within the youtube player flash object.

youtube: use youtube player in website

I am not sure , But is there any way to use YouTube video player for playing .flv file , which are stored in my own server.
any idea ?
I don't think so, you can only use it to play content hosted on their site, but there are plenty of other flash players around. Flowplayer is a common one, and there are loads more if you Google.
No.
You would have to upload the files to Youtube to use their player (which you can embed)
How ever there are many Youtube-like players (which will play .flv files on your own server), for example:
flvplayer
FPlayer
BitGravity
JW FLV Player
Flowplayer
Not that I'm aware of, but there are other options available that are very very similar.
Check out the JW Player here
I don't think so.
If you don't mind targetting just cutting-edge browsers though, you could make use of the HTML5 <video> tags:
<video src="path/to/your/video">Your browser doesn't support this.</video>
I know the beta versions of FF3.5 support this, but it is a new feature that's not widely supported yet.
Otherwise, use something like FlowPlayer as suggested in other responses.
Why not just upload the video to YouTube and embed the player?

Resources