XNA Creators Club Online
Page 1 of 1 (4 items)
Sort Posts: Previous Next

VideoPlayer Won't Play My Video

Last post 7/8/2009 5:17 PM by nonexpectation. 3 replies.
  • 7/2/2009 4:41 PM

    VideoPlayer Won't Play My Video

    I have been able to get some sample code to play a sample video but I can not get my own video to play. The sample I used was from http://www.catalinzima.com/?page_id=532. The content manager does not complain when I build the project, but when I start the game only the first frame of the video is displayed and it doesn't move on to the next frames. I checked the player state and it says playing but the Play Position never increases past 0. I encoded the video using Windows Media Encoder with a blank audio track and single pass encoding (as instructed somewhere in this forum) with various resolutions and bit rates but nothing seems to help.
    Thanks for any help.
  • 7/4/2009 4:18 PM In reply to

    Re: VideoPlayer Won't Play My Video

    Hi,
       is video in CBR?

    Only video in CBR works with XNA (3.1) VideoPlayer, if your video is in VBR you must convert it in CBR.
  • 7/5/2009 4:13 PM In reply to

    Re: VideoPlayer Won't Play My Video

    Windows Media Encoder is garbage when it comes to making XNA-friendly videos. Switch over to Windows Movie Maker or an alternative. I tried coaxing a valid video out of WME using the software development kit but so far no dice.
  • 7/8/2009 5:17 PM In reply to

    Re: VideoPlayer Won't Play My Video

    Okay windows movie maker did work after some tricks. I started with an avi (uncompressed) and imported that into windows movie maker. I clicked "save to my computer", and added it to my content. That didnt work.
    Then I added an audio track (Beethoven's 9th...I only have sample audio on here...) and then saved it. After it was done saving I added the resulting video file to my XNA content and it played all the way through. Since the 9th symphony was an odd pairing, I went back and deleted the audio track and left it empty and saved the movie again. It still worked. So I guess the way to get a video to work is to encode it with Windows Movie Maker with an empty audio track. So I guess even though the error message is about CBR and DRM its actually about no audio track. thanks for your suggesstions and I hope this helps somebody else.
Page 1 of 1 (4 items) Previous Next