On Sat, Jun 11, 2011 at 11:01 AM, Ertan Deniz <ertan...@gmail.com> wrote:
> Hi,
>
> I use the latest code from GIT repository. I'm trying to transcode
> videos with MLT through API, and the resulting file has A/V sync
> problems.
>
> My original video file is about 16 FPS, and when I use a 25 FPS
> profile and transcode using MLT,
> the resulting video plays faster than the original. (Actually the
> video frames are faster but the audio plays with same speed,
> so that's where the sync problem occurs). Since the video frames are
> faster the video finishes early and the last frame is repeated (still
> image)
> until the audio finishes.
>
> Am I doing something wrong? Or is this expected behavior?

Please do more troubleshooting as I am rather busy. What does/did
work? an earlier version? a different file/format? melt? It kinda
sounds like the file is non-seekable, and this is expected results for
non-seekable files today.

> I thought as a workaround to set the FPS of the profile equal to the
> original one, but I could not find a way to get the FPS of original
> file through the API.
> Is there a way?

Profile.from_producer will update the profile based on attributes of
the producer, but that includes all attributes. Alternatively, after
calling Producer.get_frame one time, you can get the following
properties as integers:
meta.media.frame_rate_num
meta.media.frame_rate_den

> This is what I do in short:
>
> Profile prof; // A 25 FPS profile
> Producer producer = new Producer(prof, "original.3gp");

print producer.get_int("seekable") here to see if the file is seekable

> Consumer consumer = new Consumer(prof, "avformat", "1.mp4");
> consumer.connect(producer);
> consumer.start();
>
>
> Regards,
> Ertan
>
-- 
+-DRD-+

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to