Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (54)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (10397)

  • how to call avconv via shell_ exec in php ?

    8 janvier 2018, par Blurry Script

    when I call a command to convert video from console linux its all working, but when I call the same command from shell_exec in php, it gives no errors it returns nothing.

    even tough I added sudo 2>&1 to redirect the output, for example this command :

    $res = shell_exec("avconv -i film.mkv 2>&1");
    echo $res //nothing
    exit;
  • ffmpeg error while using opencv rppg program

    2 janvier 2018, par Archer

    How to fix this error while compiling using FFmpeg ?

           FFmpegDecoder.cpp: In member function 'virtual AVFrame* FFmpegDecoder::GetNextFrame()':
       FFmpegDecoder.cpp:89:17: warning: 'int avcodec_decode_video2(AVCodecContext*, AVFrame*, int*, const AVPacket*)' is deprecated [-Wdeprecated-declarations]
                        avcodec_decode_video2(pVideoCodecCtx, pVideoYuv, &frameFinished, &packet);
                        ^~~~~~~~~~~~~~~~~~~~~
       In file included from FFmpegDecoder.hpp:16:0,
                        from FFmpegDecoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavcodec/avcodec.h:4664:5: note: declared here
        int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
            ^~~~~~~~~~~~~~~~~~~~~
       FFmpegDecoder.cpp:89:89: warning: 'int avcodec_decode_video2(AVCodecContext*, AVFrame*, int*, const AVPacket*)' is deprecated [-Wdeprecated-declarations]
                        avcodec_decode_video2(pVideoCodecCtx, pVideoYuv, &frameFinished, &packet);
                                                                                                ^
       In file included from FFmpegDecoder.hpp:16:0,
                        from FFmpegDecoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavcodec/avcodec.h:4664:5: note: declared here
        int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
            ^~~~~~~~~~~~~~~~~~~~~
       FFmpegDecoder.cpp:92:27: warning: 'int64_t av_frame_get_best_effort_timestamp(const AVFrame*)' is deprecated [-Wdeprecated-declarations]
                            pts = av_frame_get_best_effort_timestamp(pVideoYuv);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       In file included from C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavcodec/avcodec.h:38:0,
                        from FFmpegDecoder.hpp:16,
                        from FFmpegDecoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavutil/frame.h:587:9: note: declared here
        int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       FFmpegDecoder.cpp:92:71: warning: 'int64_t av_frame_get_best_effort_timestamp(const AVFrame*)' is deprecated [-Wdeprecated-declarations]
                            pts = av_frame_get_best_effort_timestamp(pVideoYuv);
                                                                              ^
       In file included from C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavcodec/avcodec.h:38:0,
                        from FFmpegDecoder.hpp:16,
                        from FFmpegDecoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavutil/frame.h:587:9: note: declared here
        int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       FFmpegDecoder.cpp:100:21: warning: 'void av_frame_set_best_effort_timestamp(AVFrame*, int64_t)' is deprecated [-Wdeprecated-declarations]
                            av_frame_set_best_effort_timestamp(res, pts);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       In file included from C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavcodec/avcodec.h:38:0,
                        from FFmpegDecoder.hpp:16,
                        from FFmpegDecoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavutil/frame.h:589:9: note: declared here
        void    av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       FFmpegDecoder.cpp:100:64: warning: 'void av_frame_set_best_effort_timestamp(AVFrame*, int64_t)' is deprecated [-Wdeprecated-declarations]
                            av_frame_set_best_effort_timestamp(res, pts);
                                                                       ^
       In file included from C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavcodec/avcodec.h:38:0,
                        from FFmpegDecoder.hpp:16,
                        from FFmpegDecoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavutil/frame.h:589:9: note: declared here
        void    av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val);
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       FFmpegDecoder.cpp:104:17: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
                        av_free_packet(&packet);
                        ^~~~~~~~~~~~~~
       In file included from FFmpegDecoder.hpp:16:0,
                        from FFmpegDecoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavcodec/avcodec.h:4336:6: note: declared here
        void av_free_packet(AVPacket *pkt);
             ^~~~~~~~~~~~~~
       FFmpegDecoder.cpp:104:39: warning: 'void av_free_packet(AVPacket*)' is deprecated [-Wdeprecated-declarations]
      ^~~~~~~~~~~~~~~~~~
       FFmpegDecoder.cpp:124:9: warning: 'int avpicture_fill(AVPicture*, const uint8_t*, AVPixelFormat, int, int)' is deprecated [-Wdeprecated-declarations]
                avpicture_fill((AVPicture*)frame, buffer, AV_PIX_FMT_BGR24, width, height);
                ^~~~~~~~~~~~~~
       In file included from FFmpegDecoder.hpp:16:0,
                        from FFmpegDecoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavcodec/avcodec.h:5315:5: note: declared here
        int avpicture_fill(AVPicture *picture, const uint8_t *ptr,
            ^~~~~~~~~~~~~~
       FFmpegDecoder.cpp:124:82: warning: 'int avpicture_fill(AVPicture*, const uint8_t*, AVPixelFormat, int, int)' is deprecated [-Wdeprecated-declarations]
                avpicture_fill((AVPicture*)frame, buffer, AV_PIX_FMT_BGR24, width, height);
                                                                                         ^
       In file included from FFmpegDecoder.hpp:16:0,
                        from FFmpegDecoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavcodec/avcodec.h:5315:5: note: declared here
        int avpicture_fill(AVPicture *picture, const uint8_t *ptr,
            ^~~~~~~~~~~~~~
       FFmpegDecoder.cpp: In member function 'bool FFmpegDecoder::OpenVideo()':
       FFmpegDecoder.cpp:147:41: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
                    if (pFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
                                                ^~~~~
       In file included from FFmpegDecoder.hpp:17:0,
                        from FFmpegDecoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegDecoder.cpp:147:41: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
                    if (pFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
                                                ^~~~~
       In file included from FFmpegDecoder.hpp:17:0,
                        from FFmpegDecoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegDecoder.cpp:147:41: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
                    if (pFormatCtx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
                                                ^~~~~
       In file included from FFmpegDecoder.hpp:17:0,
                        from FFmpegDecoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegDecoder.cpp:152:58: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
                        pVideoCodecCtx = pFormatCtx->streams[i]->codec;
                                                                 ^~~~~
       In file included from FFmpegDecoder.hpp:17:0,
                        from FFmpegDecoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegDecoder.cpp:152:58: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
                        pVideoCodecCtx = pFormatCtx->streams[i]->codec;
                                                                 ^~~~~
       In file included from FFmpegDecoder.hpp:17:0,
                        from FFmpegDecoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegDecoder.cpp:152:58: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
                        pVideoCodecCtx = pFormatCtx->streams[i]->codec;
                                                                 ^~~~~
       In file included from FFmpegDecoder.hpp:17:0,
                        from FFmpegDecoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegDecoder.cpp: In member function 'bool FFmpegDecoder::DecodeVideo(const AVPacket*, AVFrame*)':
       FFmpegDecoder.cpp:190:35: warning: 'int avcodec_decode_video2(AVCodecContext*, AVFrame*, int*, const AVPacket*)' is deprecated [-Wdeprecated-declarations]
                    int videoFrameBytes = avcodec_decode_video2(pVideoCodecCtx, pOutFrame, &got_picture_ptr, avpkt);
                                          ^~~~~~~~~~~~~~~~~~~~~
       In file included from FFmpegDecoder.hpp:16:0,
                        from FFmpegDecoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavcodec/avcodec.h:4664:5: note: declared here
        int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
            ^~~~~~~~~~~~~~~~~~~~~
       FFmpegDecoder.cpp:190:107: warning: 'int avcodec_decode_video2(AVCodecContext*, AVFrame*, int*, const AVPacket*)' is deprecated [-Wdeprecated-declarations]
                    int videoFrameBytes = avcodec_decode_video2(pVideoCodecCtx, pOutFrame, &got_picture_ptr, avpkt);
                                                                                                                  ^
       In file included from FFmpegDecoder.hpp:16:0,
                        from FFmpegDecoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavcodec/avcodec.h:4664:5: note: declared here
        int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
            ^~~~~~~~~~~~~~~~~~~~~
       FFmpegEncoder.cpp: In member function 'bool FFmpegEncoder::OpenFile(const char*, int, int, int, int)':
       FFmpegEncoder.cpp:57:17: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
                c = st->codec;
                        ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:57:17: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
                c = st->codec;
                        ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:57:17: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
                c = st->codec;
                        ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:76:33: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
                AVCodecContext *c = st->codec;
                                        ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:76:33: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
                AVCodecContext *c = st->codec;
                                        ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:76:33: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
                AVCodecContext *c = st->codec;
                                        ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp: In member function 'void FFmpegEncoder::CloseFile()':
       FFmpegEncoder.cpp:123:23: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
            avcodec_close(st->codec);
                              ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:123:23: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
            avcodec_close(st->codec);
                              ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:123:23: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
            avcodec_close(st->codec);
                              ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:124:31: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
            avcodec_free_context(&st->codec);
                                      ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:124:31: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
            avcodec_free_context(&st->codec);
                                      ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:124:31: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
            avcodec_free_context(&st->codec);
                                      ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:128:35: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
                av_freep(&oc->streams[i]->codec);
                                          ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:128:35: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
                av_freep(&oc->streams[i]->codec);
                                          ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:128:35: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
                av_freep(&oc->streams[i]->codec);
                                          ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp: In member function 'void FFmpegEncoder::WriteFrame(AVFrame*, int64_t)':
       FFmpegEncoder.cpp:146:29: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
            AVCodecContext *c = st->codec;
                                    ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:146:29: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
            AVCodecContext *c = st->codec;
                                    ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:146:29: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
            AVCodecContext *c = st->codec;
                                    ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:157:25: warning: 'int avpicture_get_size(AVPixelFormat, int, int)' is deprecated [-Wdeprecated-declarations]
            int bufferImgSize = avpicture_get_size(c->pix_fmt, c->width, c->height);
                                ^~~~~~~~~~~~~~~~~~
       In file included from FFmpegEncoder.hpp:17:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavcodec/avcodec.h:5330:5: note: declared here
        int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height);
            ^~~~~~~~~~~~~~~~~~
       FFmpegEncoder.cpp:157:75: warning: 'int avpicture_get_size(AVPixelFormat, int, int)' is deprecated [-Wdeprecated-declarations]
            int bufferImgSize = avpicture_get_size(c->pix_fmt, c->width, c->height);
                                                                                  ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:210:29: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
            AVCodecContext *c = st->codec;
                                    ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:210:29: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
            AVCodecContext *c = st->codec;
                                    ^~~~~
       In file included from FFmpegEncoder.hpp:18:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavformat/avformat.h:876:21: note: declared here
            AVCodecContext *codec;
                            ^~~~~
       FFmpegEncoder.cpp:217:15: warning: 'int avcodec_encode_video2(AVCodecContext*, AVPacket*, const AVFrame*, int*)' is deprecated [-Wdeprecated-declarations]
                ret = avcodec_encode_video2(c, &pkt, NULL, &got_output);
                      ^~~~~~~~~~~~~~~~~~~~~
       In file included from FFmpegEncoder.hpp:17:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavcodec/avcodec.h:5282:5: note: declared here
        int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
            ^~~~~~~~~~~~~~~~~~~~~
       FFmpegEncoder.cpp:217:63: warning: 'int avcodec_encode_video2(AVCodecContext*, AVPacket*, const AVFrame*, int*)' is deprecated [-Wdeprecated-declarations]
                ret = avcodec_encode_video2(c, &pkt, NULL, &got_output);
                                                                      ^
       In file included from FFmpegEncoder.hpp:17:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavcodec/avcodec.h:5282:5: note: declared here
        int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
            ^~~~~~~~~~~~~~~~~~~~~
       FFmpegEncoder.cpp:227:20: warning: 'AVCodecContext::coded_frame' is deprecated [-Wdeprecated-declarations]
                    if (c->coded_frame->key_frame)
                           ^~~~~~~~~~~
       In file included from FFmpegEncoder.hpp:17:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavcodec/avcodec.h:2744:35: note: declared here
            attribute_deprecated AVFrame *coded_frame;
                                          ^~~~~~~~~~~
       FFmpegEncoder.cpp:227:20: warning: 'AVCodecContext::coded_frame' is deprecated [-Wdeprecated-declarations]
                    if (c->coded_frame->key_frame)
                           ^~~~~~~~~~~
       In file included from FFmpegEncoder.hpp:17:0,
                        from FFmpegEncoder.cpp:9:
       C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavcodec/avcodec.h:2744:35: note: declared here
            attribute_deprecated AVFrame *coded_frame;
                                          ^~~~~~~~~~~
       FFmpegEncoder.cpp:227:20: warning: 'AVCodecContext::coded_frame' is deprecated [-Wdeprecated-declarations]
                    if (c->coded_frame->key_frame)
                           **^~~~~~~~~~~
       In file included from FFmpegEncoder.hpp:17:0,
                        from FFmpegEncoder.cpp:9:
           C:\Users\Anon\Desktop\ffmpeg-20171225-613f789-win32-shared\include/libavcodec/avcodec.h:2744:35: note: declared here
                attribute_deprecated AVFrame *coded_frame;
                                              ^~~~~~~~~~~
           /usr/lib/gcc/i686-pc-cygwin/6.4.0/../../../../i686-pc-cygwin/bin/ld: cannot find -lmingw32-libarchive
           /usr/lib/gcc/i686-pc-cygwin/6.4.0/../../../../i686-pc-cygwin/bin/ld: cannot find -lSDLMain
           collect2: error: ld returned 1 exit status**

    I have the developers version of ffmpeg lib and include files in with my shared ffmpeg file. How do I get it to work ?

    I have included -lmingw32-libarchive and -lsdlmain to avoid winmain16 error, should I do something else ? How to avoid deprecated error ?

  • Concatenating video using FFMPEG wrapper class [duplicate]

    21 décembre 2017, par alan samuel

    I am trying to concatenate video using NReco.VideoConverter wrapper class made for FFMPEG.

    I have three video files with the same frame rate and same frame size.

    Here is what I have done.

           string toconcatfile = @"C:\Users\Alan\Desktop\Black.mp4";
           string output1 = @"C:\Users\Alan\Desktop\output1.mp4";
           string output2 = @"C:\Users\Alan\Desktop\output2.mp4";
           string finaloutput = @"C:\Users\Alan\Desktop\finaloutput.mp4";

    All the three videos have a frame rate of 25 and Video frame size yet it fails when I add in toconcatfile to the final conversion method.

    It works when its just output1 and output2 meaning there must be a different setting in toconcatfile.

    Here is what I have tried.

           FFMpegConverter fFMpeg = new FFMpegConverter();


           //Slices first video
           ConvertSettings settings = new ConvertSettings
           {
               VideoFrameRate = 25,
               VideoFrameSize = FrameSize.hd480,
               MaxDuration = startcut,
               AudioSampleRate = 44100

           };

           //Slices second video
           ConvertSettings settings2 = new ConvertSettings
           {
               VideoFrameRate = 25,
               VideoFrameSize = FrameSize.hd480,
               Seek = endcut,
               AudioSampleRate = 44100

           };
           //Copies framerate and size from the previous video to the concatenation video
           ConvertSettings settings3 = new ConvertSettings
           {
               VideoFrameRate = 25,
               VideoFrameSize = FrameSize.hd480,
               MaxDuration = 4,
               AppendSilentAudioStream = true,
               AudioSampleRate = 44100

           };


     string newblack = @"C:\Users\Alan\Desktop\newblack.mp4";

           //Slice method called
           fFMpeg.ConvertMedia(pathtofile, Format.mp4, output1, Format.mp4, settings);
           fFMpeg.ConvertMedia(pathtofile, Format.mp4, output2, Format.mp4, settings2);
           fFMpeg.ConvertMedia(toconcatfile, Format.mp4, newblack, Format.mp4, settings3);

           String[] inputfiles = new String[2];
           inputfiles[0] = output1;
           inputfiles[1] = newblack;
           //inputfiles[1] = output2;


           ConcatSettings concatSettings = new ConcatSettings
           {
               //CustomOutputArgs = output1+" "+ toconcatfile+ " "+output2+ " -filter_complex \"[0:v:0][0:a:0][1:v:0][1:a:0][2:v:0][2:a:0]concat=n=3:v=1:a=1[outv][outa]\" -map \"[outv]\" - map \"[outa]\""
           };

           fFMpeg.ConcatMedia(inputfiles, finaloutput, Format.mp4, concatSettings);

    Can anyone help ?

    Edit : I get the exception message - "Invalid argument (exit code : 1)",

    Here is the output log of FFMPEG

           FFMPEG LOG ITEM - ffmpeg version 3.2.2 Copyright (c) 2000-2016 the
               FFmpeg developers
    FFMPEG LOG ITEM -   built with gcc 5.4.0 (GCC)
    FFMPEG LOG ITEM -   configuration: --enable-gpl --enable-version3 --enable-

    dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --

    enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
    FFMPEG LOG ITEM -   libavutil      55. 34.100 / 55. 34.100
    FFMPEG LOG ITEM -   libavcodec     57. 64.101 / 57. 64.101
    FFMPEG LOG ITEM -   libavformat    57. 56.100 / 57. 56.100
    FFMPEG LOG ITEM -   libavdevice    57.  1.100 / 57.  1.100
    FFMPEG LOG ITEM -   libavfilter     6. 65.100 /  6. 65.100
    FFMPEG LOG ITEM -   libswscale      4.  2.100 /  4.  2.100
    FFMPEG LOG ITEM -   libswresample   2.  3.100 /  2.  3.100
    FFMPEG LOG ITEM -   libpostproc    54.  1.100 / 54.  1.100
    FFMPEG LOG ITEM - Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Alan\Desktop\output1.mp4':
    FFMPEG LOG ITEM -   Metadata:
    FFMPEG LOG ITEM -     major_brand     : isom
    FFMPEG LOG ITEM -     minor_version   : 512
    FFMPEG LOG ITEM -     compatible_brands: isomiso2avc1mp41
    FFMPEG LOG ITEM -     encoder         : Lavf57.56.100
    FFMPEG LOG ITEM -   Duration: 00:00:30.02, start: 0.000000, bitrate: 543 kb/s
    FFMPEG LOG ITEM -     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 852x480 [SAR 3893:2872 DAR 276403:114880], 407 kb/s, SAR 12800:9443 DAR 320:133, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    FFMPEG LOG ITEM -     Metadata:
    FFMPEG LOG ITEM -       handler_name    : VideoHandler
    FFMPEG LOG ITEM -     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
    FFMPEG LOG ITEM -     Metadata:
    FFMPEG LOG ITEM -       handler_name    : SoundHandler
    FFMPEG LOG ITEM - Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Alan\Desktop\newblack.mp4':
    FFMPEG LOG ITEM -   Metadata:
    FFMPEG LOG ITEM -     major_brand     : isom
    FFMPEG LOG ITEM -     minor_version   : 512
    FFMPEG LOG ITEM -     compatible_brands: isomiso2avc1mp41
    FFMPEG LOG ITEM -     encoder         : Lavf57.56.100
    FFMPEG LOG ITEM -   Duration: 00:00:04.02, start: 0.000000, bitrate: 19 kb/s
    FFMPEG LOG ITEM -     Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 852x480 [SAR 160:213 DAR 4:3], 7 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    FFMPEG LOG ITEM -     Metadata:
    FFMPEG LOG ITEM -       handler_name    : VideoHandler
    FFMPEG LOG ITEM -     Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
    FFMPEG LOG ITEM -     Metadata:
    FFMPEG LOG ITEM -       handler_name    : SoundHandler
    FFMPEG LOG ITEM - Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Alan\Desktop\output2.mp4':
    FFMPEG LOG ITEM -   Metadata:
    FFMPEG LOG ITEM -     major_brand     : isom
    FFMPEG LOG ITEM -     minor_version   : 512
    FFMPEG LOG ITEM -     compatible_brands: isomiso2avc1mp41
    FFMPEG LOG ITEM -     encoder         : Lavf57.56.100
    FFMPEG LOG ITEM -   Duration: 00:01:34.22, start: 0.000000, bitrate: 1058 kb/s
    FFMPEG LOG ITEM -     Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 852x480 [SAR 3893:2872 DAR 276403:114880], 923 kb/s, SAR 12800:9443 DAR 320:133, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    FFMPEG LOG ITEM -     Metadata:
    Exception thrown: 'NReco.VideoConverter.FFMpegException' in NReco.VideoConverter.dll
    FFMPEG LOG ITEM -       handler_name    : VideoHandler
    FFMPEG LOG ITEM -     Stream #2:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    FFMPEG LOG ITEM -     Metadata:
    FFMPEG LOG ITEM -       handler_name    : SoundHandler
    FFMPEG LOG ITEM - [Parsed_concat_0 @ 04ded5e0] Input link in1:v0 parameters (size 852x480, SAR 160:213) do not match the corresponding output link in0:v0 parameters (852x480, SAR 12800:9443)
    FFMPEG LOG ITEM - [Parsed_concat_0 @ 04ded5e0] Failed to configure output pad on Parsed_concat_0
    FFMPEG LOG ITEM - Error configuring complex filters.
    FFMPEG LOG ITEM - Invalid argument