I have merged your patch into my repo. Thank you!

On Wed, May 15, 2013 at 1:30 AM, Maksym Veremeyenko <ve...@m1stereo.tv> wrote:
> 13.05.13 21:21, Dan Dennedy написав(ла):
>
>> On Mon, May 13, 2013 at 9:58 AM, Maksym Veremeyenko<ve...@m1stereo.tv>
>> wrote:
>>>
>>> Hi,
>>>
>>> could anybody give me advice on how to play with speed 0.1 ... 0.9 or
>>> another non-integer speed value.
>>>
>>> mlt_types.h has very interesting lines code:
>>> [...]
>>> /* I don't want to break anyone's applications without warning. -Zach */
>>> #undef DOUBLE_MLT_POSITION
>>> #ifdef DOUBLE_MLT_POSITION
>>> typedef double mlt_position;
>>> #else
>>> typedef int32_t mlt_position;
>>> #endif
>>> [...]
>>>
>>> that define to use integer type for position, so any float speed values
>>> would be truncated to int value:
>>>
>>> void mlt_producer_prepare_next( mlt_producer self )
>>> {
>>> if ( mlt_producer_get_speed( self ) != 0 )
>>> mlt_producer_seek( self, mlt_producer_position( self ) +
>>> mlt_producer_get_speed( self ) );
>>> }
>>>
>>> so first possible approach would be define DOUBLE_MLT_POSITION, but
>>> could it break MLT?
>>
>>
>> Yes, it is an interesting unused code that I should probably remove.
>> It quite likely will break all sorts of things; it is certainly not as
>> simple a switch as it appears. :-) You are completely on your own
>> should you choose to use it as I know nothing about it. Of course, you
>> can go all in and get something working here and feel free to share
>> your fork for review and merge.
>>
> i did a change to make mlt_position type double (patch attached) and it
> seems it working fine for me currently. at least it playback clips and speed
> could be changed from [0..1] range easy.
>
> i will try to do more tests next day.
>
> i think it would be usefull to add an option to configure for controlling
> macro DOUBLE_MLT_POSITION definition.
>
>
>>> i found producer_slowmotion that sounds like proper solution but i have
>>> no glue how to use it. Could anybody give me a code sample that show how
>>> to use playlist and slowmotion producer?
>>>
>>
>> And that producer is basically useless as well because the resulting
>> image quality is so poor. It attempted to use macroblock motion
>> estimation to do fast frame interpolation. If you just want to repeat
>> or drop frames, then take a look at the framebuffer producer (as used
>> by kdenlive's speed effect). Please be aware that this does not convey
>> the encapsulated producer's audio.
>>
>> framebuffer:some.mp4?0.5
>> speed<  0 : reverse
>> 0<  abs(speed)<  1.0 : slow
>> 1.0<  abs(speed) : fast
>
> could you give a hint on how to use playlist producer and framebuffer
> producer with C-code?
>
>
> --
> ________________________________________
> Maksym Veremeyenko



-- 
+-DRD-+

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to