Android Community
Results 1 to 2 of 2

Thread: Problem with playing Video file.

  1. #1
    Join Date
    Oct 2009
    Posts
    1

    Default Problem with playing Video file.


    Hi All,

    I am just trying to play a video from a raw folder available in my project resource by using the following simple code snippet provided by Android developers website.

    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    MediaPlayer mp = MediaPlayer.create(getBaseContext(), R.raw.sample); // sample: it is a .m4v file.
    mp.start();

    }

    But when i run my code, it plays only the sound, i didn't see video player or video. Only sound is coming. May i know what should be the problem and how to resolve this issue?

    Note: I'm trying on Android OS 1.5 HTC T-mobile handset.

    Can someone came across this please provide me your suggestions?

    John..

  2. #2
    Join Date
    Oct 2008
    Location
    london
    Posts
    113

    Default Re: Problem with playing Video file.


    i havent had that issue - but check the video codec is supported.

    the .extenstion isnt necessarily an indicator or the video/audio codecs

    you may need to convert it to what ever the media player wants, specifically.

    check the documentation, make sure your video matches exactly

Similar Threads

  1. Playing music, and file extensions.
    By Derevex in forum General HTC Chat
    Replies: 2
    Last Post: 05-31-2009, 12:44 PM
  2. File transfer problem
    By dancesisidance in forum General HTC Chat
    Replies: 3
    Last Post: 05-20-2009, 02:32 PM
  3. Help Renaming Video File
    By Eric Thai in forum Off-topic
    Replies: 7
    Last Post: 02-22-2009, 09:07 AM
  4. Replies: 2
    Last Post: 10-21-2008, 01:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •