rockzero18
帖子: 43
注册时间: 2012-01-25 15:50

Libav(avconv)进行封装时可指定依长度/容量切割吗?

不知将视频切割成数个文件是应该在编码还是封装步骤时完成?
我的想法是如果是在编码时,片源就必须每一段个别进行编码,
如果是封装时,那么片源只需编码一次,接著封装时切割即可。

不过我在avconv的help里没看到有cut或split相关的参数,
而虽然x264有--frames可以指定编码范围,但那必须手动指定,
并无法像一些编码软件自动依容量切割,此外还有音频的部分。
头像
-o-o-304-o-o-
超级版主
帖子: 640
注册时间: 2010-10-10 20:00
来自: US
联系: 网站

Re: Libav(avconv)进行封装时可指定依长度/容量切割吗?

切的话最好还是在avs里面切好吧,编码完成后的h.264视频流切割只能以GOP为最小单位进行,所以存在切割精度不足的问题……

x264的--frames是给定输出的帧数,即从输入视频的第一帧开始计算,编码--frames指定的帧数,如果是打算从头开始,中间不间断的切的话,这样也行,如果需要多段切割的话,还请avs嗯……avs切割然后再通过编码器编码可以实现相对较好的切割精度嗯
► 显示剧情透露 En Taro 06!Taro Pie NC Fanclub project始动!聊天用Q群开放中
► 显示剧情透露 胸中有万言,退敌无一策,是谓书生误国"
► 显示剧情透露 前辈们的信念
► 显示剧情透露 妇联招新广告,走过路过可以看看撒
► 显示剧情透露 香芋派,后期菊苣们的一致选择
► 显示剧情透露 众菊苣喜评香芋派
► 显示剧情透露 聊天用工具
rockzero18
帖子: 43
注册时间: 2012-01-25 15:50

Re: Libav(avconv)进行封装时可指定依长度/容量切割吗?

其實是因為我想偷懶…例如一個三小時的片源,因故我需要切割成每段30分鐘,
那麼就得編寫六個不同Trim範圍的AVS才行…(還是有比較方便的編寫方法?)
kkk
帖子: 5
注册时间: 2012-03-01 11:44

Re: Libav(avconv)进行封装时可指定依长度/容量切割吗?

‘-t duration (output)’
Stop writing the output after its duration reaches duration. duration may be a number in seconds, or in hh:mm:ss[.xxx] form.

‘-fs limit_size (output)’
Set the file size limit.

‘-ss position (input/output)’
When used as an input option (before -i), seeks in this input file to position. When used as an output option (before an output filename), decodes but discards input until the timestamps reach position. This is slower, but more accurate.

position may be either in seconds or in hh:mm:ss[.xxx] form.
见avconv文档

回到 “封装容器 / Container muxer and demuxer”