how to put mp4 or m4v (h.264) video on web to view on Driod?

Discussion in 'Android General Discussions' started by Mel_3, Mar 17, 2010.

  1. Mel_3

    Mel_3 New Member

    Joined:
    Mar 9, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    Setup:
    1 - I've used HandBrake to create two video files from my original AVI video.
    Video.mp4
    Video.m4v

    2 - HandBrak used h.264/MPEG-4 AVC encoding for both the video.
    (mp4 and m4v are "wrappers" and h.264 is the encoding for the video)
    The audio encoded as AAC.

    3 - I created a web page and put a hyper link to each video file.

    4 - Windows media player will download both then play them in quicktime.

    5 - For the mp4 vidio the Droid tells me...
    "Sorry, this video is not valid for streaming to this device.
    For the m4v video the Droid goes to "Download History" (I guess it is trying to download it.

    My Question: How can I put video on a web site and have it play on the Droid? (And play as it downloads... like a YouTube video) (And... no we can't put it on YouTube... the video has to be on our site.)

    Thanks for any help. I really appriceate it.
     
  2. JP 5.56

    JP 5.56 Member

    Joined:
    Feb 23, 2010
    Messages:
    592
    Likes Received:
    10
    Trophy Points:
    18
    Ratings:
    +10
    Been working on something similar myself. Anyone have any ideas!?
     
  3. LtKen

    LtKen Silver Member

    Joined:
    Jan 27, 2010
    Messages:
    2,628
    Likes Received:
    2
    Trophy Points:
    103
    Ratings:
    +3
    You cant yet.

    1) The phone doesnt have Flash
    2) You can easily be busted for unlicensed distribution of IP if the video is anything but home made
     
  4. JP 5.56

    JP 5.56 Member

    Joined:
    Feb 23, 2010
    Messages:
    592
    Likes Received:
    10
    Trophy Points:
    18
    Ratings:
    +10
    I'm not sure what flash has to do with it? On Motorola's website it lists that the droid can read MPEG4. But if I make a movie, save it as mp4 and save it on the web somewhere, if I click the link in my phones browser it wont stream or if saved to the phone it wont play. That doesn't make sense.
     
  5. LtKen

    LtKen Silver Member

    Joined:
    Jan 27, 2010
    Messages:
    2,628
    Likes Received:
    2
    Trophy Points:
    103
    Ratings:
    +3
    The OP wanted to stream like YouTube, which requires Flash. I also dont think the browser will allow you to stream videos at all, since it would require a plug-in to connect the MP4 decoder to the browser. The best you could do is download the content completely and watch it with the Gallery app.

    I've also never had luck with the h.264 codec, FFMPEG is the only one that gives me perfect results 100% of the time.
     
  6. Mel_3

    Mel_3 New Member

    Joined:
    Mar 9, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    Yes, I would like for the video to play "progressively" as it downloads and I'm aware that neither the Droid or other smart phones have Flash... yet.

    I thought the Droid had built in software/firmware to progressively play video as long as it was h.264 encoded and nested in either an mp4 or m4v wrapper.

    We have been successful at plugging the Droid into the USB port and copying an m4v video created with Handbrake... and it plays fine.

    Regarding getting "busted" our videos are original content produced by us so we have no copyright issues here.

    The larger issue here is how any enterprise can put video on their own website and have smart phone/mobile device users view it as it progressively downloads.

    As I understand it YouTube is converting from FLV Flash video to h.264 video.

    The questions:

    So, do all the smart phones... inclluding the Droid... have some propriteary player they are using to play YouTube videos as progressive downloads?

    Are the only options to either...

    a - put your video on YouTube

    b - or make the user wait while the entire thing downloads from your own website?

    Thanks again for any help.
     
  7. HaLo2FrEeEk

    HaLo2FrEeEk Member

    Joined:
    Dec 15, 2009
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +0
    I'm looking for a way to do this too. I downloaded a video that plays on my droid from another site and used ffmpeg to see the specs. Video is encoded with h.264, 25fps, 432x320, 187kbps, mp4 format. Audio is aac. I duplicated those settings converting a wmv to mp4 using ffmpeg on my server and had no luck. Ffmpeg reports that the videos have the same settings, so for interests sake I tried playing the file I downloaded to my server from the other site, it worked just fine. I was playing both files from the same folder on my server, so obviously it's a format thing, not a server thing. I'll look into it.
     
  8. justin_

    justin_ New Member

    Joined:
    Apr 29, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    So I don’t have a Moto, nor do I have Verizon, but I created an account here to share my same struggles in the hope that this info will help someone out.

    I have a Nexus one flashed with the cyanogen mod 5.0.6-n1 (firmware 2.1-update 1). My initial goal was to play movie and music files stored on a NAS (at home) on my phone.

    I installed IIS 6 on a PC to serve files out to HTTP requests. I created to virtual directories; one for music and one for movies. (The only “change” I made to the default IIS 6 setup was registering a MIME type for mp4 files since it is not served out by default.)

    Before testing anything on my phone I used a PC on a different LAN to stream both mp3’s and mp4’s using VLC player, which I found works almost flawlessly over HTTP (I originally thought that you must use a protocol meant for streaming media such as RTSP).

    I browsed to the music directory I setup (i.e. http://domain.com/music/) using my phone (using the default system browser) and clicked on a music.mp3 link. The result was the file streaming to my phone, opening in the default music application. If in the browser I performed the right-click function, I can chose the option to “save link” which downloads it to my SD card, but that is not my goal.

    I then browsed to the movies directory (i.e. http://domain.com/movies/) and clicked on a link to a movie (zombieland.mp4) I encoded specifically for the nexus one (using a program called Xilisoft MP4 Converter which just encodes an mp4 with H.264 codec for specific phone resolution) and the default behavior was to download the movie to the SD card, instead of streaming. I allowed the full movie to download to my SD card (over WiFi, this took a few minutes), and successfully played this movie in the default movie program (gallery) on my phone.

    At this point I know that the Xilisoft program encoded the movie correctly for local playback on the phone, and it was my assumption that the phone is programmed to stream only music and not movies if using the default browser to access the media.

    I spent some time in the android market experimenting with different programs with no success, until I ran across a program called Yxflash. I didn’t want to purchase the program until I could prove it served the function I needed, so I am using the trial. One advertised feature of this program is stream mp4 files, and on the “stream” tab, they have an example mp4 hosted on a google site (http://sites.google.com/site/yxflash/droid.mp4), which plays just fine using the program both over gprs/3g and Wifi.

    If I type in the link for my mp4 however http://domain.com/movies/zombieland.mp4 , the same URL that prompted download in the browser, I get an error saying “Sorry, this video is not valid for streaming to this device.” Sounds a whole lot like Mel_3’s experience.

    Well logic would state that either:
    1- Sites.google.com is setup for streaming media (unlikely since the protocol used in the program is HTTP)
    2- The droid.mp4 is encoded specifically for streaming instead of local playback

    I copied the droid.mp4 to my webserver, and typed in the new driod.mp4 URL http://domain.com/movies/droid.mp4 in the Yxflash program, and guess what? It worked. If I type this exact same URL in my default web browser it still can only download and not stream.

    Conclusion? Without having awesome programming skills like cyanogen I will have to assume that because the current firmware of my phone does not support streaming movies in the default browser, I will have to use another signed program found in the android market to serve this function, and I will have to find another program to replace Xilisoft or to be used in conjunction with Xilisoft to encode my mp4’s for streaming functionality.

    Now, how to encode my mp4’s to stream instead of local playback? Lol no clue but I’m sure I will figure it out soon. You can help if you know the answer.

    The only program I know of that gives you the option to encode media for streaming instead of local playback is Windows Media Encoder which is useless in this situation since I need the files to be MP4.

    I used a cute program called GSpot (crude, I know) to scan and compare the codecs of both videos (both droid.mp4 and zombieland.mp4) and found little difference. They both share the same audio and video codec:

    Video: avc:H.264/MPEG-4 AVC
    Audio: mp4a: MPEG-4 AAC LC

    The containers differ slightly, I see droid was encoded using mp4 version 2 instead of 1:

    Droid.mp4:
    isom: MP4 Base Media v1 [IS0 14496-12:2003]
    mp42: MP4 v2 [ISO 14496-14]
    avc1: MP4 Base w/ AVC ext [ISO 14496-12:2005]
    Recommended Display Size: 480 x 270

    Zombieland.mp4:
    isom: MP4 Base Media v1 [IS0 14496-12:2003]
    mp41: MP4 v1 [ISO 14496-1:ch13]
    Recommended Display Size: 720 x 480

    Hope this helps someone!
     
  9. justin_

    justin_ New Member

    Joined:
    Apr 29, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    WORKS now :) HandBrake did the trick. Streaming to the nexus one in perfect QP:1 quality. I used the FFmpeg codec on the normal profile with the web optimized option checked.

    So in case the above post was a little to teal deer for you:

    Download Yxflash from android market. Use HandBrake to convert your Avi files to be streaming mp4.

    Thanks Mel_3!
     
  10. pyro6128

    pyro6128 Senior Member

    Joined:
    Jan 5, 2010
    Messages:
    1,517
    Likes Received:
    8
    Trophy Points:
    68
    Location:
    NYC
    Ratings:
    +8
  11. justin_

    justin_ New Member

    Joined:
    Apr 29, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Ratings:
    +0
    Ah, another cloud service. This may be a solution if you: use less than 2GB (or if you don't mind paying ZumoDrive - Enjoy your media and documents from every device), don't mind your PC serving media out to a third party server (security risk), or not controlling quality of which the media is served. The caveat of always leaving your PC on would not be lost in this option.

    I have yet to try this, but it looks just like like MyCast your digital media with Orb 2.0 remote pc access software, (search for orb in the android market). I used orb, which is a free service btw, in experimenting getting my media to stream to a Wii (which worked, but playback was via flash, and quality was to low to actually enjoy).

    To each his own :)
     
Search tags for this page
android browser downloads mp4 instead of streaming it
,
android browser mp4
,
download app for opening mp4v1 format for android
,
howto play mp4v1
,
media players that can play mp4v1
,
mp4v1 android
,
mp4v1 player
,
mp4v1 player android
,

mp4v1 player for android

,
zombieland mp4