0

I use the mlt++ modify FPS as follows:

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)));

but output file has a exception: time is right but the picture is stopped, and audio is also stooped

xin ding
  • 1
  • 3

1 Answers1

0

Not all services support changing the profile after creation.

It is always best to create one profile and then use that one profile to set up all the services:

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>);
Brian
  • 1,200
  • 6
  • 8
  • Consumer's service is "avformat",and producer's service is also too.Fps changged when i debug the framework(that's 60 fps). but in the output file, time is normal but the picture is stops. – xin ding May 25 '20 at 03:46