Save video in applicationStorageDirectory on iOS
Hello !
I would like to save a video into the applicationStorageDirectory of my iPad. The code I have works well, but on iPad, it doesn't work, it sends me an MediaErrorEvent with an errorid 16. I think that this is due to an access problem, but it's weird because i succeed to write in the .flv file.
I save the urlStream into a file:
// get bytes
fileData = new ByteArray();
urlStream.readBytes(fileData, 0, urlStream.bytesAvailable);
// saving
var file : File = File.applicationStorageDirectory.resolvePath(FILE_NAME);
var fileStream : FileStream = new FileStream();
fileStream.open(file, FileMode.WRITE);
fileStream.writeBytes(fileData);
fileStream.close();
This works well, I have been able to watch the flv video in an jailbroken iPad.
But when I want to play my video with OSMF:
var file : File = File.applicationStorageDirectory.resolvePath(FILE_NAME);
var netLoader : NetLoader = new NetLoader();
var media : VideoElement = new VideoElement(new URLResource(file.nativePath), netLoader);
mediaPlayer = new MediaPlayer(media);
mediaPlayer.addEventListener(LoadEvent.BYTES_TOTAL_CHANGE, appendText);
mediaPlayer.addEventListener(MediaErrorEvent.MEDIA_ERROR, appendText);
var display : MediaContainer = new MediaContainer();
it sends me an error with errorid 16.
Any idea ?
Thanks !
In AIR 3.5 with OSMF 2.0, playing video through the OSMF player from the application storage directory still fails for me.
Playing it the hardcore way works fine, see the code below:
private function handleAddedToStage (event:Event):void
stage.addEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, handleStageVideoAvailability);
private function handleStageVideoAvailability (event:StageVideoAvailabilityEvent):void
if (event.availability == StageVideoAvailability.AVAILABLE)
var nc:NetConnection = new NetConnection();
nc.connect(null);
_ns = new NetStream(nc);
_ns.addEventListener(NetStatusEvent.NET_STATUS, handleNetStatus);
_ns.client = this;
_sv = stage.stageVideos[0];
_sv.addEventListener(StageVideoEvent.RENDER_STATE, handleRender);
_sv.attachNetStream(_ns);
_ns.play(new File(File.applicationStorageDirectory.resolvePath("myvideo.mp4").nativePath).url);
private function handleRender (event:StageVideoEvent):void
_sv.viewPort = new Rectangle(0, 0, 1024, 768);
private function handleNetStatus (event:NetStatusEvent):void
trace("handleNetStatus: " + event.info);
Similar Messages
-
I can't save videos in my gallery
Since I upgraded iOS 8.0.2 I can't save videos from social networks like viber , line and ect in my gallery ..when I take a video with my iPhone is ok . I know exactly how can I save videos in gallery .but I think it's a problem of new ios.
You should be able to simply hook it up and import the footage directly into iMovie (which you should have on your computer) - check out the compatibility list:
http://docs.info.apple.com/article.html?path=iMovie/9.0/en/mov39f85198.html
Now, if for some reason that does not work - I looked at your model's specs and it looks as though it also records to SD/SDHC cards? So does my Canon camera; iMovie does not like the direct import on mine, but I simply use a USB card reader and plug that in. The icon shows up immediately and I can drag the footag into whatever app I want to use; if the format is not readable, simply use MPEG Streamclip (free) to convert it to a format iMovie will recognize. -
How can I save videos from iPad to Mac?
How can I save videos from iPad to Mac?
How to Transfer Photos from an iPad to a Computer
http://www.wikihow.com/Transfer-Photos-from-an-iPad-to-a-Computer
Importing Personal Photos and videos from your iOS device to your computer.
http://support.apple.com/kb/HT4083
iTunes: Frequently asked questions about viewing and syncing videos
http://support.apple.com/kb/HT2729
Also check out the Photo Manager Pro app.
https://itunes.apple.com/us/app/photo-manager-pro/id393858562
Check out the Feem WiFi File Transfer app
https://itunes.apple.com/us/app/feem-wifi-file-transfer-free/id596378699?mt=8
Cheers, Tom -
Looking for Help on How To Save Video as Divx File
Can someone help? I have iMoive 4.0.1 and I need to save video clips as a Divx file. I go to the "share" button and try to compress the clip for Quicktime and choose expert settings. This gives me a list of options including Divx AVI. When I choose this option, the file is turned into an .avi file not a .divx file. ANd there is no other Divx choice available. I have talked to another iMovie user (v4.0.1., too) and--the odd thing--on his option list he has Divx (not Divx AVI). So I need assistance in either finding another way to do this with my existing 4.0.1. or finding a plug-in that will allow me to save as a Divx file. Or--if no one can tell me how to do this--let me ask if anyone out there knows whether iMovie HD 5.0 or iMovie 6.0 would allow me to do what I need to do. Thanks.
PowerBook G4 Mac OS X (10.3.9)Divx isn't a standard option, so you have downloaded some third party support for Divx. Try the latest version.
-
How to capture or save video files or trailers in to apple tv thru intern
hi
i Hvw purchased apple tv .in that iam unable to see trailers only and iam unable o save the video file in the apple t.v every time has to connect the internet to see the video file is there any setttings to do plz tell me friends .iam waiting to ur reply how to capture or save video files or trailers in to apple tv thru internetwhen there is 40 gb h.d.d is it not possible to capture the videos or songs all the time i have to connfigure the dhcp settings or resetting to factory defaults
then only iam able to play the trailers your answer is little clear to me my dear frnd plz dont mind can u help me some extra points to hti sappale tv -
How can i save videos from an e-mail?
I want to save a video that it's attached to an e-mail.I hold the video and then i select "save video" but nothing happens.Where does it save?
You don't see anything "happen", but it should be saved in the Camera Roll album in the Photos app.
-
How do I save videos from my laptop to my ipad, how do I save videos from my laptop to my ipad
how do I save videos from my laptop to my ipad?
Sync movies to iPad
http://ipad.about.com/od/iPad_Guide/ss/How-To-Sync-An-iPad-With-iTunes-Music-Mov ies-Apps_4.htm -
Sending video in Messages in iOS 8?
I was trying the new tap to send audio and video in Messages in iOS 8 on my iPhone 5. Recording audio and sending it seemed to work. Recording video seemed to work, but when I touched the send arrow nothing appeared to get sent.
Any idea what I might be doing wrong?
Thanks,
dougI have a copy of what I did if that's what you mean. And it's funny because it happened again. I was just randomly messaging someone and a picture popped up with the Aa key and the color slide on the right edge . Normally if I hit the pictures my pictures come up small on the bottom of Messenger and then I can send them or do other things. But when it happened yesterday I don't know if I hit a combination of keys or how I did it but I did but a large picture came up that I took of Facebook (both times were pics of f/b) and instead of the normal Airdrop, then Facebook, Messenger, Mail, Twitter and the More button and under that the copy, slideshow, print, etc. I get the Aa and the color thing. Can someone be hacking me. Can it be an error.
-
Video titles missing from iOS 7 video app
The new video app in iOS 7 shows you icons of each video. But the title of the video has been removed (iOS 6 would show an icon AND the title). Can that be restored? I don't want to have to select each individual video, go to that video's screen to find out which video/tv shoe/movie it is, go back to the main screen, select the next video, etc., until I find the one I want.
i agree. on ios 6, I had a list of the titles. Now I have to guess what the videos are (some have totally black frames) and hit them hoping to get the correct one or one nearby - as they are in alphabetical order. I am a professional videographer and this makes it more difficult for me to demo my material. There is no option I can tell to change the behavior.
Shame - I also had an issue with a change they made to the music play (you can no longer drill down on genre and get just artists, albums and then songs in that genre). Apple has said this is by design.
Looks like I now need a new third party music app and video app. Apple does not understand that when you upgrade or improve functionality, you don't remove prior functionality - you make it at least an option.
(I even consider a 'workaround' by unchecking everything in spotlight search but videos but there is nothing I know of [or is there] that matches everything like an asterisk does in windows)
Joel -
When i save videos with quicktime player it takes ridiculously long
Hi Tim ..
Reinstall Safari 5.0.6 for Leopard
Then restart your Mac. Try Safari.
If it crashes again, uninstall the Flash plugin then reinstall new > Troubleshoot Flash Player | Mac OS
Quit then relaunch Safari. From the Safari menu bar click Safari > Empty Cache
Right or control click the Safari icon in your Applications folder then click Get Info.
If the box next to: Open in 32 bit mode is selected, deselect, quit then relaunch Safari.
edited by: cs -
How can you save videos from an iPad to an external memory?
How can you save videos from an ipad to an external memory?
There are some wireless external hard drives that can be used with the iPad.
Best iPad External Hard Drive Storage Options
http://www.unlocktips.com/2012/11/best-ipad-mini-external-hard-drive-memory-stor age-options/
iPad Storage Solutions
http://www.ipadstoragesolutions.com/iPadWirelessStorage.php
SanDisk Connect Wireless Media Drive http://www.sandisk.com/products/wireless/media-drive/
Another option:
Expand your iPad's storage capacity with HyperDrive
http://www.macworld.com/article/1153935/hyperdrive.html
On the road with a camera, an iPad, and a Hyperdrive
http://www.macworld.com/article/1160231/ipadhyperdrive.html
Cheers, Tom -
How to save video messages to a file on Mac?
How to save video messages to a file on Mac? Please, help. Thank you.Claire
Claire, I use a Mac w/ the latest copy of Skype and it IS possible to first play the file and then download it. Steps are available for it but it involves some technical wizardry that can be above some muggles. Then I found a post where some some VERY bright person made a small downloaded program for the Mac which once the video message has been played recently, you can run this program and download the file for safe keeping ( ALWAYS BACKUP or store it in the cloud for safety ) Kudos are deserved to user alvarop for this! http://community.skype.com/t5/Mac/Video-Message-Exporter-App/m-p/2351609 It worked for me to download a video message that I recently played back. Let me know if you need any assistance getting it downloaded you can PM me on here and I'll be happy to help with a screenshare. Best Regards,-Shawn G
-
I have a camer security system that when you save video files have a mp4 or avi extension. Is there an application that I can open these files with?
Try VLC media player seems to play anything.
http://www.videolan.org/vlc/ -
How do I save videos on iPad that I emailed to myself
How do I save videos on iPad that I emailed to myself
Download the video and then tap the video and a message will pop up asking if you want to "save video" . Tap that and it will be saved for you.
-
during restore of my backup on iphone 5s i saw my photos and videos get doubled on ios 8.0 and moreover
if i use to go at my computer and then open my iphone and in folder i see some files name local disk and my photos
please help my memory doubles.I'm not sure, but I know it's not recommended to upgrade to iOS 8 on anything older than an iPhone 5. I only lost my music playlists and music that was on my phone, but that music is also on my iTunes, not the playlists though, and I don't want to go through ALL my iTunes library to fix it either... But it seems I don't have a choice right now.
Whatever you do, do NOT upgrade to iCloud Drive, keep iCloud till OS X Yosemite comes out, if your computer is a Mac. I also just noticed that all my documents on my phone are gone from Pages, BUT if I go on the iCloud website they are still there. Hopefully it will all work itself out when I can update my macbook pro to OS X Yosemite.
If you backed up your phone and all your purchases off your iPhone prior to trying to upgrade you should be fine... But I'm not even remotely sure.
Maybe you are looking for
-
How to limit the creation of Contract in reference to a PR?
hi to all, my scenario is as follows: i create service activity in cj20n. the Purch Requisition # that is generated is made into a quantity contract (ME31K). however i noticed that i can create many contracts for that item. what i want is to be abl
-
Is there a flash player that support my mobile Nokia 110.?
browser,flash player in the site of youjizz.com that support my mobile Nokia 110
-
How to rewrite this query without sub query please help me
Hello All Good Evening, Could you please help me with this query, how can i write this query without sub query, or how can write this query another ways please help me select planno, status1, count(*) Counts from select a.ValetNO PlanNo , case
-
I have tried a few times now to install the trail version of Creative Cloud to get the new PS2014 - but it's blank as below. I'm on Windows 7 and this is the first time it's happened (have used this software on this PC before to install other trials
-
Personal Services - W4/Bank Custom Messages and Badi's
Hello Everyone, We are in the process of implementing ESS and have a few custom rules for certain infotypes built in to the old PA users exits. For example, we do not allow associates to have more than 3 banks, we will not allow associates to change