Recherche avancée

Médias (1)

Mot : - Tags -/embed

Autres articles (111)

  • 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

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Changer son thème graphique

    22 février 2011, par

    Le thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
    Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
    Modifier le thème graphique utilisé
    Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
    Il suffit ensuite de se rendre dans l’espace de configuration du (...)

Sur d’autres sites (8221)

  • Gnuplot how to set a variable to standard-input if not passed

    27 août 2020, par DDS

    I have a gnuplot script (plot.script) that is invoked like

    


    C:> ffmpeg -i '.\my_awesome_audio_file.wav' -filter_complex aformat=channel_layouts=mono -acodec pcm_s16le -ar 4000 -f data - | gnuplot -e "fileout='plot';fileformat='png';wid=500;" .\plot.script        


    


    Now I'd want to default filein variable to stdin if it is not passed as argument. This because I want to be able to call this script as a 1-liner command with ffmpeg data generation and also as step-by-step procedure

    


    My idea was to use

    


    if(!exists('filein')){
filein = '-';
}


    


    but this throws warning: Skipping data file with no valid points

    


    if i print the variable datafile I got - (I expected something like stdin).

    


    this is the plot.script script :

    


    
if(!exists('filein')){
    filein = '-';
    }

if (!exists("hei")){
    hei = 4444;
    }
if (!exists("wid")){
    wid = 5555;
    }
if(!exists("fileformat")){
     fileformat = 'png';
     }
if(!exists("fileout")){
     fileout = 'risultato';
   }
   
fileout = fileout . '.' . fileformat;
   
if(!exists("dataformat")){
    dataformat = '%int16';
    }
if(fileformat eq 'png'){
  set terminal png transparent size larghezza,altezza;
  
  }else{
  set terminal fileformat size wid,hei;
  }
  set output fileout;
  unset key;
  unset tics;
  unset border;
  set lmargin 0;
  set rmargin 0;
  set tmargin 0;
  set bmargin 0;


print filein;
plot filein binary filetype=bin format=dataformat endian=little array=1:0 with lines linecolor "0x009900";


    


    But I also want to call this command-by-command :
generate the data-file :

    


    c:> ffmpeg -i '.\my_awesome_audio_file.wav' -filter_complex aformat=channel_layouts=mono -acodec pcm_s16le -ar 4000 -f data audio.dat


    


    plot the data :

    


    c:> gnuplot -e "filein='audio.dat';fileout='plot';fileformat='png';wid=500;" .\plot.script


    


  • Converting videos to flv using ffmpeg

    6 janvier 2012, par user703526

    In my c# application, i am writing code for converting any video format to flv format. For this FFMPEG is used.

    Some times an exceptions is occuring like :

    Attempted to read or write protected memory. This is often an indication that other memory is corrupt

    Below is my code from where the exception throwing,

       IntPtr pFormatContext;
       FFmpeg.av_register_all();

       int ret;
       ret = FFmpeg.av_open_input_file(out pFormatContext, this.Filename, IntPtr.Zero, 0, IntPtr.Zero);

       if (ret < 0)
       {
           Trace.WriteLine("couldn't open input file");

           FFmpeg.av_free_static();
           return;
       }


       try
       {
           ret = FFmpeg.av_find_stream_info(pFormatContext);

           if (ret < 0)
           {
               Trace.WriteLine("couldnt find stream informaion");
               FFmpeg.av_close_input_file(pFormatContext);
               FFmpeg.av_free_static();
               return;
           }


           FFmpeg.AVFormatContext formatContext = (FFmpeg.AVFormatContext)Marshal.PtrToStructure(pFormatContext, typeof(FFmpeg.AVFormatContext));

           Duration = formatContext.duration / FFmpeg.AV_TIME_BASE;

           for (int i = 0; i < formatContext.nb_streams; ++i)
           {
               FFmpeg.AVStream stream = (FFmpeg.AVStream)Marshal.PtrToStructure(formatContext.streams[i], typeof(FFmpeg.AVStream));
               FFmpeg.AVCodecContext codec = (FFmpeg.AVCodecContext)Marshal.PtrToStructure(stream.codec, typeof(FFmpeg.AVCodecContext));

               if (codec.codec_type == FFmpeg.CodecType.CODEC_TYPE_VIDEO)
               {
                   Height = codec.height;
                   Width = codec.width;

                           Type = FileType.flv;
                           MimeType = "video/x-flv";

               }

           }
       }
       catch (Exception ex)
       {
           Trace.WriteLine("FFMpeg failed to understand the file");
       }

       FFmpeg.av_close_input_file(pFormatContext);
       FFmpeg.av_free_static();
    }

    And from the above code this ret = FFmpeg.av_find_stream_info(pFormatContext); line throws memory corrupt exception.
    Please help me to solve this issue.

  • Carrierwave video not being processsed before uploading to S3

    12 décembre 2013, par Cramps

    I'm using Carrierwave, Carrierwave-video and Carrierwave-video-thumbnailer to process videos and make a thumbnail when they're uploaded. This was all working nicely while I was saving the files on my file system. However, now that I've added uploading to Amazon S3 using the carrierwave-aws gem, the videos are being uploaded to S3 without being processed first. It's as if the process encode_video and version :thumb are being skipped by the uploader.

    Here's what was working for me at first (before adding S3) :

    class VideoUploader < CarrierWave::Uploader::Base

    include CarrierWave::Video
    include CarrierWave::Video::Thumbnailer

    storage :file

    def store_dir
       "upload/path/"
    end

    process encode_video: [{ bunch of video options}]

    version :thumb do
       process thumbnail: [{ bunch of thumbnailer options }]
       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

    Now it's really just the same, except it's using storage :aws instead.