【问题标题】:The exception caused by modify FPS修改FPS引起的异常
【发布时间】:2020-05-21 03:41:29
【问题描述】:

我用mlt++修改FPS如下:

consumer->set("frame_rate_num", 60.0);
consumer->set("frame_rate_den", 1);
producer->profile()->set_frame_rate(60, 1);
producer->set("length", producer->get_length_time(mlt_time_clock);
producer->set_in_and_out(0, producer->time_to_frames(producer->get_length_time(mlt_time_clock)));

但是输出文件有异常:时间对了但是画面停了,音频也弯了

【问题讨论】:

    标签: video frame-rate mlt


    【解决方案1】:

    并非所有服务都支持在创建后更改配置文件。

    最好创建一个配置文件,然后使用该配置文件设置所有服务:

    Mlt::Profile profile;
    profile.set_framej_rate(60, 0);
    profile.set.....
    Mlt::Producer producer = new Mlt::Producer(&profile, <service>);
    Mlt::Consumer consumer = new Mlt::Consumer(&profile, <service>);
    

    【讨论】:

    • 消费者的服务是“avformat”,生产者的服务也是。我调试框架时fps改变了(即60 fps)。但在输出文件中,时间正常但图片停止。
    猜你喜欢
    • 2016-11-19
    • 2012-02-07
    • 1970-01-01
    • 1970-01-01
    • 2012-12-24
    • 2015-01-31
    • 2013-03-12
    相关资源
    最近更新 更多