NetStream doesn't play mp4 packaged with app

I'm using StageVideo to play an h264 encoded mp4 file in an iPhone app. When I package the mp4 file with the app (in the root), the app doesn't play the video at all. When I simply change the video's location to a http location where the exact same file is located, it plays fine.
In other words, the only change I'm making is:
Packaging mp4 in root of app:
var _videoURL:String = "video_h264.mp4" ;
_nc = new NetConnection ( ) ;
_nc.connect ( null ) ;
_ns = new NetStream ( _nc ) ;
_ns.client = this ;
_ns.play ( _videoURL ) ;
_stageVideo.attachNetStream ( _ns ) ;
to
Hosting video remotely:
var _videoURL:String = "http://www.myDomain.dk/video_h264.mp4" ;
_nc = new NetConnection ( ) ;
_nc.connect ( null ) ;
_ns = new NetStream ( _nc ) ;
_ns.client = this ;
_ns.play ( _videoURL ) ;
_stageVideo.attachNetStream ( _ns ) ;
Does anyone know if there's some restriction when using NetStream that could explain this?

You can get away with just the relative path. But, do make sure you added the folder with the videos in the General tab.
Another thing to know, you may not get a StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, that may have already happened before you start looking for it. In case like that you can get remote videos to work, and local videos will sometimes work. Seems to be  amateur of timing.
The way I worked around that issue was to check the stagevideos before listening for the event. Like this:
if ( stage.stageVideos.length >= 1 ) {
  enableStageVideo();
}else{
  stage.addEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, _onStageVideoAvailability);
That seems reliable. enableStageVideo is just a function to set up the stageVideo variable, and its viewPort.

Similar Messages

  • NetStream doesn't play mp4 packaged with app - but plays same file over http

    I'm using StageVideo to play an h264 encoded mp4 file in an iPhone app.
    When I package the mp4 file with the app (in the root), the app doesn't play the video at all. When I simply change the video's location to a http location where the exact same file is located, it plays fine.
    In other words, the only change I'm making is:
    Packaging mp4 in root of app:
    var _videoURL:String = "video_h264.mp4" ;
    _nc = new NetConnection ( ) ;
    _nc.connect ( null ) ;
    _ns = new NetStream ( _nc ) ;
    _ns.client = this ;
    _ns.play ( _videoURL ) ;
    _stageVideo.attachNetStream ( _ns ) ;
    to
    Hosting video remotely:
    var _videoURL:String = "http://www.myDomain.dk/video_h264.mp4" ;
    _nc = new NetConnection ( ) ;
    _nc.connect ( null ) ;
    _ns = new NetStream ( _nc ) ;
    _ns.client = this ;
    _ns.play ( _videoURL ) ;
    _stageVideo.attachNetStream ( _ns ) ;
    Does anyone know if there's some restriction when using NetStream that could explain this?

    You can get away with just the relative path. But, do make sure you added the folder with the videos in the General tab.
    Another thing to know, you may not get a StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, that may have already happened before you start looking for it. In case like that you can get remote videos to work, and local videos will sometimes work. Seems to be  amateur of timing.
    The way I worked around that issue was to check the stagevideos before listening for the event. Like this:
    if ( stage.stageVideos.length >= 1 ) {
      enableStageVideo();
    }else{
      stage.addEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, _onStageVideoAvailability);
    That seems reliable. enableStageVideo is just a function to set up the stageVideo variable, and its viewPort.

  • Zen doesn't play .m4a encoded with Nero AAC encoder = Creative, please create a firmware f

    The Zen doesn't play AAC encoded with Nero's AAC encoder, which is unfortunate since it's the best one out there. It does, however, support iTunes-encoded AAC. There was a brief discussion on it elsewhere, but I'd like to focus the discussion here on:. Request for firmware fix by Creative, so the Zen will read the files: ple2. A fix to get the files to play in the current firmware?Many of the references in this forum to wishlists, tools etc. are dead links, so hopefully?this thread will generate some answers for those of us out there with sizeable Nero AAC-encoded?music libraries.

    Very Good!!
    I'd just like to report that m4a files made with winamp and then repackaged with your application have a problem in fast forward and rewind. That is, (Sorry for my English, please try to understand) when you fast forward to a point, the player correctly jumps to the desired point, but, after that, the playback bar starts again from 00:00:00, even if the player is in the middle of the song.
    Anyway, this doesn't corrupt playback quality and doesn't create audio gaps; moreover, it just happens with the zen, while winamp works correctly.

  • Mail doesn't play any sound with new Gmail emails

    I just signed for a Gmail account but I see it works in a someway different manner from the other email accounts I have. I noticed that Mail shows me a new incoming email almost immediately since I click send from another account, that's a good thing, but unfortunately it doesn't play any sound, like instead it does when I receive emails on the other accounts.
    any suggestions?

    I have noticed with 10.6.x Mail doesn't make sounds when receiving/sending Mail when you first launch it. However if I leave it open (just minimize it) and let it run and Mail goes get new email sound suddenly makes the sounds. I am still trying to figure out why it is happening (on both of my Macs). If you get any idea please share it because I would like to know also.

  • HT4609 error -2048  when it doesn't play MP4 file

    I thought itunes would play MP4 files, but I got the error -2048, what does this error mean??? with Xp OS
    Keep smiling !!!

    Yes you'll likely need to re-rip the album to your iPod.
    How many songs are reported in your iTunes library?
    When you said you selected your entire iTunes library and made sure they were not set to skip when shuffling, how exactly did you do that? 
    There seems to be a missing piece of information here that would help explain the differences in numbers.
    B-rock

  • Itunes does not work when I want to play Mp4 videos with most recent versions

    When I want to play videos with mp4 format on itunes, it does not do anything and I have to close itunes with the windows system manager. Does any one know how to solve this problem? I did not have this isue with 10.5 and previous versions of itunes.

    I found the solution, the problem was the encoding of the configuration files.
    I put:
    => Encoding: UTF8 without signature
    => line endings: UNIX(LF)
    And now it works :)

  • Problem playing mp4 with StageVideo using Air 3.8 and 3.9

    I have spent days pulling my hair out trying to get a mp4 video to play on my iPad or iPhone using StageVideo. I have tried numerous examples on the web that all claim to work and none of them would work on my devices. Note I was testing with Air 3.9
    This morning I tried a sample someone had kindly uploaded to the web that had the Air settings set to Air 3.7 and wow and behold it works.
    Changing the version of Air to 3.8 or 3.9 stops it working. This is the case when testing in the Flash CS6 IDE and on the iPad.
    So is there a bug in Air 3.8 and 3.9 or has there been a change in how StageVideo is implenented?
    If anyone has managed to play mp4 using StageVideo and Air 3.8 or 3.9 please let me know and if you are able to paste the code even better.
    Here is a link to the example I am using
    http://01am.co.uk/comment/2

    Thank you for replying to my post. I am pleased I am not going mad and that it is not just me having these issues.
    When I displayed some debugging info on screen with regards the NetStatus events. I had the following scenario:
    NetStream.Play.Start
    NetStream.Buffer.Full
    NetStream.Play.Failed
    NetStream.Play.Stop
    I have not tested with Air 4.0 but sounds like this is also not working from reading the bug report. Seems a pretty major bug which is why I assumed I must be doing something wrong.
    Let me know if Air 3.7 works for you.

  • ATV doesn't show iTunes playlists and doesn't play them using the Remote app

    Hello
    Using ATV3 with the latest software version and it is connected to the iTunes library (also latest version) on my Mac Mini.
    When I go to Computers on the ATV I can see the content of the iTunes and am able to play both Music and Vidoes however I don't see the playlists on iTunes there. On the ATV configuration it is configured to Show playlists -> All but still no Playlists appearing at the top of my movie and TV show listings section.
    When I connect to the ATV using the Remote app on the iPhone and go to Computers there I do see the playlists but unable to play the ones with Vidoes just music.
    Any ideas what would cause these problems...?

    log into my library through more > computers where? on the Remote? This is exactly what i'm doing, I can see the content of my library there but I can't play movies from there.
    Re: ATV doesn't show iTunes playlists and doesn't play them using the Remote app 

  • How to play a mp4 movie with DTS audio?

    Hello,
    I try to play a mp4 movie with DTS audio on the z1 player but i dont get any sound...I also have downloaded the app mx player, but this also wont play the dts audio. Any suggestions?
    Thanks,
    Edy

    http://forum.xda-developers.com/showthread.php?t=1831111
    "I'd rather be hated for who I am, than loved for who I am not." Kurt Cobain (1967-1994)

  • Sound doesn't play with video

    i just recently put a few music videos on my ipod and they play fine, but the music doesn't play along with them. also if i try to play the music then start the video, my ipod freezes up. can anyone help me resolve my dilemma here? thanks (:

    Quicktime, Quicktime Pro and iTunes don't convert "muxed" ( muxed means multiplexed where the audio and video are stored on the same track) video files properly. It only plays the video and not the audio.
    See:iPod plays video but not audio.
    You need a 3rd party converter to convert the file with both audio and video.
    See this for help: Guide to converting video for iPod (Mac/Windows).

  • HT5622 The Game Center used to work with my Apple ID before I updated to iOS 7.4, I used to play multiple player with EA Real Racing 3 game but it doesn't work at all and every time I tried to go to the Game Center it's just blank, even to the settings no

    The Game Center used to work with my Apple ID before I updated to iOS 7.4, I used to play multiple player with EA Real Racing 3 game but it doesn't work at all and every time I tried to go to the Game Center it's just blank, even to the settings nothing!

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Go to Settings>Game Center and sign out and sign back in
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                                
    iOS: How to back up                                                                                     
    - Restore to factory settings/new iOS device.             

  • How can I synchronize my iPhoto events? my iTunes doesn't read them and with the app Images in the iPad I can only find Photos, Albums, Faces and Places, not Events.

    How can I synchronize my iPhoto events? my iTunes doesn't read them and with the app Images in the iPad I can only find Photos, Albums, Faces and Places, not Events.

    I had a problem a couple of months ago when iPhotos suddenly rearranged the order of my Events (Why won't iPhoto let me arrange my photos?) .  I was told "Use albums not events - events are not a good way to organize - albums and folder are designed for organisation and are very flexible".
    Haha!  I should have paid attention and read between the lines!  My iPhotos were highly organised groupings - not according to date but the way I wanted them - and it was so easy to do!  I see now that if I had them all in albums, as per the Apple Apologist suggestion, I wouldn't have this unholy mess I have been left with just to make iPhone & iCloud users happy.  I am now going through Photos and making Albums (of what used to be in my Events)  ... maybe I'll get this finished before they do another non user friendly update!

  • Doesn't play songs, "itunes is not configured for use with mac-formatted"??

    Hi, new ipod shuffle. Seems to charge fine, all indicator lights function as expected. Everything looks fine in itunes. But it doesn't play songs. I have the most recent versions of itunes and the ipod software. Re-set, updated, and restored, nothing works. Even restored using the restore utility. Re-started computer. Checked for volume control. Won't play songs. Tried different file types. Songs play fine from itunes library and from the device's library within itunes. Tried different headphones. Hooked it up to computer speakers. Turning volume all the way up on device and speakers, heard some very faint rhythmic static, so my guess is the jack socket (or whatever you call it) is just messed up, but it seems weird that it can transfer power and data to the device but doesn't work for sound...
    The only other issues that have come up is that the drive disappears in explorer once it syncs with itunes. Other people who've noticed this seem to have completely different problems so I don't think it's related.
    Also, I have MacDrive on my computer. And when it starts up with the ipod plugged in, MacDrive offers the message "Itunes is not configured for use with Mac-formatted ipods." It offers to automatically reconfigure itunes so it can read mac-formatted ipods. Since I've restored the device, I don't see why formatting should be an issue so I say "no."
    Should I try letting macdrive do its format thing? Should I try formatting the ipod disk on the My Computer menu? Or should I just email apple and tell them the jack's busted?
    Thanks for any thoughts!

    Well, I have had my iPod for about 3 years, it is a 4th generation non-video 40 GB. One day it just stopped working, and now it does not play any songs. when I turn it on it makes this odd whirring sounds that computers make when they try really hard to do something. I cannot charge it, and it is not recognized by iTunes. Also when I turn it on, I get the apple.com/ipod/support (or whatever it is) screen. Needless to say, my warranty is expired, and so I cannot do anything for it except get a new battery, or buy a new one. Is there any way to fix this problem, or anyone out there who is experiencing the same thing?
    I'm having the exact same problem with my wife's iPod. However it will play about 3 seconds of a song and go onto the next song.
    If there is anyone out there that can help please do!
      Windows XP  

  • I want to create an external video widget with iAd. I followed the steps and copied the Url and paste it in the Video pop-up menu in the Properties section of the inspector. When i select 'preview' the video doesn't play and the Url that i pasted is gone.

    i want to create an external video widget with iAd to use in an iBook. I followed the steps and copied the Url and paste it in the Video pop-up menu in the Properties section of the inspector. When i select 'preview' the video doesn't play and the Url that i pasted is gone.
    hope someone can help!

    May have something to do with whether or not the URL can be reached while building your widget.  I've got a video on the web. When I enter the URL into the field for the video object and click to another field,  the URL is replaced with some text indicating that it is accessing the video then updates itself to displaying just the name of the video file.
    It shows just fine in preview and I can see the full path to the video when I export the widget so it should work for you. 
    Is the video accessible from your Mac while you're laying out your widget?
    -Mark

  • Does RM29.90 per month photography package with photoshop and lightrooms come with Adobe bridge app as well?

    Does RM29.90 per month photography package with photoshop and lightrooms come with Adobe bridge app as well?

    Does RM29.90 per month photography package with photoshop and lightrooms come with Adobe bridge app as well?

Maybe you are looking for