PPTx with embedded video play on iOS - 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.

Related

How to add subtitles for offline video (using AvPlayer)

I'm trying to add subtitles for a video. Both video file and subtitles files are downloaded on iphone (*in both vtt and srt format)
Example paths:
subtitle: file:///private/var/mobile/Containers/Data/Application/384B1E38-7536-4F52-A9E1-B7D8E5A1490B/Documents/1_665ba05feee690141b7_english.vtt*).
video file: file:///private/var/mobile/Containers/Data/Application/384B1E38-7536-4F52-A9E1-B7D8E5A1490B/Library/com.apple.UserManagedAssets.q1zdd9/1_665ba05f2b5aa225440dc840690141b7_4CD8B29737842BA5.movpkg
I have absolutely no idea how i should create or prepare those files to have a AVMediaSelectionGroup and be able to select a proper AVMediaCharacteristic on
Unfortunately most of tutorials contains only examples for hls streaming, but im not sure if it is valid for offline player.
How should i use AVAssetResourceLoaderDelegate or AVAssetResourceLoader and how should i create a single AVURLAsset with all subtitles?
Could you help me somehow and describe what should i do? I am aware that the question is imprecise, but in fact i do not know where should i start (describing a path - what i should do in steps would be appreciated).
Kind regards.

How to first download audio files from URLs and then play all - iOS

I have got multiple audio files on server.
I want to download all audio files first, and then when all are downloaded, i need to play them one after another.
What will be the best approach to achieve this?
Thanks!

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.

How to play video from epub file?

i want to create an epub reader with feature like play video and audio from my iphone app.
One more thing i would like to say that it will not a web based applicaton.
i mean to say that i dont want to use uiwebview.
please any body help me thanx in adv.
EPUB3 supports tag, http://idpf.org/epub/30/spec/epub30-overview.html#sec-multimedia
So you can embed video like this:
<video id="my_video_1" width="720" height="365" preload="auto" controls="true">
<source src="../Misc/my_video_1.m4v" />
</video>
And, H.264 or VP8 video codecs are recoomended.
http://idpf.org/epub/30/spec/epub30-publications.html#note-video-codecs
The epub format is wrapped as a zip file (you can just unzip it). There was a lot of discussion about it in this thread:
Reading ePub format
So you can just add the audio/video in the zip and then runnit locally using MPMoviePlayer. If you want to be able to actually show the book you must re-implement a web engine, as epub books uses HTML to diagram. So, as far as I know, the UIWebView is the easiest way to go.

MP3 playback issues with DirectX when MP3 has album art encoded

I'm using the Clootie DirectShow9 headers with Delphi 2007. I created a wrapper component that plays audio and video. All is good until I get an MP3 that has album art encoded in it. The mp3 files like this just will not play. I do not get an error message from my code when I call pMediaControl.Run;. pMediaControl is IMediaControl. They just do not start playing. I many other MP3 files that are not encoded with album art and they play fine. There must be something I'm missing but I cannot figure it out.
These art encoded mp3 files play OK in WMP and Winamp on the same PC.
Can someone shed some light on this for me?
Thanks
I have also hit that one (or was it VFW_E_UNSUPPORTED_STREAM).
It's because the metadata is currupted, or when the image-size is very big.
(editing the Tag in Winamp sometimes helps)
I read a little about Media Foundation and it and look like it is available only on Vista and up. I need Windows XP support for now.
I'm going to use the bass.dll and the delphi wrapper unit. I've done some testing already and all my problem mp3 files play with bass.
I wanted to stay away from using a third party component / dll but my time to finish this project is getting slim.
http://www.un4seen.com
The download includes many Delphi samples. So far the library has worked great.

Resources