locked
MediaElement error: Unsupported Video Type RRS feed

  • Question

  • When trying to play MP4 videos using the file picker in the the xaml BasicMediaPlayback sample (VB), MediaElement displays an error: unsupported video type or invalid file path. I've tried a few .mp4 files including one that I created with my built-in PC camera.

    I verified that file.ContentType returns "video/mp4"

    Dim file As StorageFile = Await fileOpenPicker.PickSingleFileAsync()
    
    If file IsNot Nothing Then
    
    Dim stream As IRandomAccessStream = Await file.OpenAsync(FileAccessMode.Read)
    
    Scenario1MediaElement.SetSource(stream, file.ContentType)
    
    End If

    Any ideas on how to fix or troubleshoot this issue?


    musical9


    • Edited by musical9 Tuesday, September 2, 2014 5:44 PM typo
    Tuesday, September 2, 2014 1:50 PM

Answers

  • I can't think of any general reason why this wouldn't work. Unfortunately we'd need to examine a repro to diagnose what is going on. MediaElements should work fine across remote desktop, and I just confirmed that it did so for me.
    • Marked as answer by musical9 Thursday, September 18, 2014 1:52 AM
    Wednesday, September 17, 2014 10:27 PM
    Moderator

All replies

  • Your code looks correct. Does this repro for all files? What format is the file in? Can you play it in the Videos app?

    --Rob

    Wednesday, September 3, 2014 1:50 AM
    Moderator
  • Your code looks correct. Does this repro for all files? What format is the file in? Can you play it in the Videos app?

    --Rob

    Thanks Rob and sorry for the delay in replying, but I was out-of-town and connecting to a development machine via Remote Desktop. 

    I'm back in the office and MediaElement works properly locally, but via remote desktop I still get error: "unsupported video type or invalid file path".

    I'm running the Windows Store App in Visual Studio 2013 in both cases (locally and remote desktop). Same result using MP3 and MP4 files: locally works fine, but not using RD.

    Also, I get the same result using the BasicMediaPlayback sample app.

     


    musical9

    Monday, September 15, 2014 6:37 PM
  • Does the file play correctly in the app if you download it to the local system rather than remoting to the server?

    I believe in current versions of remote desktop will send the stream to the client for local rendering rather than rendering on the server. If the client doesn't have appropriate codecs to play the video then that may fail.

    --Rob

    Monday, September 15, 2014 8:31 PM
    Moderator
  • Yes, I transferred the app (in Release mode) to my Surface Pro 3 via remote debugger and it works fine locally. The same SP3 was the remote desktop client that I used when I was getting the unsupported video type error when running in Visual Studio on my Win 8.1 Pro development machine.

    I'd be interested to know whether others can use a MediaElement app via remote desktop or whether there is some unique issue on my client or server. This question could be significant if used as a remote app in the future.


    musical9

    Tuesday, September 16, 2014 11:05 AM
  • I can't think of any general reason why this wouldn't work. Unfortunately we'd need to examine a repro to diagnose what is going on. MediaElements should work fine across remote desktop, and I just confirmed that it did so for me.
    • Marked as answer by musical9 Thursday, September 18, 2014 1:52 AM
    Wednesday, September 17, 2014 10:27 PM
    Moderator
  • Your confirmation that it does work across remote desktops is what I needed. Since I can test my app adequately and the problem I had may be unique to my installation, I don't think it's worth the time to troubleshoot further. Thanks for helping.

    musical9

    Thursday, September 18, 2014 1:52 AM