Search

Encoder-captured video with script commands has playback problems in Silverlight by Vladimir Lieberzeit

Closed

1
0
Sign in
to vote
Type: Bug
ID: 753753
Opened: 7/15/2012 1:17:18 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
If I use Encoder 4 SDK to capture a live video and use LiveJob.SendScriptCommand to insert numerous script commands, the resulting video does not play well in Silverlight. There are sections (but not the whole video), where the picture refreshes only every 5 sec (probably only keyframes are displayed). The audio plays smoothly all time.

To get this effect, the video must be long enough (at least 100 sec) and the script commands must be generated quickly enough (e.g. every 0.5 sec, though the issue was seen with frequency 2 sec as well). I have a stable repro with video length 100 sec and script commands every 0.5 sec. See source code attached in "Repro Steps".

The problem is visible only in Silverlight. The video can be played without any problem in Media Player.

Funny enough, if the captured video with the problem is later transcoded by Encoder without any change of parameters (the preset "Apply Source Encoding Settings"), the problem disappears.

The problem also seems to be related to selected video frame rate. It happens with frame rate 30, it does not with frame rate 15.

Reproduced with Encoder 4.0 SP1 and SP2, and Silverlight 5.1.10411.0.
Details (expand)

Product?

Encoder

Product Version?

 

Encoder 4 (4.0.1639.0)

Issue Type?

Bug

Repro Steps? (N/A for Suggestion)

See source code. If the resulting file is played in Silverlight player, the problem would be seen.

static void Record(string filename)
{
    EncoderDevice audioCaptureDevice = EncoderDevices.FindDevices(EncoderDeviceType.Audio)[2];
    EncoderDevice videoCaptureDevice = EncoderDevices.FindDevices(EncoderDeviceType.Video)[1];
    LiveJob job = new LiveJob();
    LiveDeviceSource deviceSource = job.AddDeviceSource(videoCaptureDevice, audioCaptureDevice); ;
    job.ActivateSource(deviceSource);
    job.ApplyPreset(LivePresets.VC1512kDSL4x3);
    job.PublishFormats.Add(new FileArchivePublishFormat(System.IO.Path.GetFullPath(filename)));
    job.StartEncoding();

    for (int i = 0; i < 200; i++)
    {
        string slideName = String.Format("slide{0}", i);
        Microsoft.Expression.Encoder.Live.ScriptCommand cmd = job.AddScriptCommand("URL", slideName + "&&region1");
        job.SendScriptCommand(cmd);
        System.Threading.Thread.Sleep(500);
    }

    job.StopEncoding();
}
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 1/30/2013 at 1:23 PM
We recently announced that we are discontinuing development of Expression Encoder. You can read the full announcement on our community page at http://msdn.microsoft.com/expression. Because this product is no longer in development, we are closing all outstanding bugs.
Sign in to post a workaround.