18.09.14 19:43, Dan Dennedy написав(ла):
> On Thu, Sep 18, 2014 at 9:27 AM, Maksym Veremeyenko <ve...@m1stereo.tv
> <mailto:ve...@m1stereo.tv>> wrote:
>
>     Hi,
>
>     attached patch set metadata 'timecode' from first frame's
>     meta.attr.timecode.markup property.
>
>
> Compare your patch to the recent commit that removed that feature:
> https://github.com/mltframework/mlt/commit/022dedf4d4ccc9e1703d7a1c8ad4bd524ae62987#diff-1bba886ccf70d0171adb4e7842ec3d58L1393
>
thanks for notices.

my first idea was to call *mlt_consumer_rt_frame* before header writing 
but i decided just move header writing below because if less origin code 
ruins.

first, without such kind of early mlt_consumer_rt_frame or delayed 
*avformat_write_header* makes impossible to store real timecode from SDI 
source (vitc).

second, i cant understand where /timing problem/ can start from. 
*consumer_read_ahead_thread* seems had similar also had early 
/mlt_consumer_get_frame( self );/

if it unsure where problem could comes from, we can add a property to 
avformat_consumer that allow calling *avformat_write_header* after first 
frame, i.e. make it parametrized

> diff --git a/src/modules/avformat/consumer_avformat.c
> b/src/modules/avformat/consumer_avformat.c
> index 30e74f0..7f0fe98 100644
> --- a/src/modules/avformat/consumer_avformat.c
> +++ b/src/modules/avformat/consumer_avformat.c
> @@ -1580,6 +1580,32 @@ static void *consumer_thread( void *arg )
> // Write the stream header.
> if ( !header_written )
> {
> +// set timecode from first frame if not been set from metadata
> +if( !mlt_properties_get( properties, "meta.attr.timecode.markup" ) )
> +{
> +char *vitc = mlt_properties_get( frame_properties,
> "meta.attr.vitc.markup" );
> +if ( vitc )
>
> Add test that vitc is not empty string.
i will

>
> +{
> +mlt_log_debug( MLT_CONSUMER_SERVICE( consumer ), "timecode=[%s]\n", vitc );
> +
> +#if LIBAVUTIL_VERSION_INT >= ((51<<16)+(8<<8)+0)
>
> I need to check what release version of FFmpeg and Libav this
> corresponds to. I am very soon going to update the avformat code to
> address deprecations and to review API usage against ffmpeg.c. In that
> process, I am going to drop support for versions 0.7 and 0.8.
it similar to code above that call *av_dict_set*, so i just copied that 
version checking macros.

>
> +av_dict_set
> +#else
> +av_metadata_set2
> +#endif
> +( &oc->metadata, "timecode", vitc, 0 );
> +
> +if ( video_st )
> +#if LIBAVUTIL_VERSION_INT >= ((51<<16)+(8<<8)+0)
> +av_dict_set
> +#else
> +av_metadata_set2
> +#endif
> +( &video_st->metadata, "timecode", vitc, 0 );
> +
>
> I think we should check if ';' is in the string and if so, set the
> drop_frame_timecode flag.
i will, but i do not understand which part of mltframework will use it...


-- 
________________________________________
Maksym Veremeyenko

------------------------------------------------------------------------------
Slashdot TV.  Video for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to