drgjs Posted June 30, 2014 Share Posted June 30, 2014 In developing our "science outreach" You Tube Channel programming, one of the things that struck me was that the interactive elements allow delivery of "software like" videos applications. By which I mean it is possible to pre-compute a whole bunch of solutions to different problems using scientific software/programs and then allow viewers to make their way through choices/menus to get down to different levels of "granuality" of different parameters. Here is an extremely simple example, which was created to help blasting engineers visualize how changing different things effect the shock waves in the rock Certainly one feels the technical merit for science education could be quite high. Link to comment Share on other sites More sharing options...
fiveworlds Posted July 1, 2014 Share Posted July 1, 2014 (edited) The video is an mp4. You can skip to specific frames in a video using links added in youtube's video editor. In this video the left and right sides are left blank to leave space for the links. On youtube you have to specify the start and end frame for each label. So since the labels in this video are static they are added from frame 00:00:00:00 to 00:00:01:12. All they have done is specify a link to each perticular frame of interest. Video uses javascript by the way. This would be the code to do this if you wanted to. <script> // skip forward, backward, or restart function setTime(tValue) { // if no video is loaded, this throws an exception try { if (tValue == 0) { video.currentTime = tValue; } else { video.currentTime += tValue; } } catch (err) { // errMessage(err) // show exception errMessage("Video content might not be loaded"); }} </script> <video id="video" src=video.mp4></video> <button onclick=setTime(integer)></button> Note currently in order to run videos on all screens you need to use 4 formats. Mp4,WebM,OGV,FLV you tube runs ffmpeg to convert videos to all four on video upload. Which requires you own your own servers because ffmpeg runs locally on the server ie it's a C program ffmpeg.exe. Now in javascript you can read a browsers url. Then I can split the string after a perticular value and use this value as tValue. Like a get method form. So when I get video url in the html5 video context menu I am really only getting a link to that video plus the javascript tvalue. Please note the links dont have to be in the video just somewhere on the webpage. On youtube just add #t=(integer)s to your url to skip to any point in the video. Where t is your tValue. So on the right hand side there you have these links. You also see how each t value specifies a different frame. https://www.youtube.com/watch?v=OuGT4ew1ziE#t=0shttps://www.youtube.com/watch?v=OuGT4ew1ziE#t=15shttps://www.youtube.com/watch?v=OuGT4ew1ziE#t=30shttps://www.youtube.com/watch?v=OuGT4ew1ziE#t=50shttps://www.youtube.com/watch?v=OuGT4ew1ziE#t=1m8s If you were to locally host a video you could just use <a href="#t=60s">60 seconds</a> that way the page doesn't need to reload. Now youtube uses seconds, minutes and hours but only takes a tvalue in seconds so... math Edited July 1, 2014 by fiveworlds Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now