MPMoviePlayerController streaming video to Apple TV - iphone

Since the new update came out for apple tv where you can stream video to it from any iOS device running 4.2, I was trying to stream a video from my phone which uses MPMoviePlayerController to play the video to Apple TV. The player shows the airplay option and I can find Apple TV but when I tap on that nothing happens. So, was just wondering if is it really possible to stream a video using MPMoviePlayerController to apple tv or not or is there any other player framework which I am missing do that. I would really appreciate if someone can provide me with some help on this.
Regards,
Ankur

self.movieController = [[[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:CINDY_PATH]] autorelease];
[movieController setAllowsWirelessPlayback:YES];
movieController.view.frame = self.view.bounds;
[self.view addSubview:movieController.view];
The line "[movieController setAllowsWirelessPlayback:YES];" will allow Airplay video, however, it is a private API which is not AppStore safe...
Reference: http://www.tuaw.com/2010/11/24/apple-tv-hacking-spelunking-into-the-airplay-video-service/

Edit: Looks like I spoke prematurely. The AppleTV update was released today. A revised answer is below:
If your AppleTV has been updated to the latest software, and you can stream videos from the iPod app on your iPad, then video streaming over AirPlay should work. However, from what I heard recently, video streaming will only work from the iPod and YouTube apps. I have not yet had a chance to test out the AppleTV update myself, so I cannot verify any of this, but if true it means that you are only allowed to stream audio from MPMoviePlayerController in your app. Hopefully this restriction will be relaxed in the future.

I've created an application here which will stream videos to an AppleTV that have been shot on your iPhone. http://tinyurl.com/2vewstr
You will need the SDK to compile and use it.

Related

Apple watch video playback

Can apple watch capable of video playback? I want to develop an app similar to vine for apple watch. So, user can consume video conveniently from the watch. Is it possible?
I have played with animating multiple images to create a video but it really is a bad approach. Anyone else comes up with any idea?
Update after WWDC 2015:
Good news! Now it's possible!
Link to sample code:
https://developer.apple.com/library/prerelease/watchos/samplecode/WatchKitMoviePlayer/Introduction/Intro.html
Summary:
Now there is a class (WKInterfaceMovie) that allows you to play videos on the watch :)
From the docs:
A WKInterfaceMovie object lets you play back video and audio content
directly from your interface. A movie object displays a poster image
with a play button on top of it. When the user taps the play button,
WatchKit plays the movie in a modal interface.
Class Reference:
https://developer.apple.com/library/prerelease/watchos/documentation/WatchKit/Reference/WKInterfaceMovie_class/index.html
Using the current APIs it might be difficult/impossible.
Still, the camera application on the apple watch is receiving a live stream coming from the camera of the iPhone at a quite good rate.
Most of the apple watch apps are not using only the publicly available APis but it shows that it should be feasible (not talking about the sound here...)
update:
I had missed one feature, there IS an embedded video player with sound on the apple watch... have someone send you a short video has an iMessage and you are able to play it on the watch...

MPMoviePlayerController Streaming Video won't play Audio

I'm streaming video to my app with MPMoviePlayerController, works great in Simulator and my device, but one of my beta testers devices won't play the audio. Audio controls won't appear, and instead, show the following image:
Any idea what is going on? Thanks in advance!!
The beta testers phone was on vibrate... dummy.

iPad Video Playback only delivers audio, not visuals

Recently we've developed an iPhone app for an external company, and everything works fine in the app.
There is a section where the app pulls video from the client's server, and streams it into the iPhone's MPMoviePlayerController. This works fine on the iPhone and iPodTouch - both the video and the audio show up just great.
The problem, however, is that when the app is run on an iPad (using the iPad's iPhone simulator thingo that it does) only the audio plays, and no video can be seen.
Does anybody have any suggestions about what may be causing this? I thought perhaps it was the encoding, but then why would this prevent the video from playing on the iPad, and not the iPhone?
Use mpmovieplayerviewcontroller instead, you might find it works better.Here is a link to the ref http://developer.apple.com/iphone/library/iPad/index.html#documentation/mediaplayer/reference/mpmovieplayerviewcontroller_class/reference/reference.html

How do I choose a video from UIImagePickerController on iPhone 3G?

On my iPhone 3G I have a couple videos saved from emails and some apps i recored with and every time I try and open the UIImagePickerController it doesn't show the videos for me to choose. How do I get the UIImagePickerController to include videos and not just pictures?
You can't, not on the iPhone 3G. For reasons only known to the gods at Apple, almost all video functionality is disabled on the 3G though it can support it perfectly fine.

Is there a way I can capture my iPhone screen as a video? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I want to be able to capture my iPhone's screen as a video, but I'm not sure the best way to do this.
Can anyone help guide me on how to best do this without jailbreak?
Here's my solution in a nutshell:
In recent years, when needing to produce moving visual content from the interface of an iOS app, I would require the developer provide a compiling of the app designed for the Simulator, (must be separately compiled because the apps are, by default compiled to run on the iPhone's ARM processor, whereas the Simulator runs on the Mac's Intel processor). This would then be screen captured on the Mac with something like Snapz Pro, Screenflow or something similar.
Beyond that, typical solutions required jailbreaking the device and installing a screen capture application sourced from the Cydia Store.
With the introduction of the iPad 2, Apple enabled full interface mirrored video output via either an authorized dock connector to HDMI dongle, or a dock connector to VGA dongle. (Note: Apple's composite and component options do not port mirrored content.) While the typical intent for these output mechanisms are to display the interface content to an external projector or High Definition Television, it is possible to record this mirrored content with a device capable of recording or transcoding content from such an incoming source. This option was also made possible with the introduction of the iPhone 4S. Quite often, recording this video content is done with HDMI capture cards installed on the capturing computer, such as those produced by Black Magic or AJA, among others. This is, or course limited to using computers that are capable of having such a capture card installed. Other options may include some HDMI record-enabled DVR devices (though many detect and disable such options) or firewire-based transcoding devices (like the Grass Valley ADVC-HD50, which I use).
Since getting the iPad 2 earlier this year, I have been using the Grass Valley ADVC HD50 to capture iOS screen motion from dock connected HDMI to a HDV compatible video capture application on my Mac. It has thus far worked flawlessly.
Here is an example from a video I recorded showing such captured content from both the iPHone 4S and the iPad 2.
http://youtu.be/k7jlPx8NAmw
However, now that Apple has enabled wireless iOS mirroring via Airplay in iOS 5, I find it is now much more convenient to connect an Apple TV device to the Grass Vally ADVC HD50, and capture the iOS interface screen recording wirelessly.
Here is a recent short video example in which the iPhone 4S interface was captured wirelessly via Airplay mirroring.
http://youtu.be/UKsixjcCXdI
I hope this helps.
As others have suggested, AirPlay mirroring is the way to go. To mirror directly to your computer use an AirPlay server like http://www.airserverapp.com/. Then, since it's showing up directly on your computer you can capture it using the built-in Quicktime app (File > New Screen Recording). Works great!
You can use Lookback. It records your screen, face, voice and all gestures, and uploads them to your account on the web.
Here's a demo: https://lookback.io/watch/JK354d5jcEpA7CNkE
Loren Brichter the developer of Tweetie2 wrote this little app called SimFinger to make iphone screencasts top notch!
http://blog.atebits.com/2009/03/not-your-average-iphone-screencast/
Love apps that make amateurs look like pros :)
I made a plugin for the simulator that does just this. You can find it at my blog.
It actually records the screen. It does not rely on another screen capture program like iShowU.
It will install icons for the default apps and change the carrier text to look like a real device.
Short of using a video camera, no.
Many youtube videos for demonstrating iPhone applications are made with a screen grabber application (such as iShowU, ScreenFlow, or Snapz Pro) and the simulator. Be aware that the speed of response in the simulator can be dramatically different than a device - so it's possible to get effects (and miss) with the simulator you'll never see on a device. In particular, default animations can flash by in the simulator, where they just look quick on a device.
using ScreenCaptureView class we can capture the iphone screen as video.The source code is available here.The recorded video is saved in a NSUrl,outputURL.Use that NSUrl in a method like below to play the recorded video,
-(void)playvideo
{
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:outputURL ];
[player.view setFrame:CGRectMake(0,0,320,480)];
[player setMovieControlMode:MPMovieControlModeHidden];
[player setScalingMode:MPMovieScalingModeAspectFit];
[player setBackgroundColor:[UIColor blackColor]];
[player setFullscreen:YES animated:YES];
[player play];
[self addSubview:player.view];
}
call this method before releasing NSUrl in completeRecordingSession method ..it will replay what you did in the iphone screen as a video.
Note: This answer is outdated
www.iphonevideorecorder.com. There's a free trial I think, but after that you'd need to buy it. And you need to jailbreak your iphone.
You could use the video-out and capture that somehow with a firewire or sumthing..
The class MPTVOutWindow can help you out! Here's a nice sample of that!
http://iphone-developers-nc.googlegroups.com/web/UIApplication_TVOut.m
I used ScreenFlow to record the Simulator, and zoomed it and added static images as necessary. I then embedded the movie in an iPhone frame on my website. Turned out okay. See the Tweeps page for the result.
i guess it is so obvious now that no one has posted this but for the noobs.... note: iPhone 4S only
just airplay to an apple tv and video mirror then output the atv to a device that can record - like tivo, dvr etc. you can also use a video out cable on the iPad [1 and 2] now
not sure if the cable works on the iPhone 4S as I havent tested that myself
its clunky but there is no other way i can see atm.
I've continued to research this item myself, and it does appear to remain beyond us at this point.
I even tried buying a Apple Composite AV Cable, but it doesn't capture screen, just video playing like YouTube, etc.
So I decided to go with the iShowU path and that has worked out well so far.
Thanks Guys!
For a nice looking screencast, have a look at SimFinger. You will still need a screen recoder such as Snapz Pro.
Just for anyone who is still looking for solutions:
The RecordMyScreen jailbreak app is opensourced and works fine even on non-jailbreak devices if we have the developer license. You can have a look at the source: https://github.com/coolstar/RecordMyScreen
I dont believe this is possible.
Your best bet is to get something like iShowU and capture from the simulator.