Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (70)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (7216)

  • Screen Capture with FFMPEG and Google Native Client

    18 juillet 2016, par Mohammad Abu Musa

    I am building a screen recorder that is based on Native Client for Google, I have ffmpeg installed and ready but I do not have experience programming in ffmpeg. so I am looking for tips to understand how to build this recorder.

    My goal is to make a screen recorder and export videos as webm files, I have all the required libraries I just could not find any code examples to hack on

    This is what I achieved so far

    #define __STDC_LIMIT_MACROS

    #include
    #include <iostream>
    #include
    #include
    #include <sstream>
    #include
    #include <vector>

    #include "ppapi/cpp/instance.h"
    #include "ppapi/cpp/var_dictionary.h"
    #include "ppapi/c/pp_errors.h"
    #include "ppapi/c/ppb_console.h"
    #include "ppapi/cpp/input_event.h"
    #include "ppapi/cpp/module.h"
    #include "ppapi/cpp/rect.h"
    #include "ppapi/cpp/var.h"
    #include "ppapi/cpp/var_array_buffer.h"

    // Begin File IO headers
    #include "ppapi/c/pp_stdint.h"
    #include "ppapi/c/ppb_file_io.h"
    #include "ppapi/cpp/directory_entry.h"
    #include "ppapi/cpp/file_io.h"
    #include "ppapi/cpp/file_ref.h"
    #include "ppapi/cpp/file_system.h"
    #include "ppapi/cpp/instance.h"
    #include "ppapi/cpp/message_loop.h"
    #include "ppapi/cpp/module.h"
    #include "ppapi/cpp/var.h"
    #include "ppapi/cpp/var_array.h"
    #include "ppapi/utility/completion_callback_factory.h"
    #include "ppapi/utility/threading/simple_thread.h"

    #ifndef INT32_MAX
    #define INT32_MAX (0x7FFFFFFF)
    #endif

    #ifdef WIN32
    #undef min
    #undef max
    #undef PostMessage

    // Allow 'this' in initializer list
    #pragma warning(disable : 4355)
    #endif

    namespace {
    typedef std::vector StringVector;
    }
    //End File IO headers

    extern "C" {
    #include <libavcodec></libavcodec>avcodec.h>
    #include <libswscale></libswscale>swscale.h>
    #include <libavformat></libavformat>avformat.h>
    #include <libavutil></libavutil>imgutils.h>
    }

    const char* file_name = "/file.txt";
    const char* video_name = "/video.mpeg";
    const char* file_text = "Echo from NaCl: ";

    /**
    * Pixel formats and codecs
    */
    static const AVPixelFormat sourcePixelFormat = AV_PIX_FMT_BGR24;
    static const AVPixelFormat destPixelFormat = AV_PIX_FMT_YUV420P;
    static const AVCodecID destCodec = AV_CODEC_ID_MPEG2VIDEO;

    class RecorderInstance: public pp::Instance {
    public:
       explicit RecorderInstance(PP_Instance instance) :
               pp::Instance(instance), callback_factory_(this), file_system_(this,
                       PP_FILESYSTEMTYPE_LOCALPERSISTENT), file_system_ready_(
                       false), file_thread_(this) {
       }

       virtual ~RecorderInstance() {
           file_thread_.Join();
       }

       virtual bool Init(uint32_t /*argc*/, const char * /*argn*/[],
               const char * /*argv*/[]) {
           file_thread_.Start();
           file_thread_.message_loop().PostWork(
                   callback_factory_.NewCallback(
                           &amp;RecorderInstance::OpenFileSystem));
           avcodec_register_all(); // mandatory to register ffmpeg functions

           return true;
       }

    private:
       pp::CompletionCallbackFactory<recorderinstance> callback_factory_;
       pp::FileSystem file_system_;

       // Indicates whether file_system_ was opened successfully. We only read/write
       // this on the file_thread_.
       bool file_system_ready_;
       pp::SimpleThread file_thread_;

       virtual void HandleMessage(const pp::Var&amp; var_message) {
           if (!var_message.is_dictionary()) {
               LogToConsole(PP_LOGLEVEL_ERROR, pp::Var("Invalid message!"));
               return;
           }

           pp::VarDictionary dict_message(var_message);
           std::string command = dict_message.Get("message").AsString();


           if (command == "sendFrame") {
               pp::VarArrayBuffer data(dict_message.Get("data"));
               uint width = 600;
               uint height = 800;
               uint8_t endcode[] = { 0, 0, 1, 0xb7 };
               /**
                * Create an encoder and open it
                */
               avcodec_register_all();

               AVCodec *h264encoder = avcodec_find_encoder(destCodec);
               AVCodecContext *h264encoderContext = avcodec_alloc_context3(
                       h264encoder);

               h264encoderContext->pix_fmt = destPixelFormat;
               h264encoderContext->width = width;
               h264encoderContext->height = height;

               if (avcodec_open2(h264encoderContext, h264encoder, NULL) &lt; 0) {
                   ShowErrorMessage("Cannot open codec" ,-1);
                   return;
               }

               /**
                * Create a stream
                */
               AVFormatContext *cv2avFormatContext = avformat_alloc_context();
               AVStream *h264outputstream = avformat_new_stream(cv2avFormatContext,
                       h264encoder);

               AVFrame *sourceAvFrame = av_frame_alloc(), *destAvFrame =
                       av_frame_alloc();
               int got_frame;

               FILE* videoOutFile = fopen("video", "wb");
               /**
                * Prepare the conversion context
                */
               SwsContext *bgr2yuvcontext = sws_getContext(width, height,
                       sourcePixelFormat, width, height, destPixelFormat,
                       SWS_BICUBIC, NULL, NULL, NULL);

               int framesToEncode = 100;
               /**
                * Convert and encode frames
                */
               for (uint i = 0; i &lt; framesToEncode; i++) {

                   /**
                    * Allocate source frame, i.e. input to sws_scale()
                    */
                   av_image_alloc(sourceAvFrame->data, sourceAvFrame->linesize,
                           width, height, sourcePixelFormat, 1);

                   /**
                    * Copy image data into AVFrame from cv::Mat
                    */
                   for (uint32_t h = 0; h &lt; height; h++)
                       memcpy(
                               &amp;(sourceAvFrame->data[0][h
                                       * sourceAvFrame->linesize[0]]),
                               &amp;(data), width * 3);

                   /**
                    * Allocate destination frame, i.e. output from sws_scale()
                    */
                   av_image_alloc(destAvFrame->data, destAvFrame->linesize, width,
                           height, destPixelFormat, 1);

                   sws_scale(bgr2yuvcontext, sourceAvFrame->data,
                           sourceAvFrame->linesize, 0, height, destAvFrame->data,
                           destAvFrame->linesize);
                   sws_freeContext(bgr2yuvcontext);
                   /**
                    * Prepare an AVPacket and set buffer to NULL so that it'll be allocated by FFmpeg
                    */
                   AVPacket avEncodedPacket;
                   av_init_packet(&amp;avEncodedPacket);
                   avEncodedPacket.data = NULL;
                   avEncodedPacket.size = 0;

                   destAvFrame->pts = i;
                   avcodec_encode_video2(h264encoderContext, &amp;avEncodedPacket,
                           destAvFrame, &amp;got_frame);

                   if (got_frame) {
                       ShowErrorMessage(
                               "Encoded a frame of size \n",-1); //+ (string)avEncodedPacket.size + "\n");

                       if (fwrite(avEncodedPacket.data, 1, avEncodedPacket.size,
                               videoOutFile) &lt; (unsigned) avEncodedPacket.size)
                           ShowErrorMessage(
                                   "Could not write all \n",-1);
                                   //+ avEncodedPacket.size
                                           //+ " bytes, but will continue..\n"


                       fflush(videoOutFile);

                   }
                   /**
                    * Per-frame cleanup
                    */
                   av_packet_free_side_data(&amp;avEncodedPacket);
                   av_free_packet(&amp;avEncodedPacket);
                   av_freep(sourceAvFrame->data);
                   av_frame_free(&amp;sourceAvFrame);
                   av_freep(destAvFrame->data);
                   av_frame_free(&amp;destAvFrame);

               }

               fwrite(endcode, 1, sizeof(endcode), videoOutFile);
               fclose(videoOutFile);

               /**
                * Final cleanup
                */
               avformat_free_context(cv2avFormatContext);
               avcodec_close(h264encoderContext);
               avcodec_free_context(&amp;h264encoderContext);

           } else if (command == "createFile") {
               file_thread_.message_loop().PostWork(
                       callback_factory_.NewCallback(&amp;RecorderInstance::Save,
                               file_name, file_text));
           }
       }


       void OpenFileSystem(int32_t /* result */) {
           int32_t rv = file_system_.Open(1024 * 1024, pp::BlockUntilComplete());
           if (rv == PP_OK) {
               file_system_ready_ = true;
               // Notify the user interface that we're ready
               ShowStatusMessage("STORAGE READY");
           } else {
               ShowErrorMessage("Failed to open file system", rv);
           }
       }

       void Save(int32_t /* result */, const std::string&amp; file_name,
               const std::string&amp; file_contents) {
           if (!file_system_ready_) {
               ShowErrorMessage("File system is not open", PP_ERROR_FAILED);
               return;
           }
           pp::FileRef ref(file_system_, file_name.c_str());
           pp::FileIO file(this);

           int32_t open_result = file.Open(ref,
                   PP_FILEOPENFLAG_WRITE | PP_FILEOPENFLAG_CREATE
                           | PP_FILEOPENFLAG_TRUNCATE, pp::BlockUntilComplete());
           if (open_result != PP_OK) {
               ShowErrorMessage("File open for write failed", open_result);
               return;
           }

           // We have truncated the file to 0 bytes. So we need only write if
           // file_contents is non-empty.
           if (!file_contents.empty()) {
               if (file_contents.length() > INT32_MAX) {
                   ShowErrorMessage("File too big", PP_ERROR_FILETOOBIG);
                   return;
               }
               int64_t offset = 0;
               int32_t bytes_written = 0;
               do {
                   bytes_written = file.Write(offset,
                           file_contents.data() + offset, file_contents.length(),
                           pp::BlockUntilComplete());
                   if (bytes_written > 0) {
                       offset += bytes_written;
                   } else {
                       ShowErrorMessage("File write failed", bytes_written);
                       return;
                   }
               } while (bytes_written
                       &lt; static_cast(file_contents.length()));
           }
           // All bytes have been written, flush the write buffer to complete
           int32_t flush_result = file.Flush(pp::BlockUntilComplete());
           if (flush_result != PP_OK) {
               ShowErrorMessage("File fail to flush", flush_result);
               return;
           }
           ShowStatusMessage("Save success");
       }

       /// Encapsulates our simple javascript communication protocol
       void ShowErrorMessage(const std::string&amp; message, int32_t result) {
           std::stringstream ss;
           ss &lt;&lt; "ERROR: " &lt;&lt; message &lt;&lt; " -- Error #: " &lt;&lt; result &lt;&lt; "\n";
           PostMessage(ss.str());
       }

       void ShowStatusMessage(const std::string&amp; message) {
           std::stringstream ss;
           ss &lt;&lt; "LOG: " &lt;&lt; message &lt;&lt; "\n";
           PostMessage(ss.str());
       }

    };

    class RecorderModule: public pp::Module {
    public:
       RecorderModule() :
               pp::Module() {
       }

       virtual ~RecorderModule() {
       }

       virtual pp::Instance* CreateInstance(PP_Instance instance) {
           return new RecorderInstance(instance);
       }
    };

    namespace pp {

    /**
    * This function is an entry point to a NaCl application.
    * It must be implemented.
    */
    Module* CreateModule() {
       return new RecorderModule();
    }

    }  // namespace pp
    </recorderinstance></vector></sstream></iostream>
  • How to get rtp(javacv ffmpeg) stream from VLC as client

    15 avril 2015, par Sezertt

    I am trying to play rtp stream from vlc player which I created using javacv. Here is the code :

           FFmpegFrameGrabber frameGrabber = new FFmpegFrameGrabber("rtsp://10.6.0.147:554/ufirststream");
           frameGrabber.start();  // First I take another stream

           FFmpegFrameRecorder frameRecorder = new FFmpegFrameRecorder("rtp://239.31.31.69:4433", frameGrabber.getImageWidth(), frameGrabber.getImageHeight());

           frameRecorder.setFormat("rtp");
           frameRecorder.setPixelFormat(AV_PIX_FMT_YUV420P);
           frameRecorder.setVideoCodec(AV_CODEC_ID_MPEG2VIDEO); &lt;-- AV_CODEC_ID_H264
           frameRecorder.setFrameRate(25);          
           frameRecorder.setVideoBitrate(1024); &lt;--1024*1024*2            
           frameRecorder.start();
           while (true) {
               frameRecorder.record(frameGrabber.grab()); //grab from stream, stream with rtp
           }

    If I choose my codec as AV_CODEC_ID_MPEG2VIDEO I can play the stream from VLC using rtp ://239.31.31.69:4433 with open network.

    If I increase the quality using setVideoBitrate(1024*1024*2) the stream lags too much and if I decrease the quality is so bad.

    I want to use AV_CODEC_ID_H264 as my codec to fasten things with better quality but i can’t play the stream from VLC getting error :

    SDP required A description in SDP format is required to receive the RTP stream. Note that rtp :// URIs cannot work with dynamic RTP payload format (96).

    I tried to get sdp using wireshark and then I realized rtp stream doesn’t have sdp :) so I tried to create my own sdp like this

    c=IN IP4 239.31.31.69
    m=video 4433 RTP/AVP 96
    a=rtpmap:96 H264/90000

    and this

    v=0
    c=IN IP4 239.31.31.69
    a=recvonly
    t=0 0
    m=video 4433 RTP/AVP 99
    a=rtpmap:99 H264/90000
    a=fmtp:99 packetization-mode=1;profile-level-id=42c01e;sprop-parameter sets=Z0LAHukBQHsg,aM4G4g==;

    but both seems to fail similar to this

    > core debug: adding item `asf.sdp' ( file:///C:/Users/Sezer/Desktop/asf.sdp )
    core debug: processing request item: asf.sdp, node: null, skip: 0
    core debug: rebuilding array of current - root Playlist
    core debug: rebuild done - 7 items, index 6
    core debug: starting playback of the new playlist item
    core debug: resyncing on asf.sdp
    core debug: asf.sdp is at 6
    core debug: creating new input thread
    core debug: Creating an input for 'asf.sdp'
    core debug: Creating an input for 'asf.sdp'
    core debug: requesting art for asf.sdp
    core debug: using timeshift granularity of 50 MiB, in path 'C:\Users\Sezer\AppData\Local\Temp'
    core debug: `file:///C:/Users/Sezer/Desktop/asf.sdp' gives access `file' demux `' path `/C:/Users/Sezer/Desktop/asf.sdp'
    core debug: specified demux `any'
    core debug: creating demux: access='file' demux='any' location='/C:/Users/Sezer/Desktop/asf.sdp' file='C:\Users\Sezer\Desktop\asf.sdp'
    core debug: looking for access_demux module matching "file": 12 candidates
    core debug: looking for meta fetcher module matching "any": 1 candidates
    core debug: no access_demux modules matched
    core debug: creating access 'file' location='/C:/Users/Sezer/Desktop/asf.sdp', path='C:\Users\Sezer\Desktop\asf.sdp'
    core debug: looking for access module matching "file": 21 candidates
    filesystem debug: opening file `C:\Users\Sezer\Desktop\asf.sdp'
    lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\fetcher
    core debug: using access module "filesystem"
    core debug: Using stream method for AStream*
    lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
    core debug: starting pre-buffering
    core debug: received first data after 0 ms
    core debug: pre-buffering done 193 bytes in 0s - 188476 KiB/s
    core debug: looking for stream_filter module matching "any": 6 candidates
    core debug: no stream_filter modules matched
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
    core debug: looking for stream_filter module matching "record": 6 candidates
    core debug: using stream_filter module "record"
    core debug: creating demux: access='file' demux='any' location='/C:/Users/Sezer/Desktop/asf.sdp' file='C:\Users\Sezer\Desktop\asf.sdp'
    core debug: looking for demux module matching "any": 65 candidates
    live555 debug: version 2014.07.25
    live555 debug: RTP subsession 'video/H264'
    core debug: selecting program id=0
    core debug: adding item `file.sdp' ( file:///C:/Users/Sezer/Desktop/file.sdp )
    live555 debug: setup start: 0.000000 stop:0.000000
    live555 debug: play start: 0.000000 stop:0.000000
    core debug: using demux module "live555"
    lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
    core debug: no meta fetcher modules matched
    core debug: looking for a subtitle file in C:\Users\Sezer\Desktop\
    core debug: searching art for asf.sdp
    core debug: looking for art finder module matching "any": 2 candidates
    core debug: looking for decoder module matching "any": 43 candidates
    avcodec debug: CPU flags: 0x010053db
    lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\art
    lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
    avcodec debug: trying to use direct rendering
    avcodec debug: allowing 4 thread(s) for decoding
    avcodec warning: threaded frame decoding is not compatible with DXVA2, disabled
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
    core debug: meta ok for (null), need to fetch art
    core debug: Creating an input for 'file.sdp'
    avcodec debug: avcodec codec (H264 - MPEG-4 AVC (part 10)) started
    avcodec debug: using slice thread mode with 4 threads
    core debug: using decoder module "avcodec"
    core debug: looking for meta fetcher module matching "any": 1 candidates
    core debug: looking for packetizer module matching "any": 23 candidates
    core debug: using packetizer module "packetizer_h264"
    lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
    lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\fetcher
    lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
    core debug: looking for meta reader module matching "any": 2 candidates
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
    lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\reader
    lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\reader
    lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\reader\filename.luac
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
    lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
    core debug: no meta fetcher modules matched
    core debug: searching art for asf.sdp
    core debug: looking for art finder module matching "any": 2 candidates
    core debug: no meta reader modules matched
    lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
    core debug: `file:///C:/Users/Sezer/Desktop/asf.sdp' successfully opened
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
    lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\art
    core debug: meta ok for (null), need to fetch art
    lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
    lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
    core debug: no art finder modules matched
    lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
    core debug: looking for meta fetcher module matching "any": 1 candidates
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
    lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\fetcher
    lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
    lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
    lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
    core debug: using meta fetcher module "lua"
    core debug: removing module "lua"
    core debug: searching art for asf.sdp
    core debug: looking for art finder module matching "any": 2 candidates
    lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
    qt4 debug: IM: Setting an input
    core debug: no art finder modules matched
    core debug: looking for meta fetcher module matching "any": 1 candidates
    lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\art
    lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
    lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\fetcher
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
    lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
    lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
    core debug: no meta fetcher modules matched
    core debug: searching art for file.sdp
    core debug: looking for art finder module matching "any": 2 candidates
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
    lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\art
    lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
    lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
    core debug: no art finder modules matched
    core debug: art not found for asf.sdp
    lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
    lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
    lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
    core debug: no art finder modules matched
    core debug: looking for meta fetcher module matching "any": 1 candidates
    lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\fetcher
    lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
    core debug: using meta fetcher module "lua"
    core debug: removing module "lua"
    core debug: searching art for asf.sdp
    core debug: looking for art finder module matching "any": 2 candidates
    lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\art
    lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
    core debug: no art finder modules matched
    core debug: art not found for asf.sdp
    core debug: looking for meta fetcher module matching "any": 1 candidates
    lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\fetcher
    lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac
    core debug: using meta fetcher module "lua"
    core debug: removing module "lua"
    core debug: searching art for file.sdp
    core debug: looking for art finder module matching "any": 2 candidates
    lua debug: Trying Lua scripts in C:\Users\Sezer\AppData\Roaming\vlc\lua\meta\art
    lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac
    lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac
    core debug: no art finder modules matched
    core debug: art not found for file.sdp

    Can you lead me to the right direction ? What should I do to get fair quality and no lag using rtp ?

  • ffmpeg h.246 plays locally in Safari, but not when hosted on s3 bucket

    7 juin 2018, par Simon Rogers

    ffmpeg h.246 plays locally in Safari, but not when hosted on s3 bucket.

    I thought it was therefore a problem with S3, however a friend has sent me an .mp4 of the same file converted with Zencoder’s service and this works perfectly, which surely means it must be a problem with my encoding settings in ffmpeg ?

    I’m using the settings recommended for maximum compatibility :

    ffmpeg -an -i mov-input-02.mov -vcodec libx264 -filter:v scale="1400:trunc(ow/a/2)*2" -movflags +faststart -pix_fmt yuv420p -profile:v baseline mov-output-02-1400.mp4

    Additionally, the .webm files I’m converting with ffmpeg all work perfectly in Chrome, Firefox, Opera etc.!

    I would really appreciate any thoughts.

    The video that works from Zencoder has this metadata :

    major_brand     : isom
    minor_version   : 1
    compatible_brands: isomavc1mp42
    creation_time   : 2018-06-01T11:24:54.000000Z
    Duration: 00:00:10.97, start: 0.000000, bitrate: 396 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 1800x1200 [SAR 1:1 DAR 3:2], 394 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc (default)
    Metadata:
     creation_time   : 2018-06-01T11:24:49.000000Z

    While my videos from ffmpeg which don’t work have this metadata :

    Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.12.100
    Duration: 00:00:10.97, start: 0.000000, bitrate: 184 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1400x932 [SAR 699:700 DAR 3:2], 182 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
     handler_name    : VideoHandler
     timecode        : 00:00:00:01
    Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s
    Metadata:
     handler_name    : TimeCodeHandler
     timecode        : 00:00:00:01
    Unsupported codec with id 0 for input stream 1

    Here’s the full output from conversion :

       Tempuras-iMac:2018.06.05 tempura$ ffmpeg -an -i mov-input-01.mov -vcodec l      Tempuras-iMac:2018.06.05 tempura$ ffmpeg -an -i mov-input-02.mov -vcodec libx264 -filter:v scale="1400:trunc(ow/a/2)*2" -movflags +faststart -pix_fmt yuv420p -profile:v baseline -level 3 mov-output-02-1400.mp4
       ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
         built with Apple LLVM version 8.1.0 (clang-802.0.42)
         configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
         libavutil      56. 14.100 / 56. 14.100
         libavcodec     58. 18.100 / 58. 18.100
         libavformat    58. 12.100 / 58. 12.100
         libavdevice    58.  3.100 / 58.  3.100
         libavfilter     7. 16.100 /  7. 16.100
         libavresample   4.  0.  0 /  4.  0.  0
         libswscale      5.  1.100 /  5.  1.100
         libswresample   3.  1.100 /  3.  1.100
         libpostproc    55.  1.100 / 55.  1.100
       Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'mov-input-02.mov':
         Metadata:
           major_brand     : qt  
           minor_version   : 537199360
           compatible_brands: qt  
           creation_time   : 2018-05-09T09:59:58.000000Z
         Duration: 00:00:10.97, start: 0.000000, bitrate: 114375 kb/s
           Stream #0:0(eng): Video: qtrle (rle  / 0x20656C72), rgb24(progressive), 2700x1800, 113610 kb/s, SAR 1:1 DAR 3:2, 30 fps, 30 tbr, 30 tbn, 30 tbc (default)
           Metadata:
             creation_time   : 2018-05-09T09:59:58.000000Z
             handler_name    : Apple Alias Data Handler
             encoder         : Animation
             timecode        : 00:00:00:01
           Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
           Metadata:
             creation_time   : 2018-05-09T09:59:58.000000Z
             handler_name    : Apple Alias Data Handler
             timecode        : 00:00:00:01
       Stream mapping:
         Stream #0:0 -> #0:0 (qtrle (native) -> h264 (libx264))
       Press [q] to stop, [?] for help
       [libx264 @ 0x7fac39004200] using SAR=699/700
       [libx264 @ 0x7fac39004200] frame MB size (88x59) > level limit (1620)
       [libx264 @ 0x7fac39004200] MB rate (155760) > level limit (40500)
       [libx264 @ 0x7fac39004200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
       [libx264 @ 0x7fac39004200] profile Constrained Baseline, level 3.0
       [libx264 @ 0x7fac39004200] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
       Output #0, mp4, to 'mov-output-02-1400.mp4':
         Metadata:
           major_brand     : qt  
           minor_version   : 537199360
           compatible_brands: qt  
           encoder         : Lavf58.12.100
           Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1400x932 [SAR 699:700 DAR 3:2], q=-1--1, 0.03 fps, 15360 tbn, 30 tbc (default)
           Metadata:
             creation_time   : 2018-05-09T09:59:58.000000Z
             handler_name    : Apple Alias Data Handler
             timecode        : 00:00:00:01
             encoder         : Lavc58.18.100 libx264
           Side data:
             cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
       [mp4 @ 0x7fac39003000] Starting second pass: moving the moov atom to the beginning of the file    
       frame=  329 fps= 42 q=-1.0 Lsize=     248kB time=00:00:10.93 bitrate= 185.5kbits/s speed= 1.4x    
       video:245kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.042892%
       [libx264 @ 0x7fac39004200] frame I:2     Avg QP:15.82  size: 34370
       [libx264 @ 0x7fac39004200] frame P:327   Avg QP:16.88  size:   555
       [libx264 @ 0x7fac39004200] mb I  I16..4: 76.8%  0.0% 23.2%
       [libx264 @ 0x7fac39004200] mb P  I16..4:  0.5%  0.0%  0.2%  P16..4:  0.7%  0.2%  0.1%  0.0%  0.0%    skip:98.3%
       [libx264 @ 0x7fac39004200] coded y,uvDC,uvAC intra: 14.3% 0.1% 0.1% inter: 0.2% 0.0% 0.0%
       [libx264 @ 0x7fac39004200] i16 v,h,dc,p: 57% 39%  3%  0%
       [libx264 @ 0x7fac39004200] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 41% 24% 20%  2%  3%  3%  2%  3%  1%
       [libx264 @ 0x7fac39004200] i8c dc,h,v,p: 100%  0%  0%  0%
       [libx264 @ 0x7fac39004200] kb/s:182.53