Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I want to be able to display a normal YouTube video with overlaid annotations, consisting of coloured rectangles for each frame. The only requirement is that this should be done programmatically.
YouTube has annotations now, but require you to use their front end to create them by hand. I want to be able to generate them. What's the best way of doing this?
Some ideas:
Build your own Flash player (ew?)
Somehow draw over the YouTube Flash player. Will this work?
Reverse engineer & hijack YouTube's annotation system. Either messing with the local files or redirecting its attempt to download
the annotations. (using Greasemonkey? Firefox plugin?)
Idea that doesn't count:
download the video
YouTube provides an ActionScript API.
Using this, you could load the videos into Flash using their API and then have your Flash app create the annotations on a layer above the video.
Or, alternatively, if you want to stay away from creating something in Flash, using YouTube's JavaScript API you could draw HTML DIVs over the YouTube player on your web page. Just remember when you embed the player to have WMODE="transparent" in the params list.
So using the example from YouTube:
<script type="text/javascript">
var params = { allowScriptAccess: "always" };
var atts = { id: "myytplayer", wmode: "transparent" };
swfobject.embedSWF("http://www.youtube.com/v/VIDEO_ID&enablejsapi=1&playerapiid=ytplayer",
"ytapiplayer", "425", "356", "8", null, null, params, atts);
</script>
And then you should be able to draw your annotations over the YouTube movie using CSS/DHTML.
Joe Berkovitz has written a sample application called ReviewTube which "Allows users to create time-based subtitles for any YouTube video, a la closed captioning. These captions become publicly accessible, and visitors to the site can browse the set of videos with captions. Think of it as a “subtitle graffiti wall” for YouTube!"
The app is the example used to demonstrate the MVCS framework/approach for building Flex applications.
http://www.joeberkovitz.com/blog/reviewtube/
Not sure if this will help with the colored rectangles and whatnot, but it's a decent place to start.
The player itself has a Javascript API that might be useful for syncing the video if you choose to make your own annotation-thingamajig.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I'm developing a system using VideoCall and Recordings. I want to show recordings in my web page, i got url recording like this
https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXX
But when i load it. it show a form to fill username/password
Can i get content of recordings for my web page without username/passwd (for example through API or something else)?
I have account_sid, auth_token, api_key information, ..etc
Please help me on this!
Thank for your help!
Twilio developer evangelist here.
The URL you have there is to the recording's resource in the API. You can get a URL for the media itself by making a request to the recording's media subresource. The media endpoint takes some arguments and returns a temporary redirect to the recording file. Check the documentation on fetching a recording's media for more information.
Note though, the recordings are not optimised for playing in a browser. The recording files are returned in the Matroska file format (.mka or .mkv). Chrome may play these, but other browsers likely won't. The best application for playing these recordings back is VLC Player.
If you are looking to generate player-friendly files check out the Twilio Video Compositions API.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I'm a beginner in swift my problem is this:
-I need to play a .MP4 video in my ios swift app - the server needs authentication
let myVideoUrl = "playmyvidmp4123.org" [as an example]
when I put myVideoUrl in a web browser a pop up appears and asks you to put in your username and password (authentication) so I put in my credentials:
User: "sherry"
pass: "789"
then the video starts downloading
How do I play these links in my app? I use alamofire for networking, so I use .Authenticate however how do I pass the data to AVPlayer/ somme player to play the video and allow for scrubbing as well
There was a technique I did before, whereby when I get the data, I convert DATA to UIImage and then display the UIImage in my image view and constantly refresh the img by timers and it plays (there is no scrubbing functionality in it either)
I do not know how to authenticate the server with the stock inbuilt method either i.e. without using alamofire. So please if someone knows, how may I accomplish this task - A code snippet would be much appreciated in which I can plug my creds, & link and test it out
Try to format your URL to video this way https://user:pass#url => https://sherry:789#playmyvidmp4123.org
I'm a professor and want to start making several short micro-lessons with embedded questions for my students to test their knowledge along the way. I've been researching some new Youtube beta features "Questions" and "Linking my Youtube Channel with my website (google site, google+, etc)
I had access to the beta "Questions" option a few days ago and it's gone now. I can edit existing annotation which includes a true/false question I added, but I can no longer see the option to add new question. Can you help me?
Can set up questions within the video that have a definite correct answer vs incorrect, and then sort through analytics to see how viewers did?
Is there a way to have different outcomes for viewers depending on whether they answered correctly (congratulations screen) vs incorrectly(rewind and replay a section of the video, then repeat question)?
Is there a way for viewers who complete the video and answer correctly to forward a "Congratulations screen" to their instructors for possible credit on assignments?
Lastly, Is there a way to integrate Google presentation with YouTube video (e.g.create slideshow in "presentation" for easier conversion to video w/ voice)? Right now I use a three step process: 1) create presentation in PPT, 2) voiceover the slides and make a video in "Captivate", then 3) upload to Youtube.
Thank you so much
I don't think that your question, as asked, has to do with the YouTube API.
That being said, we do have this blog post and tutorial video up for an open source project that integrates YouTube video content with quiz content: http://apiblog.youtube.com/2012/06/google-io-tutorials-using-ruby-on-rails.html
How can I go about allowing users to embed YouTube and Vimeo videos in my Rails app?
I'd provide a text field or text area where users can add the link of the video they wish to embed.
Click add and have my app show a spinner while the details are being gathered.
When the details are found, I'd want them displayed on the page before user can finally submit the post.
I'm guessing the HTML, link details will need to be stored in the database so the video can automatically be displayed every time the page is visited.
HTML5 has a file API that gives me the ability to display users local file data on the fly. Wondering if there is something similar for display remote data or would normal ajax be used?
Is there a standard way of doing this? Also are there any tutorials out there on how to do this in rails? Would like to go about doing this in the most safest and securest way.
I love tutorials and screencasts so I'd really be thankful for info on where I can find one to achieve what I'm trying to achieve.
Try to use open graph protocol to fetch site information before user sending the form.
I suggest the following gem:
https://github.com/intridea/opengraph
Open graph protocol:
http://ogp.me/
And I guess you should store all the fetched information in database.
The Video Thumb gem is probably what you are looking for.
It handles vimeo, youtube and potentially others.
Then you just do:
<%= VideoPlayer::player(library_item.url, 700, 420).html_safe %>
In your view to display an automatically generated embed code.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to determine if a given URL link is a video or image?
I'm building a forum and I want the facebook feature whereby when the user paste a video URL, i can automatically know its a video and display it differently??
You can check it's "mime type".
The way Facebook implemented requires quite a lot of computing power and may not be suitable for small scaled website.
After the user input the video URL, Facebook will proceed to determine if the URL belongs to a known host (such as Youtube, CollegeHumour). If the URL does not belong to a known host, Facebook will proceed to retrieve the page and determine the video parameters from the <meta> tags, according to what Facebook defines them to be.
However to keep things easy for you, maybe your forum can determine that if the URL is from Youtube, you can use Youtube's embed code to display the video.
This does not deal with MIME types, or video files directly. If it is video files, you will still need to proceed to fetch the headers of the video file, and determine what plugin or Flash player should display the video.