Recherche avancée

Médias (0)

Mot : - Tags -/configuration

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (38)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • MediaSPIP Player : les contrôles

    26 mai 2010, par

    Les contrôles à la souris du lecteur
    En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (6598)

  • Rails using stremio-ffmpeg gem to watermark a movie while uploading

    16 juin 2016, par Felix

    I am using carrierwave to upload a movie to amazon s3 that works perfect.

    Now I want to add a watermark to the movie while uploading or after uploading, I don’t know, what’s the best way ?

    I tried this :

    movie_controller.rb action uploadVideo

    movie = FFMPEG::Movie.new(@vid.video.url)

    puts "........................................"
    puts movie.inspect

    if @vid.save

    Just to find out if the video is catched from stremio.

    But then I got the error that the movie is not found, the problem is that it doesn’t look in the amazon s3 bucket, it looks on my local server

    No such file or directory - the file '/uploads/tmp/1462954331-3471-8766/VID-20160424-WA0013.mp4' does not exist

    What could be the solution ? or should I do this in carrierwave uploader ?

    UPDATE :

    When I do this after the .save action it looks at amazon s3 bucket .. but also says that the movie isn’t there. But if I call it directly in browser it’s displayed.

    UPDATE Code :

    #Laedt ein Video hoch
    def uploadMovie
     @user = User.find_by_id session[:user_id]
     #Holt alle Channels für die er eine Berechtigung hat (Eingeloggter user)
     @user = User.find_by_id session[:user_id]
     @knowledgeproviderList = @user.knowledgeprovider
     @channels = Channel.where(knowledgeprovider_id:     @knowledgeproviderList.pluck(:id))
     @vid = Movie.new(movies_params)
     @channel = Channel.find(params[:vid][:channel_id])
     @vid.channel = @channel

     #Fügt dem Movie einen Tag hinzu
     createTag params
     createCategory params



     if @vid.save
       flash[:notice] = t("flash.saved")

       #movie = FFMPEG::Movie.new(@vid.video.url)

       #puts "........................................"
       #puts movie.inspect

       redirect_to :action => :add
      else
        redirect_to :action => :add
     end
    end

    Update error :

    movie = FFMPEG::Movie.new(@vid.video.current_path)

    options = {watermark: "mages/header.png", resolution: "640x360", watermark_filter: { position: "RT", padding_x: 10, padding_y: 10 } }
    movie.transcode("movie.flv", options)

    enter image description here

    Update :
    Added the code in the uploader :

     process :watermark_movie

        def watermark_movie
          if self.file.path
                options = {watermark: "images/header.png", resolution: "640x360", watermark_filter: { position: "RT", padding_x: 10, padding_y: 10 } }
                self.model.file = FFMPEG::Movie.new(self.file.path).transcode("#{root}/#{cache_dir}/#{self.cache_id}/file.mp4", options)
           end
         end

    Error :

    multi_json (1.12.0) lib/multi_json/adapter.rb:19:in `load'
    multi_json (1.12.0) lib/multi_json.rb:122:in `load'
    streamio-ffmpeg (2.0.0) lib/ffmpeg/movie.rb:28:in `initialize'
    app/uploaders/movie_uploader.rb:40:in `new'
    app/uploaders/movie_uploader.rb:40:in `watermark_movie'
    carrierwave (0.11.2) lib/carrierwave/uploader/processing.rb:84:in `block in process!'
    carrierwave (0.11.2) lib/carrierwave/uploader/processing.rb:76:in `each'
    carrierwave (0.11.2) lib/carrierwave/uploader/processing.rb:76:in `process!'
    carrierwave_backgrounder (0.4.2) lib/backgrounder/delay.rb:14:in `process!'
    carrierwave (0.11.2) lib/carrierwave/uploader/callbacks.rb:18:in `block in with_callbacks'
    carrierwave (0.11.2) lib/carrierwave/uploader/callbacks.rb:18:in `each'
    carrierwave (0.11.2) lib/carrierwave/uploader/callbacks.rb:18:in `with_callbacks'
    carrierwave (0.11.2) lib/carrierwave/uploader/cache.rb:134:in `cache!'
    carrierwave (0.11.2) lib/carrierwave/mount.rb:329:in `cache'
    carrierwave (0.11.2) lib/carrierwave/mount.rb:163:in `video='
    carrierwave (0.11.2) lib/carrierwave/orm/activerecord.rb:39:in `video='
    activerecord (4.2.1) lib/active_record/attribute_assignment.rb:54:in `public_send'
    activerecord (4.2.1) lib/active_record/attribute_assignment.rb:54:in `_assign_attribute'
    activerecord (4.2.1) lib/active_record/attribute_assignment.rb:41:in `block in assign_attributes'
    actionpack (4.2.1) lib/action_controller/metal/strong_parameters.rb:183:in `each_pair'
    actionpack (4.2.1) lib/action_controller/metal/strong_parameters.rb:183:in `each_pair'
    activerecord (4.2.1) lib/active_record/attribute_assignment.rb:35:in `assign_attributes'
    activerecord (4.2.1) lib/active_record/core.rb:559:in `init_attributes'
    activerecord (4.2.1) lib/active_record/core.rb:281:in `initialize'
    activerecord (4.2.1) lib/active_record/inheritance.rb:61:in `new'
    activerecord (4.2.1) lib/active_record/inheritance.rb:61:in `new'
    app/controllers/movies_controller.rb:71:in `uploadMovie'
    actionpack (4.2.1) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
    actionpack (4.2.1) lib/abstract_controller/base.rb:198:in `process_action'
    actionpack (4.2.1) lib/action_controller/metal/rendering.rb:10:in `process_action'
    actionpack (4.2.1) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
    activesupport (4.2.1) lib/active_support/callbacks.rb:117:in `call'
    activesupport (4.2.1) lib/active_support/callbacks.rb:117:in `call'
    activesupport (4.2.1) lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
    activesupport (4.2.1) lib/active_support/callbacks.rb:505:in `call'
    activesupport (4.2.1) lib/active_support/callbacks.rb:505:in `call'
    activesupport (4.2.1) lib/active_support/callbacks.rb:92:in `_run_callbacks'
    activesupport (4.2.1) lib/active_support/callbacks.rb:776:in `_run_process_action_callbacks'
    activesupport (4.2.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
    actionpack (4.2.1) lib/abstract_controller/callbacks.rb:19:in `process_action'
    actionpack (4.2.1) lib/action_controller/metal/rescue.rb:29:in `process_action'
    actionpack (4.2.1) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
    activesupport (4.2.1) lib/active_support/notifications.rb:164:in `block in instrument'
    activesupport (4.2.1) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
    activesupport (4.2.1) lib/active_support/notifications.rb:164:in `instrument'
    actionpack (4.2.1) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
    actionpack (4.2.1) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
    activerecord (4.2.1) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
    actionpack (4.2.1) lib/abstract_controller/base.rb:137:in `process'
    actionview (4.2.1) lib/action_view/rendering.rb:30:in `process'
    actionpack (4.2.1) lib/action_controller/metal.rb:196:in `dispatch'
    actionpack (4.2.1) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
    actionpack (4.2.1) lib/action_controller/metal.rb:237:in `block in action'
    actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:74:in `call'
    actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
    actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:43:in `serve'
    actionpack (4.2.1) lib/action_dispatch/journey/router.rb:43:in `block in serve'
    actionpack (4.2.1) lib/action_dispatch/journey/router.rb:30:in `each'
    actionpack (4.2.1) lib/action_dispatch/journey/router.rb:30:in `serve'
    actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:819:in `call'
    rack (1.6.4) lib/rack/etag.rb:24:in `call'
    rack (1.6.4) lib/rack/conditionalget.rb:38:in `call'
    rack (1.6.4) lib/rack/head.rb:13:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/flash.rb:260:in `call'
    rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context'
    rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/cookies.rb:560:in `call'
    activerecord (4.2.1) lib/active_record/query_cache.rb:36:in `call'
    activerecord (4.2.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:649:in `call'
    activerecord (4.2.1) lib/active_record/migration.rb:378:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
    activesupport (4.2.1) lib/active_support/callbacks.rb:88:in `call'
    activesupport (4.2.1) lib/active_support/callbacks.rb:88:in `_run_callbacks'
    activesupport (4.2.1) lib/active_support/callbacks.rb:776:in `_run_call_callbacks'
    activesupport (4.2.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
    actionpack (4.2.1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/reloader.rb:73:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
    web-console (2.3.0) lib/web_console/middleware.rb:20:in `block in call'
    web-console (2.3.0) lib/web_console/middleware.rb:18:in `catch'
    web-console (2.3.0) lib/web_console/middleware.rb:18:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
    railties (4.2.1) lib/rails/rack/logger.rb:38:in `call_app'
    railties (4.2.1) lib/rails/rack/logger.rb:20:in `block in call'
    activesupport (4.2.1) lib/active_support/tagged_logging.rb:68:in `block in tagged'
    activesupport (4.2.1) lib/active_support/tagged_logging.rb:26:in `tagged'
    activesupport (4.2.1) lib/active_support/tagged_logging.rb:68:in `tagged'
    railties (4.2.1) lib/rails/rack/logger.rb:20:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
    rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
    rack (1.6.4) lib/rack/runtime.rb:18:in `call'
    activesupport (4.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
    rack (1.6.4) lib/rack/lock.rb:17:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/static.rb:113:in `call'
    rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
    railties (4.2.1) lib/rails/engine.rb:518:in `call'
    railties (4.2.1) lib/rails/application.rb:164:in `call'
    rack (1.6.4) lib/rack/lock.rb:17:in `call'
    rack (1.6.4) lib/rack/content_length.rb:15:in `call'
    rack (1.6.4) lib/rack/handler/webrick.rb:88:in `service'
    /home/felix/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
    /home/felix/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
    /home/felix/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'

    UPDATE — Movie Uploader

    # encoding: utf-8
    class MovieUploader < CarrierWave::Uploader::Base

     # Include RMagick or MiniMagick support:
     # include CarrierWave::RMagick
     include CarrierWave::MiniMagick
     include CarrierWave::Video
     include CarrierWave::Video::Thumbnailer
     include CarrierWave::Backgrounder::Delay

     require 'rubygems'
     require 'streamio-ffmpeg'

     # Choose what kind of storage to use for this uploader:
     storage :fog

     # Override the directory where uploaded files will be stored.
     # This is a sensible default for uploaders that are meant to be mounted:
     def store_dir
       "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
     end

     process :watermark_movie

     def watermark_movie
       puts "ssssssssssssssssssssssssssssssssss"
       puts self.file.inspect

       if self.file.path
         options = {watermark: "http://felix-hohlwegler.de/holz-soft/include/designs/design13/images/header.png", resolution: "640x360", watermark_filter: { position: "RT", padding_x: 10, padding_y: 10 } }
         self.model.file = FFMPEG::Movie.new(self.file.path).transcode("#{root}/#{cache_dir}/#{self.cache_id}/file.mp4", options)
       end
     end

     version :thumb do
       process thumbnail: [{format: 'png', quality: 10, size: 1200, strip: false, seek: 10, logger: Rails.logger}]
       def full_filename for_file
         png_name for_file, version_name
       end
     end

     def png_name for_file, version_name
       %Q{#{version_name}_#{for_file.chomp(File.extname(for_file))}.png}
     end


     # Add a white list of extensions which are allowed to be uploaded.
     # For images you might use something like this:
      def extension_white_list
        %w(mov avi mkv mpeg mpeg2 mp4 3gp)
      end
    end
  • FFMPEG not enough data (x y), trying to decode anyway

    7 juin 2016, par Forest J. Handford

    I’m trying to make videos of Direct3D games using a C# app. For non-Direct3D games I stream images from Graphics.CopyFromScreen which works. When I copy the screen from Direct3D and stream it to FFMPEG I get :

    [bmp @ 00000276b0b9c280] not enough data (5070 < 129654), trying to
    decode anyway

    An MP4 file is created, but it is always 0 bytes.

    To get screenshots from Direct3D, I am using Justin Stenning’s Direct3DHook. This produces images MUCH bigger than when I get images from Graphics.CopyFromScreen (8 MB vs 136 KB). I’ve tried increasing the buffer (-bufsize) but the number on the left of the error is not impacted.

    I’ve tried resizing the image to 1/6th the original. That reduces the number on the right, but does not eliminate it. Even when the number on the right is close to what I have for Graphics.CopyFromScreen I get an error. Here is a sample of the current code :

    using System;
    using System.Diagnostics;
    using System.Threading;
    using System.Drawing;
    using Capture.Hook;
    using Capture.Interface;
    using Capture;
    using System.IO;

    namespace GameRecord
    {
       public class Video
       {
           private const int VID_FRAME_FPS = 8;
           private const int SIZE_MODIFIER = 6;
           private const double FRAMES_PER_MS = VID_FRAME_FPS * 0.001;
           private const int SLEEP_INTERVAL = 2;
           private const int CONSTANT_RATE_FACTOR = 18; // Lower crf = Higher Quality https://trac.ffmpeg.org/wiki/Encode/H.264
           private Image image;
           private Capture captureScreen;
           private int processId = 0;
           private Process process;
           private CaptureProcess captureProcess;
           private Process launchingFFMPEG;
           private string arg;
           private int frame = 0;
           private Size? resize = null;


           /// <summary>
           /// Generates the Videos by gathering frames and processing via FFMPEG.
           /// </summary>
           public void RecordScreenTillGameEnd(string exe, OutputDirectory outputDirectory, CustomMessageBox alertBox, Thread workerThread)
           {
               AttachProcess(exe);
               RequestD3DScreenShot();
               while (image == null) ;
               Logger.log.Info("Launching FFMPEG ....");
               resize = new Size(image.Width / SIZE_MODIFIER, image.Height / SIZE_MODIFIER);
               // H.264 can let us do 8 FPS in high res . . . but must be licensed for commercial use.
               arg = "-f image2pipe -framerate " + VID_FRAME_FPS + " -i pipe:.bmp -pix_fmt yuv420p -crf " +
                   CONSTANT_RATE_FACTOR + " -preset ultrafast -s " + resize.Value.Width + "x" +
                   resize.Value.Height + " -vcodec libx264 -bufsize 30000k -y \"" +
                   outputDirectory.pathToVideo + "\"";

               launchingFFMPEG = new Process
               {
                   StartInfo = new ProcessStartInfo
                   {
                       FileName = "ffmpeg",
                       Arguments = arg,
                       UseShellExecute = false,
                       CreateNoWindow = true,
                       RedirectStandardInput = true,
                       RedirectStandardError = true
                   }
               };
               launchingFFMPEG.Start();

               Stopwatch stopWatch = Stopwatch.StartNew(); //creates and start the instance of Stopwatch

               do
               {
                   Thread.Sleep(SLEEP_INTERVAL);
               } while (workerThread.IsAlive);

               Logger.log.Info("Total frames: " + frame + " Expected frames: " + (ExpectedFrames(stopWatch.ElapsedMilliseconds) - 1));

               launchingFFMPEG.StandardInput.Close();

    #if DEBUG
               string line;
               while ((line = launchingFFMPEG.StandardError.ReadLine()) != null)
               {
                   Logger.log.Debug(line);
               }
    #endif
               launchingFFMPEG.Close();
               alertBox.Show();
           }

           void RequestD3DScreenShot()
           {
               captureProcess.CaptureInterface.BeginGetScreenshot(new Rectangle(0, 0, 0, 0), new TimeSpan(0, 0, 2), Callback, resize, (ImageFormat)Enum.Parse(typeof(ImageFormat), "Bitmap"));
           }

           private void AttachProcess(string exe)
           {
               Thread.Sleep(300);
               Process[] processes = Process.GetProcessesByName(Path.GetFileNameWithoutExtension(exe));
               foreach (Process currProcess in processes)
               {
                   // Simply attach to the first one found.

                   // If the process doesn't have a mainwindowhandle yet, skip it (we need to be able to get the hwnd to set foreground etc)
                   if (currProcess.MainWindowHandle == IntPtr.Zero)
                   {
                       continue;
                   }

                   // Skip if the process is already hooked (and we want to hook multiple applications)
                   if (HookManager.IsHooked(currProcess.Id))
                   {
                       continue;
                   }

                   Direct3DVersion direct3DVersion = Direct3DVersion.AutoDetect;

                   CaptureConfig cc = new CaptureConfig()
                   {
                       Direct3DVersion = direct3DVersion,
                       ShowOverlay = false
                   };

                   processId = currProcess.Id;
                   process = currProcess;

                   var captureInterface = new CaptureInterface();
                   captureInterface.RemoteMessage += new MessageReceivedEvent(CaptureInterface_RemoteMessage);
                   captureProcess = new CaptureProcess(process, cc, captureInterface);

                   break;
               }
               Thread.Sleep(10);

               if (captureProcess == null)
               {
                   ShowUser.Exception("No executable found matching: '" + exe + "'");
               }
           }

           /// <summary>
           /// The callback for when the screenshot has been taken
           /// </summary>
           ///
           ///
           ///
           void Callback(IAsyncResult result)
           {
               using (Screenshot screenshot = captureProcess.CaptureInterface.EndGetScreenshot(result))
               if (screenshot != null &amp;&amp; screenshot.Data != null &amp;&amp; arg != null)
               {
                   if (image != null)
                   {
                       image.Dispose();
                   }

                   image = screenshot.ToBitmap();
                   // image.Save("D3DImageTest.bmp");
                   image.Save(launchingFFMPEG.StandardInput.BaseStream, System.Drawing.Imaging.ImageFormat.Bmp);
                   launchingFFMPEG.StandardInput.Flush();
                   frame++;
               }

               if (frame &lt; 5)
               {
                   Thread t = new Thread(new ThreadStart(RequestD3DScreenShot));
                   t.Start();
               }
               else
               {
                   Logger.log.Info("Done getting shots from D3D.");
               }
           }

           /// <summary>
           /// Display messages from the target process
           /// </summary>
           ///
           private void CaptureInterface_RemoteMessage(MessageReceivedEventArgs message)
           {
               Logger.log.Info(message);
           }
       }
    }

    When I search the internet for the error all I get is the FFMPEG source code, which has not proven to be illuminating. I have been able to save the image directly to disk, which makes me feel like it is not an issue with disposing the data. I have also tried only grabbing one frame, but that produces the same error, which suggests to me it is not a threading issue.

    Here is the full sample of stderr :

    2016-06-02 18:29:38,046 === ffmpeg version N-79143-g8ff0f6a Copyright (c) 2000-2016 the FFmpeg developers

    2016-06-02 18:29:38,047 ===   built with gcc 5.3.0 (GCC)

    2016-06-02 18:29:38,048 ===   configuration: --enable-gpl
    --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --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

    2016-06-02 18:29:38,062 ===   libavutil      55. 19.100 / 55. 19.100

    2016-06-02 18:29:38,063 ===   libavcodec     57. 30.100 / 57. 30.100

    2016-06-02 18:29:38,064 ===   libavformat    57. 29.101 / 57. 29.101

    2016-06-02 18:29:38,064 ===   libavdevice    57.  0.101 / 57.  0.101

    2016-06-02 18:29:38,065 ===   libavfilter     6. 40.102 /  6. 40.102

    2016-06-02 18:29:38,066 ===   libswscale      4.  0.100 /  4.  0.100

    2016-06-02 18:29:38,067 ===   libswresample   2.  0.101 /  2.  0.101

    2016-06-02 18:29:38,068 ===   libpostproc    54.  0.100 / 54.  0.100

    2016-06-02 18:29:38,068 === [bmp @ 000002cd7e5cc280] not enough data (13070 &lt; 8294454), trying to decode anyway

    2016-06-02 18:29:38,069 === [bmp @ 000002cd7e5cc280] not enough data (13016 &lt; 8294400)

    2016-06-02 18:29:38,069 === Input #0, image2pipe, from 'pipe:.bmp':

    2016-06-02 18:29:38,262 ===   Duration: N/A, bitrate: N/A

    2016-06-02 18:29:38,262 ===     Stream #0:0: Video: bmp, bgra, 1920x1080, 8 tbr, 8 tbn, 8 tbc

    2016-06-02 18:29:38,263 === [libx264 @ 000002cd7e5d59a0] VBV bufsize set but maxrate unspecified, ignored

    2016-06-02 18:29:38,264 === [libx264 @ 000002cd7e5d59a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2

    2016-06-02 18:29:38,265 === [libx264 @ 000002cd7e5d59a0] profile Constrained Baseline, level 1.1

    2016-06-02 18:29:38,266 === [libx264 @ 000002cd7e5d59a0] 264 - core 148 r2665 a01e339 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 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=8 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=18.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0

    2016-06-02 18:29:38,463 === Output #0, mp4, to 'C:\Users\fores\AppData\Roaming\Affectiva\n_Artifacts_20160602_182857\GameplayVidOut.mp4':

    2016-06-02 18:29:38,464 ===   Metadata:

    2016-06-02 18:29:38,465 ===     encoder         : Lavf57.29.101

    2016-06-02 18:29:38,469 ===     Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 320x180, q=-1--1, 8 fps, 16384 tbn, 8 tbc

    2016-06-02 18:29:38,470 ===     Metadata:

    2016-06-02 18:29:38,472 ===       encoder         : Lavc57.30.100 libx264

    2016-06-02 18:29:38,474 ===     Side data:

    2016-06-02 18:29:38,475 ===       cpb: bitrate max/min/avg: 0/0/0 buffer size: 30000000 vbv_delay: -1

    2016-06-02 18:29:38,476 === Stream mapping:

    2016-06-02 18:29:38,477 ===   Stream #0:0 -> #0:0 (bmp (native) -> h264 (libx264))

    2016-06-02 18:29:38,480 === [bmp @ 000002cd7e5cc9a0] not enough data (13070 &lt; 8294454), trying to decode anyway

    2016-06-02 18:29:38,662 === [bmp @ 000002cd7e5cc9a0] not enough data (13016 &lt; 8294400)

    2016-06-02 18:29:38,662 === Error while decoding stream #0:0: Invalid data found when processing input

    2016-06-02 18:29:38,663 === frame=    0 fps=0.0 q=0.0 Lsize=       0kB time=00:00:00.00 bitrate=N/A speed=   0x    

    2016-06-02 18:29:38,663 === video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

    2016-06-02 18:29:38,664 === Conversion failed!

    In memory, the current image is 320 pixels wide and 180 pixels long. The pixel format is Format32bppRgb. The horizontal and vertical resolutions seem odd, they are both 96.01199. When filed to disk here is ffprobe output for the file :

    ffprobe version N-79143-g8ff0f6a Copyright (c) 2007-2016 the FFmpeg developers
     built with gcc 5.3.0 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --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
     libavutil      55. 19.100 / 55. 19.100
     libavcodec     57. 30.100 / 57. 30.100
     libavformat    57. 29.101 / 57. 29.101
     libavdevice    57.  0.101 / 57.  0.101
     libavfilter     6. 40.102 /  6. 40.102
     libswscale      4.  0.100 /  4.  0.100
     libswresample   2.  0.101 /  2.  0.101
     libpostproc    54.  0.100 / 54.  0.100
    Input #0, png_pipe, from 'C:\Users\fores\git\game-playtest-tool\GamePlayTest\bin\x64\Debug\D3DFromCapture.bmp':
     Duration: N/A, bitrate: N/A
       Stream #0:0: Video: png, rgba(pc), 1920x1080 [SAR 3779:3779 DAR 16:9], 25 tbr, 25 tbn, 25 tbc

    Here is a PNG version of an example screenshot from the current code (playing Portal 2) :
    Portal 2 Screenshot

    Any ideas would be greatly appreciated. My current workaround is to save the files to the HDD and compile the video after gameplay, but it’s a far less performant option. Thank you !

  • Reducing FFMPEG h264 video stream latency

    5 juin 2016, par KKKk

    I’m using FFMPEG(h264) and I want to reduce latency as much as possible. Now it’s about 700 ms and I can’t really make it lower. I tried almost all, so maybe anyone has idea how to help me ?

    ffmpeg -f dshow -i video="screen-capture-recorder" -pix_fmt yuv420p -probesize 32 -r 100 -an -vcodec libx264 -crf 40 -preset ultrafast -tune zerolatency -threads 8 -thread_type slice -f mpegts udp://192.168.88.228:1234

    The weird thing is I got this latency even on 127.0.0.1....
    (on the other side I use just ffplay udp :// .......)