Cannot Find working code for Youtube end time - youtube

I am doing a Powerpoint presentation where I need a 30ish second clip. I have tried so many codes to get this YouTube video to stop playing but nothing seems to work. I'm using Office 365, with the newest version of PPT.
Here is the video and I need it to start at 159 and stop at 185. I have tried ?start=158&end=185 to no avail! I've tried other variations. It starts fine but won't stop!
https://www.youtube.com/watch?v=3hHdoOxs_LQ........
Here is the video and I need it to start at 159 and stop at 185. I have tried ?start=158&end=185 to no avail! I've tried other variations. It starts fine but won't stop!
https://www.youtube.com/watch?v=3hHdoOxs_LQ........

I don't have PowerPoint for create a sample, but, you can try and embed the video in your PowerPoint presentation as follows:
https://www.youtube.com/embed/3hHdoOxs_LQ?start=159&end=185&autoplay=1
Source
I tried this link in my broswer (Google Chrome) and it works.
It should embed the video and play the video at the given start and end time.

Related

Embedding Youtube videos not working with Node-webkit

I have an embedded youtube video in my nw.js app. The preview for the correct video shows up properly but when I click to play it I am met with the following error:
An error occurred, please try again later
All of the videos in the app get this error, except for one that gets this puzzling error:
The following video contains content from the International Basketball Federation
When I click these videos, I can see the first split second of the video before the error shows up.
I tried enabling/disabling the webkit plugin in the manifest:
"webkit": {
"plugin": true
}
and I tried using the Javascript Player API as suggested by in this post. However I still get the same errors.
How can I get these videos to play properly?
Here is the HTML (I'm using angularJS and the video is in a modal window) that displays the video:
<script type="text/ng-template" id="myModalContent.html">
<object width="100%" height="600px" data={{video}}>
</object>
</script>
I also tried copying this example using the Javascript Player API and even tried using the same video as the example but I'm still getting the same error.
Thank you very much for your time. Let me know if you need anything else from me or if I am being unclear.
Ok so the issue was the ffmpegsumo.dll. At first I tried replacing it with the dll from chrome 39 and 42 and that did not fix my issue. After replacing the file with the ffmpegsumo.dll from Chrome 38.0.2125.122, my issue was fixed and videos played as expected.
Chrome 38.0.2125.122 ffmpegsumo.dll 32 bit
Chrome 38.0.2125.122 ffmpegsumo.dll 64 bit
You need the flash plugins in the plugins directory at the same root level as the package.json NPSWF32_13_0_0_214.dlland NPSWF32_14_0_0_125.dll. This with the above will enable Flash.
Had the same problem in Linux 64 bits using Yeoman Node Webkit Generator (https://github.com/Dica-Developer/generator-node-webkit/wiki/Getting-Started)
Just fixed it by adding the so lib:
$ cp nwjs/nwjs-v0.12.0-linux-x64/libffmpegsumo.so dist/Linux64_v0.12.0/

PPTx with embedded video play on iOS

I am making an application which should be able to play any videos embedded in a PPTx. Currently using Quicklook Framework for iOS I am able to see the text or any images but not able to play the video. I thought of one solution as, Converting the PPTx to zip and then parse the XML files to give the video and then play, which doesn't look very practical as it needs to be done for every file where the structure keeps changing with very slide/PPT Slideshark is able to play videos embedded in a PPT. Any Ideas on how to achieve this ?
Converting PPTs into HTML5 is one of the solution.

Audio never loads on iPad but it works perfect on emulator - PhoneGap + Howler.js

I am using Howler.js on my PhoneGap application. Because my audio files are large (more than 10Mb) im an setting the buffer attribute to true (forcing HTML5 Audio).
var theSound = new Howl({
urls: ['assets/Sound.m4a'],
buffer: true,
sprite: {
scene0 : [ 1966000, 27000] }
When I test my application on the emulator and my iPad Mobile Safari everything works well. But when I run the application on the iPad as an app, the audio never starts. Using the web inspector I have noted that the audio file tries to load again and again like an not ending loop. You can see an attached screenshot of the resources tab on the web inspector both both the emulator and the iPad, running the same PhoneGap app.
Any idea on what could be the problem?
I've been looking into this for a while.
From what I've gathered, Howler defaults to Web Audio API, and this SO answer says you need a "user input event" to make it work on iOS, because by default it mutes everything. I even tried Howler's own interactive demo on my iPad 2 with iOS 5 (I still haven't updated) here and NONE OF THE SOUNDS WORK. My first link has a link to Apple's documentation, and I haven't tried it yet, but it looks like the convenience of Howler has to be replaced with a lower level implementation that takes about 5-10 lines with XMLHTTPRequest (see the Apple link), or another more versatile library. I'm still learning about what exactly I need, but I have a very similar problem I've been working on resolving today.
But then Howler falls back to HTML5 Audio. OK so I'm just googling that now, and this link comes up, and it's just reminding me of the pletora of compatibility considerations between OGG ACC MP3 etc on various browsers vs. browser layout engines vs. operating systems. So I'm left believing your file format M4A, related to MP3 as far as I can tell, isn't working in the target brower on the target iPad OS. I'm not familiar enough yet to give exact specifics but certainly since Howler doesn't work on my iPad that proves there's at least a problem with that.
The whole point I chose Howler to use was to abstract all the above away! I'm going to go look for another more comprehensive library now =D
the problem might be file size. IPad has a limited cache memory size and if you overflow it assets will not work. The only solution to this problem is smaller file size. Another possibility is html audio will not load or play except in a user event (touch). Web Audio will load but starts muted and only unmutes with a play call inside of a user event.
SoundJS is a library I help develop that handles as much of this stuff as possible. In particular I think you would find the Mobile Safe Approach useful. It is well tested on iOS and Android devices. Unfortunately we do not support sound sprites yet.
Hope that helps.

How to copy audio stream using FFMpeg API ( not a command line tool )

I'm developing some Video Editing Apps on Android.
the objective of the app is "Editing Videos on Android".
and...
I'm just completed making video file using some images.
but.. I can't attach audio into the video.
my method is same as follows.
1.VideoStream, audio stream creation using AVFormatContext
2.Movie encoding in video stream was successful
3.Encode codec open in audio stream was successful
4.Set sample format to AV_SAMPLE_FMT_FLTP
5.Sample rate and channel was set same as source audio
6.Choose appropriate Decoder and read packet
7.Convert packets using swr_converter, setting same as sample format
8.Encode converted data
9.memory deallocation
10.END!
Problem is here:
Video of finally created video file was normally played. but the Audio wasn't.
It heared like weird. It have many noises and plays slowly.
I've googled with many keywords but they only say about "FFmpeg command line usage".
I wanna make with FFMpeg API. not a Command line tool.
Please help.
Your question is vague without some kind of code to go along with it, as trust me there are a lot of things that can go wrong when using ffmpeg's libraries directly (and on Windows there is no debuging). Unfortunately ffmpeg's libraries are not well documented so it is generally best to read the source code for ffmpeg in order to use its libraries. Find the equivalent command line options to perform what you want and track that through ffmpeg's source to see the library calls.

Embedded HTML 5 video is stored in the cache but is not displayed on iPad 2

I am creating an offline webapp for the iPad 2, which includes video content. When the page first loads, the video displays fine. But when I reload the page, the video's play button becomes broken.
I've gone into Settings > Safari > Advanced > Website Data and, sure enough, the video is in the cache... So the problem seems to be that it is not being retrieved from the cache.
My HTML code snippet:
<html manifest="cache.manifest">
...
<video width="320" height="240" controls="controls">
<source src="videos/movie.mp4" type="video/mp4" />
</video>
My cache.manifest snippet:
CACHE MANIFEST
# Updated 2012-08-22 19:49:00
index.php
...
videos/movie.mp4
For good measure, my .htaccess snippet:
AddType text/cache-manifest .manifest
AddType video/mp4 .mp4
Does anyone have any ideas?
This unfortunately isn't an answer but after now 20 hours continuous searching and testing to resolve the exact same problem i can tell you where i am now.
This appears to be an ipad iOS specific problem where no matter what size the video / sound file is it will not draw on the cached files although they clearly are cached and on first load it plays the file OK.
I have tried making the smallest video possible.
I have looked at wrapping in a native app but that's not an option for delivery reasons.
I have tried forcing a reload of the video .src on page load using javascript.
I have tried all possible variations of the manifest file.
Looked at all the Apple developer docs i can stomach.
After reading hundreds of posts, that never actually complete, i think the answer, other than getting the client to buy Android tablets, is to use the local database to store the video in binary form to be retrieved when needed by the app. Unfortunately i am still searching for examples of this and as yet cant find any with any detail. Local saving of text / numerical data isn't a problem. I just dont know if its possible to store the raw file data and retrieve it in a local database.
Sorry its not what you were after but hope it helps point you in less directions.
An update but not much progress. I decided to use base64 ecoded mp4 and paste the text in a simple xml file. My app would read this xml video data and by using in the video tag SRC. This was about a 4MB string.
SRC="data:video/mp4;base64,AAAAA /...../ AA"
This worked fine in Chrome. When i used it on the Ipad the good points are that i didnt ever get the play button crossed out and it tried to play then flashed a message it could not complete this operation.
I had a somewhat related issue with playing video on an iPad. This was in an HTML widget that will reside in an iBooks file. My problem was I couldn't get the videos to rewind, so when you went back to that screen the video was stuck at the end (or still playing if you went back fast enough.)
The workaround I came up with was to load a different video and then reload the video I wanted to play. It's ugly, but it works, and it may provide a workaround for your problem.
var sources = videoEl.getElementsByTagName('source');
sources[0].src = "assets/TeethMouth_Anim_Part3_03.mp4"; // Load some other video into the source, in my case, a video that I'm playing later in the presentation.
videoEl.load();
sources[0].src = "assets/TeethMouth_Anim_Part1_03.mp4"; // Then reload the video I want to play.
videoEl.load();
Although now I see that this thread is a year old so it's probably not an issue anymore. Still, thought I'd post it.

Resources