Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • Is it possibel extract thumbnails and save them on website using youtube video. (by front-end users)

    24 octobre 2013, par Jaewook Koh

    I read blog about print youtube video on "http://www.labnol.org/internet/print-youtube-video/28217/".

    I have a self-hosted video site.

    But video hosting makes too many traffic.

    So I decideed another plan for site.

    It's to generate thumbnails of external video. Is it possible?

    I found making thumbnails using ffmpeg, but there are a lot of videos in external platform(Like Youtube, Vimeo, etc)

    After I saw Amit Agarwal's blog("print youtube video"), I was very impressed.

    Anyway if it is impossible, I should find another way.

    Thanks-

  • How to access Nested structure member variables

    24 octobre 2013, par JAYANTHI

    I have an structure

    typedef struct AVFilter {
    
        const char *name;
        const char *description;
        const AVFilterPad *inputs;
        const AVFilterPad *outputs;
        const AVClass *priv_class;
        int flags;
        int (*init)(AVFilterContext *ctx);
        int (*init_dict)(AVFilterContext *ctx, AVDictionary **options);
        void (*uninit)(AVFilterContext *ctx);
        int (*query_formats)(AVFilterContext *);
        int priv_size;      
        struct AVFilter *next;
        int (*process_command)(AVFilterContext *, const char *cmd, const char *arg, char *res, int res_len, int flags);
        int (*init_opaque)(AVFilterContext *ctx, void *opaque);
    
    } AVFilter;
    

    I dont knw how to access nested structure variables and my code is,

        AVFilter avfilter_vsrc_color = {
        avfilter_vsrc_color.name            = "color",
        avfilter_vsrc_color.description     = NULL_IF_CONFIG_SMALL("Provide an uniformly colored input."),
        avfilter_vsrc_color.priv_class      = &color_class, // error here
        avfilter_vsrc_color.priv_size       = sizeof(TestSourceContext),
        avfilter_vsrc_color.init            = color_init,
        avfilter_vsrc_color.uninit          = uninit,
        avfilter_vsrc_color.query_formats   = color_query_formats,
        avfilter_vsrc_color.inputs          = NULL,
        avfilter_vsrc_color.outputs         = color_outputs,
        avfilter_vsrc_color.process_command = color_process_command
    };
    

    I have compiled the code in vs2010 and I m Getting error like

    c:\users\awki6\desktop\ffmpeg\libavfilter\vsrc_testsrc.cpp(273): error C2440: 'initializing' : cannot convert from 'const AVClass *' to 'const AVFilterPad *'
    2>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    
  • ACCESSING STRUCTURE VARIABLES

    24 octobre 2013, par JAYANTHI

    I have an structure AVFilter,

    AVFilter avfilter_vsrc_color = {  
        .name            = "color",  // error here
        .description     = NULL_IF_CONFIG_SMALL("Provide an uniformly colored input."),  
        .priv_class      = &color_class,  
        .priv_size       = sizeof(TestSourceContext),  
        .init            = color_init,  
        .uninit          = uninit,  
        .query_formats   = color_query_formats,  
        .inputs          = NULL,  
        .outputs         = color_outputs,  
        .process_command = color_process_command,  
    };
    

    and AVFilter is defined as,

    typedef struct AVFilter {
    
        const char *name;
        const char *description;
        const AVFilterPad *inputs;
        const AVFilterPad *outputs;
        const AVClass *priv_class;
        int flags;
        int (*init)(AVFilterContext *ctx);
        int (*init_dict)(AVFilterContext *ctx, AVDictionary **options);
        void (*uninit)(AVFilterContext *ctx);
        int (*query_formats)(AVFilterContext *);
        int priv_size;      ///< size of private data to allocate for the filter
        struct AVFilter *next;
        int (*process_command)(AVFilterContext *, const char *cmd, const char *arg, char *res, int res_len, int flags);
        int (*init_opaque)(AVFilterContext *ctx, void *opaque);
    
    } AVFilter;
    

    I m getting error like ,

    2>c:\users\awki6\desktop\ffmpeg\libavfilter\vsrc_testsrc.cpp(268): error C2143: syntax error : missing '}' before '.'  
    2>c:\users\awki6\desktop\ffmpeg\libavfilter\vsrc_testsrc.cpp(268): error C2143: syntax error : missing ';' before '.'  
    2>c:\users\awki6\desktop\ffmpeg\libavfilter\vsrc_testsrc.cpp(268): error C2059: syntax error : '.'
    
  • Syntax error : missing '{ ' before '.'

    24 octobre 2013, par JAYANTHI

    I have an AVOption structure:

    static const AVOption options[] = {  
            COMMON_OPTIONS  // error here
            { NULL }  
        };
    

    and COMMON_OPTIONS is defined as:

    #define COMMON_OPTIONS \
    { "interp", "select interpolation mode", OFFSET(interpolation), AV_OPT_TYPE_INT, {.i64=INTERPOLATE_TETRAHEDRAL}, 0, NB_INTERP_MODE-1, FLAGS, "interp_mode" }, \
    {NULL}
    

    I am getting an error:

    2>c:\users\awki6\desktop\ffmpeg\libavfilter\vsrc_testsrc.cpp(98): error C2143: syntax error : missing '}' before '.'
    
  • Missing ; before return

    24 octobre 2013, par JAYANTHI

    This is my piece of code, I'm compiling in VS2010:

    static inline int ff_insert_inpad(AVFilterContext *f, unsigned index, AVFilterPad *p)  
        {  
            int ret = ff_insert_pad(index, &f->nb_inputs, offsetof(AVFilterLink, dstpad), &f->input_pads, &f->inputs, p); 
    
        #if FF_API_FOO_COUNT
        FF_DISABLE_DEPRECATION_WARNINGS  
            f->input_count = f->nb_inputs;  
        FF_ENABLE_DEPRECATION_WARNINGS        
        #endif
    
            return ret; // error here
    
    
        }
    

    I'm getting errors like:

    2>c:\users\awki6\desktop\ffmpeg\libavfilter\internal.h(271): error C2143: syntax error : missing ';' before 'return'