Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm not sure sample code for this exact task exists. You may start by looking at the <a href="http://msdn.microsoft.com/en-us/library/ms608873%28v=vs.95%29.aspx" rel="nofollow">System.Windows.Media</a> docs, in particularly <code>VideoRecorder</code>, <code>CaptureSource</code> and <code>FileSink</code>. The <a href="http://msdn.microsoft.com/en-us/library/hh394041%28v=vs.92%29.aspx" rel="nofollow">How to: Record Video in a Camera Application for Windows Phone</a> article and <a href="http://code.msdn.microsoft.com/wpapps/Video-Recorder-Sample-5e800bbf" rel="nofollow">Video Recorder Sample</a> may also be useful. I understand that you are not trying to encode video from the camera, but these examples show how to access the available encoders on the phone, you just need to figure out how to give them your own video frames. One problem I can see is that <code>CaptureSource</code>, <code>FileSink</code> and <code>VideoCaptureDevice</code> are all sealed classes. Normally <code>FileSink</code> calls <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.capturesource.captureimageasync%28v=vs.95%29.aspx" rel="nofollow">CaptureSource.CaptureImageAsync</a> and gets the next frame as a <code>WriteableBitmap</code> as a property in the <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.capturesource.captureimagecompleted%28v=vs.96%29.aspx" rel="nofollow">CaptureSource.CaptureImageCompleted</a> event handler. This is where you would want to provide the frames you have, but how? You cannot inherit from <code>CaptureSource</code>... if you could you would simply set that as the source to the file sink and provide your own frames. So at a glance it is not clear whether you can even encode your own video using the built-in codecs on Windows Phone.</p> <p>Another approach if you can use open-source codecs is to compile ffmpeg (or gstreamer, or xuggler, or x264, ...). You might check out <a href="http://forum.xda-developers.com/showthread.php?t=579384" rel="nofollow">ffmpeg4pocketpc</a>, I don't know much about it but looks promising. Or, pick up a commercial codec library such as CoreCodec.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload