Streaming video from server....Not easy..help would be appreciated!

Dear Developers,
It has been a long time since I have posted on this community - its nice to see some familiar avatars still here.
I have been developing an iphone/ipad app for cancer patients that requires streaming of video footage from a server.  The app is sturctured in a simple tableview with images of a range of videos.  The user selects these tableview cells and the video should then stream.
I hoped to use material saved on a private youTube account - but getting a seamless stream from the Tableview selection hasnt been easy.  It seems that youTube clips must be loaded into a uiWebview and then selected. This feels clumsy.
I have subsequently opted to stream from an alternative server with .mov files. The code I am using is as follows:
NSString *videoURLString = @"https://www.dropbox.com/s/7wmltu14ti91qm9/IMG_0024.MOV";
NSURL *videoURL = [NSURL URLWithString:videoURLString];
MPMoviePlayerController moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:videoURL];
[moviePlayer prepareToPlay];
[moviePlayer play];
[self.view addSubview:moviePlayer.view];
When I select call this code the movieplayer opens, but the video will not load. I recieve an error warning in the console containing :
CGcontextsaveGState: invalid context 0x0
CGContextClipToRect: Invalid context 0x0
CGContextTranslateCTM: invalid context 0x0
CGContextDrawShading: invalid context 0x0
CGContextRestoreGSState: invalid context 0x0.
What must I do to get this code working ?
I would be very grateful for your help on this.  I am also keen to learn if anyone knows of other source code that would provide a cleaner experience of youtube video streaming.
with thanks.
James

You may use this:
        NSString *videoFilepath = @"https://www.dropbox.com/s/7wmltu14ti91qm9/IMG_0024.MOV";
        NSURL *videoURL = [NSURL URLWithString:videoFilepath];
        MPMoviePlayerViewController *movie = [[MPMoviePlayerViewController alloc] initWithContentURL:videoURL];
        [[NSNotificationCenter defaultCenter] addObserver:self
                                                 selector:@selector(playbackFinishedCallback:)
                                                     name:MPMoviePlayerPlaybackDidFinishNotification
                                                   object:movie];
        [self presentMoviePlayerViewControllerAnimated:movie];
then
- (void) moviePlayBackDidFinish:(NSNotification*)notification {
    NSError *error = [[notification userInfo] objectForKey:@"error"];
    if (error) {
        NSLog(@"Did finish with error: %@", error);
add the MediaPlayer.framework to your project &
add to your .h
#import <MediaPlayer/MediaPlayer.h>
Hope this helps

Similar Messages

  • MPMovieplayer for stream video from server

    Hello all,
    I want to stream video from server.So for that i am using mpmovieplayer.but its not load the video from server. I am try with http://km.support.apple.com/library/APPLE/APPLECAREALLGEOS/HT1211/sampleiTunes.mov but its not load in mpmovieplayer.
    Thank you...
    Message was edited by: diyora

    Hello all,
    I am now able to load video from server successfully.Now i want to play this video recursively so for that i am used MPMoviePlayerPlaybackDidFinishNotification notification & again play my movieplayer. But its work in sdk 3.2 only. When i switch to sdk 4.2 then stop the video playing recursively.
    Thank you...

  • Java script does not execute - help would be appreciated.

    How can i tell the user where they are based upon the page url?
    I have put the following script at the top of the large product page
    and have the latest version of js installed.
    <script type="text/javascript">
    if (document.location.href.match('brands')) {
    alert('dont forget you are on the brands page');
    else if (document.location.href.match('fish')) {
    alert('dont forget you are on the fish page');
    </script>
    Any help would be appreciated.
    Thank you.

    Hi Peter, Posting snippets of code is not really helpful, Need to see it running. You could have other script errors and we can better see what your trying to achieve.

  • I am unable to set up my iCloud as won't let me accept terms and conditions, then says unable to connect to server.  Any help would be appreciated :)

    Please can someone help, I am just trying to set up iCloud on my iPad.  When I click on accept terms and conditions it says unable to connect to server? I have googled how to do this, forums suggest to open a find friends app, then try to reconnect.  It still doesn't work.  Any help would be appreciated, thanks.

    Check this. Settings>General>Date and Time>Set Automatically>On. Make sure that the time zone setting is correct as well.

  • Streaming Video from Server to Ipad

    Hello,
    This issue is not easy to explain. But I will try.
    A Video camera in the field transmits video to a server back at the studio.
    Ipad wont support flash so non of Adobe media apps would work.
    I need to "Push" the live video stream arriving at the window server to ipad via a secure LAN and/or WIFI
    Question is how.?
    Thank you

    When I say it works on iPhone/iPod I mean version 4

  • Need Help Streaming Video From Web Server Built Into Application - Linksys WRT54g Router

    Very much appreciate any help getting streaming video feed from web server built into video application to work properly using port forwarding on my Linksys WRT54g wireless router.
    Here is the situation:
    My PC is connected to the internet via a Linksys WRT54g wireless router.
    The Windows XP Pro SP2 firewall is enabled, with a firewall exception established for the video camera application.
    On the router, forwarding of port 80 is enabled for the LAN IP address of the PC running the video application with an embedded web server, and the web server in the video camera application is also set to use port 80.
    I have a free DYNDNS account and also run the DYNDNS updater program on the PC running the video application with embedded web server. According to the DYNDNS web site and the DYNDNS updater program, the IP address assigned to the machine running the video application with embedded web server is set correctly in my dyndns account.
    When I open a browser (Explorer or Firefox) on the PC running the video camera application with embedded web server, I am able to  connect to the video application's web server by going to the dyndns address linked to the machine running the video application. The video application's web server is set to use the dyndns address. That's the good news. The bad news is that I can't connect to the video application's web server from any machine that connects to the internet that uses a router other than the router used by the PC running the video application. I am only able to connect to the streaming video from the application's web server only on machines that connect to the internet using the same (home) router used by the PC that is running the video application.
    Since I am able to connect to the video app's embedded web server successfully on the machine running the video application, it seems that at least something about the current port forwarding settings is correct. For example, if I uncheck 'enable' for forwarding of port 80 on the router settings page, I am no longer able to connect to the video app's web server when I try to do so in a browser running on the machine running the video app. When I re-enable port 80 forwarding on the router, I am again able to connect to the web server of the video application on the machine running the video app. I thought that by enabling forwarding of port 80 on the router and associating that port with the LAN IP of the machine running the video application, it would be possible to connect to the streaming video of the video app's embedded web server from ANY machine connected to the internet, but that is not the case. There must be some other router settings to update/change in order to get the port forwarding working to enable a successful connection to the video web server, but I am stumped. Very grateful for any suggestions as to how to get this working properly.
    Thanks in advance...

    The firewall log can be configured on the third tab in the window for the firewall settings, where you can turn the firewall on and off completely.
    From your tests, though, it does not seem to be the firewall. However, to be sure, it would be good to check the log. It will help to eliminate the firewall as the culprit and you may find it handy in the future, too. ;-) Just don't forget to turn the log off again after you are done because it may cause some performance penalty on your system while on.
    From what you write, it seems as if I should give a little networking background on the ip addresses you'll see. Your setup is (or should be) a modem connected to the WAN/Internet port of the WRT. The computer is connected into a LAN port of the WRT.
    Your router has two IP addresses (that's what makes it a router): a WAN address and a LAN address. The WAN address is the address assigned by the ISP. It is a normal internet IP address. Everyone is able to send packets to this IP address. The WAN address is the one reported by whatismyipaddress.com, it should be listed in the dyndns record and it is the address that your router shows on the Status page. It's the public IP address of your router. Dyndns maps your dyndns.org name to that IP address.
    Your router also has an IP address on the LAN side. You can configure it to be whatever you want. The default is 192.168.1.1 with netmask 255.255.255.0 and it is better to leave it like that or at least inside the network 192.168.*.*. 192.168 is a special, reserved IP address range for private networks. Basically, routers in the internet are not supposed to forward addresses in this range. That makes them suitable for private LANs as the packets never can get anywhere. Most people using Linksys routers have there LAN in 192.168.1.*.
    The router acts as gateway, which means it forwards packets from PCs in the LAN to the internet and back. As all your PCs in your LAN share a single WAN IP address, the gateway does address translation (NAT). This works only in one direction: from the inside to the outside. The router remembers when a PC in your LAN sends something out and accepts the responses in and sending them back to the PC. If something comes in from the internet which cannot be associated with a ongoing communication the packet is dropped unless you use port forwarding.
    All computers in your LAN either have a static IP address assigned or use DHCP to get it automatically. The router has a DHCP server as well which gives out IP address from 192.168.1.100-149 if not changed. With a router with default settings static IP addresses can be in the range of 192.168.1.2-99 and 150-254.
    ipconfig /all reports your IP address in your LAN, i.e. an address 192.168.1.*. The gateway in this output should be 192.168.1.1 which is your router. And packet no in the LAN address range 192.168.1.* is send to the router which forwards the packets into the internet.
    An address 192.168.1.* should not appear as internet address in the Status page of the router nor should it appear at dyndns.
    Port forwarding is used to operate a server in the LAN. By default, a server in the LAN cannot be reached from the internet. You have to configure port forwarding for this. You configure that traffic bound for a specific port (e.g. TCP port 80 for http) on your WAN IP address is forwarded to the same port on a specific LAN IP address. If your server runs on 192.168.1.50 than traffic to your WAN IP address port 80 is forwarded to 192.168.1.50 port 80. That way your HTTP server can be reached from the internet. As you can only configure a fixed IP address in port forwarding it is recommended that the server uses a static IP address and not DHCP as in the latter case the IP address may change over time...
    O.K. so much for networking. I hope that makes things a little clearer and you can verify that your setup is how it is intended to be.
    I suggest the following: on the router's security page there is an option to block WAN requests. Remove the check if it is set (meaning: do not block). After you did that change you should be able to ping your WAN address (e.g. ping xxxx.dyndns.org) from the internet. That way we know that it is on the correct address.
    Also on the Administration page make sure that remote management is disabled (should be like that per default) or that the management port is NOT 80 but for example 8080. What is your your UPnP settings on the same page?
    O.K. that should be enough for the moment...

  • Embed streaming video from FlashMedia Server 2 in a Captivate Course

    I am trying to add streaming video from FlashMedia Server 2
    Developer Edition in a Captivate 3.0 course. The streaming server
    is working fine and I can stream video from a Flash 8.0 file. The
    problem seems to be in Captivate 3.0 because the video will not
    display in a Captivate swf file. The html and swf file resides on
    the web server therefore it cannot not be a security issue. When I
    try to play the Captivate file; it does make connection to the
    media server however the flv file will not stream. The Bytes
    Out(Bytes to the client) number stops incrementing after a 1,000
    bytes. Once you close the browser then the connection to the media
    server is lost. However if I insert a .fla file from Flash
    8.0(which will connect to the streaming server and play) and
    publish it in the Captivate project; It will connect to the server
    and playback the audio but not the video. I turned on and off
    hardware acceleration on my video card thinking that was the
    problem. I would appreciate any help on this. Once I get this to
    work I can justify purchasing the full version of the Flash Media
    Server.

    I think this isn't really an InDesign issue at all. It sounds like an Acrobat issue.
    First, you haven't said what version of Acrobat you're using. I'm assuming Acrobat X Pro?
    I've used this with a friend's Flash Media Server so I know it works. What version of Flash server do you have installed?
    I the link you provide I see a spaceband after the word "test" in the path. Could that be a problem?
    Other than that, it appears that you're following the requirements listed in the Help file for Acrobat X Pro.
    If you have further problems, you might post this on the Acrobat User Forum.

  • Hello. I've Apple TV 3rd gen and MacBook Pro 2013 all with latest updates. AirPlay works fine till I don't start streaming videos from YouTube. After that AirPlay icon from MacBook menu bar simply disappears. Could some help. I'm using 2 Mbps Internet

    Hello. I've Apple TV 3rd gen and MacBook Pro 2013 all with latest updates. AirPlay works fine till I don't start streaming videos from YouTube. After that AirPlay icon from MacBook menu bar simply disappears. Could some help. I'm using 2 Mbps internet connection.

    Same issue here- I can airplay my amazon prime library just fine from my iphone 5 but on my macbook- (mavericks, 15 inch 2013 retina with quad core i7, nvidia 650 M and SSD) it just sputters and lags.
    I have noticed web video is considerably worse than local content, giving me pauses of up to 2 or 3 seconds in which video stops but audio continues in the amazon player. Youku video, however, seems relatively stable. Our subscription speed is 25 mbps, so that should be plenty to stream SD video from Amazon and doesn't account for why it would be nice and stable from the iphone, but not the mbp.
    Playing light, locally hosted steam sidescrollers  like Limbo is better but gives periodic drops in framerate on the Tv. when mirroring the framerate remains steady on the MBP screen.
    Games airplayed from my iphone seem relatively stable, though with a noticably lower framerate on the TV than on the phone.
    It seems these issues have abated considerably since yesterday's Apple TV update, but are still curious nonetheless and I'm not sure that the update yesterday was specifically meant to address those issues or if I'm just getting a time with less network interference now.
    Comcast recently installed a new router/modem/phone combo, replacing our old separate modem and router setup. I'm going to test if putting the network on a different channel helps.

  • HT202157 New apple is not asking for the WIFI password.Home sharing is not working,i am getting Error while streaming videos from Youtube.

    I got new Apple TV 10 days back,its not asking for the WIFI password.Home sharing is not working,i am getting Error while streaming videos from Youtube.
    I can only see pics and video saved in my iphone. No other options are working.The worst part is that its not asking wifi passoword.
    Not able to connect istores and itunes.
    I cannot do software update. Can anyone help in this content?

    Thanks Brian- I am not connecting it with iphone teethering. I am using it with my DSL wifi.
    I am using it with ethernet cable then its working fine.If i am trying to use it with WIFI then its giving error.
    I tried using Netwrok testing but its giving same error.

  • Using the new iPad, what's the best way to watch video files (away from home) which are stored on a NAS (WD My Book Live)? Any help would be appreciated!

    Using the new iPad, what’s the best way to watch video files (away from home) which are stored on a NAS (WD My Book Live)?  Any help would be appreciated!

    Before you go, move the files to I tunes and sync them down.  There is no viable way to stream from your nas drive to the pad.

  • When I stream videos from my laptop onto my Apple TV via my iPad 2 using the Air Video app/server the video plays great however when I pause the video the Apple TV reverts back to the home screen within a few seconds and then when I want to restart watchi

    When I stream videos from my laptop onto my Apple TV via my iPad 2 using the Air Video app/server the video plays great however when I pause the video the Apple TV reverts back to the home screen within a few seconds and then when I want to restart watching the video I have to re-buffer the video. Is there any way I can stop the Apple TV from reverting back to the home screen when I pause the video I’m watching?

    Welcome to the Apple Community.
    Contact the developer of the Air Video app.

  • Hi, when I go to "select files to send" and click on "sent files" I get: "Internal Server Error (500) Your request could not be completed due to an internal server error".  I tried rebooting and that didn't work.  Any help would be appreciated.  Thanks.

    Hi, when I go to "select files to send" and click on "sent files" I get: "Internal Server Error (500) Your request could not be completed due to an internal server error".  This never happened b4.  I tried rebooting and that didn't work.  Any help would be appreciated.  Thanks.

    Hi ,
    Thank you for your question.
    This error was caused by the incorrect site binding, I will give a reference of my test Lab. We add two A records in DNS which the FQDN of CAS and Mailbox could resolve IP address.;
    Default Web Site:
    Exchange Back End:
    Then IIS must be restarted.
    If there are any questions regarding this issue, please be free to let me know. 
    Best Regard,
    Jim

  • I have an ipad3. I brought brought a wireless AV Box to view videos on the TV.  I have tried this on both hdmi  TV an can only get sound no picture. Any help would be appreciated. I am new to iPad so not too tech please.

    I have an ipad3. I brought brought a wireless AV Box to view videos on the TV.  I have tried this on both hdmi  TV an can only get sound no picture. Any help would be appreciated. I am new to iPad so not too tech please.

    What iOS in on your iPod?  The Users Guide says:
    Viewing Photos, Slideshows, and Videos on a TV
    You can use the Photos app to view photos, slideshows, and videos on your TV with
    any of the following:
    Apple Component AV Cable
    Â
    Apple Composite AV Cable
    Â
    Apple Digital AV Adapter and an HDMI cable (iPod touch 4th generation)
    Â
    Apple VGA Adapter and a VGA cable
    Â
    The Digital AV Adapter supports high-definition video up to 720p with audio.
    The Guide also says the Video app can use TV out.

  • Once firefox 4.o was installed, full screen video produced white screen. Had to exit and and restart video. Using a mac os 10.5. Disabling hardware acceleration did not fix. went back to firefox 3.6 and all is ok. Any help would be appreciated.

    Once firefox 4.o was installed, when switching to full screen while watching any internet video produced a white screen but audio still playing. Switching back to small screen has a still video but audio still going. Had to exit and and restart video or open a blank new new tab then delete it and then small screen video would play. Using a mac os 10.5. Disabling hardware acceleration did not fix. went back to firefox 3.6 and all is ok. Any help would be appreciated.

    Your hardware was never designed to run that old a version of OS X, it's best to update the application or find another application that is more up to date. Installing Leopard simply will not work on your system.

  • I updated LR5 to 5.7, its still not importing files from my D750. Any help would be appreciated.

    I updated LR5 to 5.7, its still not importing files from my D750. Any help would be appreciated.

    Did you try unchecking Sync Photos on the Photos tab of your sync settings and syncing?  If this doesn't remove them, try creating an empty folder on your PC, then selecting to sync this folder on the Photos tab and syncing your phone.  This should delete the existing photos prior to syncing the empty folder.
    Also, you can transfer these photos to your computer if you need to by using an app like PhotoSync.

Maybe you are looking for

  • ITunes Encountering Problems When Importing CDs

    Since I allowed an iTunes update about a month ago (?), I've been having problems importing certain (apparently random) CDs. I import a lot of books on CD, and many times "iTunes encounters a problem and has to shut down." Not always. For example, th

  • Zen Micro problem need help

    Today i was listening to music and my zen micro just froze while playing and no buttons could be pressed and the lock button wasnt on. So i took the battery out and rebooted the player but it froze at the creative screen. I went home and i went to re

  • OWB 9.2 (for linux) can be installed on ES3.0?

    Hi, I am having OWB 9.2 for Linux. I installed the same on Linux AS2.1 When I am trying to install it on ES3.0 (2.4.21-4.EL #1 Fri Oct 3 18:13:58 EDT 2003 i686 i686 i386 GNU/Linux), I am facing the below error "Initializing Java Virtual Machine from

  • I downloaded and installed an app and my mac can't open it.

    I downloaded and installed Spider solitaire from the app store  and it can't be opened.  I am running ver.10.7.5 and it is up to date.  I also removed the app and reinstalled it as was suggested and it still does not work.  Truly a pain in the neck.I

  • Copy BW Web Templates

    Hi BW experts, After processing an upgrade to BW 7.0 on our TST system, we wish to copy all the exist web templates in the system. The copy operation purpose is to save a copy of all reports, in case the migration process (running for the reports whi