Surface video playback not working RRS feed

  • Question

  • Hello,

    We are currently building an application that is using the webcam/camera on desktops/laptops/surface to record and save into storagefiles.
    The problem is that we can record the video fine on all platforms, but when we try to playback on the slate using a media element, it shows a black screen. Audio is fine and it runs the length of the recording, but video is black.

    It works fine on laptops/desktops.

    Our media encoding profile looks like 

    MediaEncodingProfile h264encoding = MediaEncodingProfile.CreateMp4(VideoEncodingQuality.Auto);

    As far as we can tell the surface uses h264 and .mp4.
    We have also tried the microsoft video examples who use the same setup and they work fine on the surface we are using for testing.

    Thank you for your time

    Friday, March 15, 2013 9:36 AM

All replies

  • Hi,

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Thank you for your understanding and support.

    Min Zhu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, March 18, 2013 4:51 AM
  • Hi,

    I think there is some difference in the encoding. I check the code for the CameraCaptureUI sample and it looks like :

      // Using Windows.Media.Capture.CameraCaptureUI API to capture a photo 
                    CameraCaptureUI dialog = new CameraCaptureUI(); 
                    dialog.VideoSettings.Format = CameraCaptureUIVideoFormat.Mp4; 
                    StorageFile file = await dialog.CaptureFileAsync(CameraCaptureUIMode.Video); 
                    if (file != null) 
                        IRandomAccessStream fileStream = await file.OpenAsync(FileAccessMode.Read); 
                        CapturedVideo.SetSource(fileStream, "video/mp4"); 
                        ResetButton.Visibility = Visibility.Visible; 
                        // Store the file path in Application Data 
                        appSettings[videoKey] = file.Path; 
                        rootPage.NotifyUser("No video captured.", NotifyType.StatusMessage); 

    I think you can give MP4 a try and also compare your code with the sample codes.

    Edit : Just wanted to check if the application that captures video is Windows Store app or a desktop app?


    Tuesday, March 19, 2013 9:44 AM