No video on mobile for Android

edited February 2012 in Bugs and Errors
I have successfully installed and am running the script at http://archive.flmbc.com. The video works fine on the desktop, but when I go to view it on an Android 2.2 (HTC Hero), I get a black video and audio; no video. I am using the default settings for the encoder for mobile. If you need access, I will private message the ID/PW. Thank you. -Brian, admin FLMBC-Tube/Live Stream

Comments

  • Have you tried to switch the encoding settings to x264 instead?

    I was able to see your videos on iPhone, I don't have an Android with me right now.
  • No, hadn't considered it. Will change it later today, and let you all know what happens.
  • Ok let me know.

    Also while you're at it, check out the videos on our demo site (the mobile version) using your phone. Let me know if those play on your phone.
  • edited February 2012
    That's the area of question, the mobile site. It plays just fine on the desktop.
  • I understand that.

    What I'm trying to achieve is to have you look at videos from the "Mobile CumulusClips Demo" VS "Mobile FLMBC" using your Android phone.

    This will help me diagnose the issue and track it down to server/ffmpeg config, or encoding commands, etc.

    So I would like to know if, using your Android phone, can you view the videos on the "Mobile CumulusClips Demo"?

    Let me know how that goes along with switching your mobile encoding command to x264, which is preferable.
  • edited February 2012
    Same issue with "Mobile CumulusClips Demo" as "Mobile FLMBC". I can see the thumbnail for the video just fine.

    I had downloaded the quicktime sample that was given in another thread to test with. Have also been looking for another media stream program to see if that might be the issue, as a friend has a different HTC Android that is 4G compatible on Verizon, and he seemed to find an extra link to allow him to push it through YouTube after a few refreshes, and it played fine.

    As for the test file, I have copied and renamed the log files at ftp://ftp.flmbc.com to mp4.log and x264.log. The x264 format didn't work, but the mp4 did. The username is anonymous@flmbc.com with no password.

    [update 2/21 7:42am PT]

    In doing a bit more research this, this morning, I found the XDA Developers forum (http://forum.xda-developers.com/showthread.php?p=5454468#post5454468) where it discusses (http://forum.xda-developers.com/showpost.php?p=5454468&postcount=32) the HTC Hero and H.264/MP4 videos. I will give these settings a try later tonight (likely about 9p PT). I will then let you know what happens when I follow their suggested settings.
  • Upon contemplation since this morning, I plan on leaving the settings as-is until I figure it out by downloading the converted mobile file, re-encode it and upload the new video by the same randomly generated name.
  • Try this, switch your 'Mobile Encoding' command in Admin Panel -> Settings -> Video, back to it's original value. However make this one small change, add '-vcodec mpeg4' after '-f mp4' so the entire value should look like this:

    -s 480x360 -vb 600k -ac 2 -ab 96k -ar 44100 -f mp4 -vcodec mpeg4

    Save this value, upload a new test video, preferably the sample one we provide (it's much faster), and check again in your phone.
  • Could you also run this command on your command line and post here the results:

    ffmpeg -i VIDEO_FILE_THAT_WONT_PLAY.mp4 2>&1 | grep -i 'Video:'

    Replacing 'VIDEO_FILE_THAT_WONT_PLAY.mp4' with the path to any mobile MP4 video that won't play on your mobile phone.
  • edited February 2012
    When I do as above, I get no results, but when I replace the file name with * I have the following before trying the adjusted settings for mobile uploads:

    ffmpeg -i *.mp4 2>&1 | grep -i 'Video:'

    Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 480x360, 598 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc

    [UPDATE!!!]

    Bingo, bango, bongo! That did the trick! Now to adjust the other settings for the closest I can get to a smaller video for the cleanest looking video I can get.
  • What did the trick? Was is the '-vcodec mpeg4'? Would you mind confirming this.

    Either way, I'm glad you got it working!

    Also, I think I may have confused you with one of my requests. Please run this command twice:

    ffmpeg -i /home/username/public_html/cumulusclips/cc-content/uploads/mobile/ABCDEFG.mp4 2>&1 | grep -i 'Video:'

    Update the path accordingly. The first time use the path to a mobile video that didn't work. The second, use the path to a mobile video that did work.
  • edited February 2012
    It was adding -vcodec mpeg4 to the end of the default settings that did the trick. However, when I uploaded a 233MB m4v, the video wasn't there right away; just have to give the larger files like these more time to process.

    I already deleted the videos and started over, so I can only give you the settings for one that works, the test file, with leaving off specifying the video size.

    /home/flmbccom/public_html/archive/cc-content/uploads/mobile$ ffmpeg -i os8BJIXqQccuGa8UIvZF.mp4 2>&1 | grep -i 'Video:'
    Stream #0:0(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 190x240 [SAR 1:1 DAR 19:24], 453 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc

    [Sidebar]

    What might the code be to add to allow someone to download the video to their own computer?
  • After reviewing your logs I found the issue.

    By default on your server, when you tell FFMPEG to create MP4 videos, i.e. using '-f mp4', FFMPEG uses the libx264 codec to do so.

    This created an H.264 video with a profile too high for your Android phone to handle. Most mobile phones, like iPhone for example, can only support the H.264 Baseline profile.

    By adding the '-vcodec mpeg4', you forced FFMPEG to the mpeg4 codec instead of the default (in your case libx264), to create the mobile videos. This resulted in videos that your Android phone could handle.

    =====================================

    To allow people to download your videos simply provide them with a link directly to the video with this HTML:

    <a href="http://example.com/cc-content/uploads/flv/video.flv">Download</a>

    Replace the domain name and video file name to the one you wish to target.
  • Thank you. Sorry it has taken so long to respond back, but finally had the time to adjust the pages to add a download link. I ended up putting it in play.tpl at the 'top' before the navigation and video.

    What I ended up doing, was copying from the title script info and the file info script, as I wanted to have it automated. I used was < a href="<?=$config->flv_url?>/<?=$video->filename?>.flv" title="<?=$video->title?>">Download this video< /a> to a working success at first try.

    As for h264 being a higher end that most Android phones don't like, it is interesting. But good to know that I can still add '-vcodec mpeg4' into the force mode and have it compatible for viewing.
This discussion has been closed.