能够编码源文件的特定部分 [英] Able to encode specific portions of the source file

查看:60
本文介绍了能够编码源文件的特定部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Expression Encoder SDK中,是否可以对源文件的特定部分进行编码?例如,在一个简单的例子中,假设我有一个5GB的MP4文件,我想从字节0到1048576进行编码,然后我想将字节1048577编码为
2097152。

In the Expression Encoder SDK, is it possible to encode specific portions of the source file? For example, on a simple example, let's say I have a 5GB MP4 file that I want to encode from bytes 0 through 1048576, and then I want to encode bytes 1048577 to 2097152.

Expression Encoder SDK是否能够在第一段的最后一个音频/视频帧停止编码?它是否具有启动能力和第一个可用的"整体"能力。第二段的框架?我想打破MP4
文件的特定部分,没有字节丢失(我意识到可能存在帧丢失),然后在我单独编码的段之间特定放置一些东西。如果我以这种方式进行,会丢失帧丢失吗?和/或者,它是否有能力在读取源后停止编码
,有点像流读取,但我只想要去那么多的X,XXX字节。

Does Expression Encoder SDK have the ability to stop encoding at the last audio/video frame for the first segment? Does it have the ability to start and the first available "whole" frame on the 2nd segment? I want to break up specific portions of the MP4 file, without byte loss (I realize there may be frame loss), and then place something specificially in between the segments that I encoded separately. Will frame loss be incurred if I do it in this manner? And/Or, does it have the ability to stop encoding after reading the source, sort of like a stream read, but I only want to go to so many X,XXX bytes.

谢谢!

 

推荐答案

您好

Encoder SDK不允许访问GOP或段,但它允许您选择要编码的内容。以下是一些可能有用的示例代码。

The Encoder SDK doesn't give access to the GOPs or segments but it does allow you to choose what you want to encode. Here is some sample code that might help.


MediaItem mItem = new MediaItem(@"C:\Users\Videos\Sample Videos\Wildlife.wmv");
mItem.Sources[0].Clips[0].StartTime = TimeSpan.FromSeconds(10);
mItem.Sources[0].Clips[0].EndTime = mItem.FileDuration - TimeSpan.FromSeconds(10);


这篇关于能够编码源文件的特定部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆