Recherche avancée

Médias (0)

Mot : - Tags -/organisation

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

Autres articles (93)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

  • MediaSPIP en mode privé (Intranet)

    17 septembre 2013, par

    À partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
    Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
    Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...)

  • 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 (9626)

  • download and fill file on fly

    4 mai 2017, par Gianluca Calabria

    I’m trying to create a service for a client which takes some audio chunks and concatenate them. For this I’m using FFmpeg. The user should also be able to download the result on the fly without waiting for the conversion/concatenation to finish. The idea is to "fill" the file as the process goes on. I cannot work my way around it, is it possible to do ? I’m using a RESTful service which calls a class like this one

    public ReadableRepresentation serveDownloadRequest(Representation entity) throws SystemInitializationException {
       InputStreamChannel inputStreamChannel;
       Form reqParameters=getQuery();
       try {

           String parameters = readStringParameter(reqParameters, AudioCutAndJoinParameters.PARAMETERS, AudioCutAndJoinParameters.PARAMETERS_MANDATORY);
           trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.PARAMETERS + "=" + parameters);

           String inputUri = readStringParameter(reqParameters, AudioCutAndJoinParameters.INPUT_URI, AudioCutAndJoinParameters.INPUT_URI_MANDATORY);
           trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.INPUT_URI + "=" + inputUri);

           String markInRelative = readStringParameter(reqParameters, AudioCutAndJoinParameters.MARKIN_ID_RELATIVE, AudioCutAndJoinParameters.MARKIN_ID_RELATIVE_MANDATORY);
           trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.MARKIN_ID_RELATIVE + "=" + markInRelative);

           String parametersString = readStringParameter(reqParameters, AudioCutAndJoinParameters.PARAMETERS_STRING, AudioCutAndJoinParameters.PARAMETERS_STRING_MANDATORY);
           trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.PARAMETERS_STRING + "=" + parametersString);

           String cmdFolder = readStringParameter(reqParameters, AudioCutAndJoinParameters.COMMAND_FOLDER, AudioCutAndJoinParameters.COMMAND_FOLDER_MANDATORY);
           trace.debug(this.getClass().getSimpleName() + " parameter " + AudioCutAndJoinParameters.COMMAND_FOLDER + "=" + cmdFolder);

           Map markInIdRelativeMap=JsonEntityManager.getInstance().deserializeMap(markInRelative);
           Map parametersMap=JsonEntityManager.getInstance().deserializeMap(parameters);
           List <string> InputUri= JsonEntityManager.getInstance().deserializeList(inputUri);

           InputStream transcodeOutput = Services.getInstance().runAudioCutAndJoin(parametersMap,markInIdRelativeMap,InputUri,parametersString,cmdFolder);
           inputStreamChannel = new InputStreamChannel(transcodeOutput);

           ReadableRepresentation result = new ReadableRepresentation(inputStreamChannel, MediaType.AUDIO_ALL);

           Disposition disp = new Disposition(Disposition.TYPE_ATTACHMENT);

           disp.setFilename("test-cut.wav");
           result.setDisposition(disp);

           return result;
    </string>

    I’m using the process.getInputStream() as return of my runAudioCutAndJoin but no download happens until the process of conversion/concatenation is done. Can somebody please help me out ?

  • How to upload a transcoded file to s3 and create a link to download it

    29 septembre 2022, par Dotun Longe

    I want to download a video after my module "creates" it by combining a picture and audio file. The output goes to my tmp folder. This works, but I don't know how to access it.

    &#xA;

    My method is to create another Paperclip attachment called "converted" and the module responsible for transcoding should also be responsible for uploading the converted video to a bucket, where I can then access it via @upload.converted.url.

    &#xA;

    I have no idea how to go about this, and my eyes hurt from searching. If you have a better way for me to be able to download the transcoded video without this option, I will be open to it.

    &#xA;

    # videocreatingproccessor.rb&#xA;&#xA;require &#x27;streamio-ffmpeg&#x27;&#xA;require &#x27;fileutils&#x27;&#xA;&#xA;module VideoCreatingProcessor&#xA;  def self.convert_to_video (path_to_audio_file, path_to_image_file)&#xA;    movie = FFMPEG::Movie.new(path_to_audio_file)&#xA;    options = {&#xA;      video_codec: "libx264",&#xA;      frame_rate: 60,&#xA;      resolution: "960x720",&#xA;      x264_vprofile: "high",&#xA;      x264_preset: "slow",&#xA;      pixel_format: "720p",&#xA;      audio_codec: "libfaac",&#xA;      audio_bitrate: 32,&#xA;      audio_sample_rate: 44100,&#xA;      audio_channels: 2,&#xA;      threads: 2,&#xA;    }&#xA;&#xA;    woptions = { watermark: path_to_image_file, resolution: "960x720", watermark_filter: { padding_x: 10, padding_y: 10 } }&#xA;&#xA;    movie.transcode("tmp/output.mp4",woptions ,options )&#xA;  end&#xA;end&#xA;

    &#xA;

    # uploads_controller.rb&#xA;&#xA;class UploadsController &lt; ApplicationController&#xA;  before_action :set_upload, only: [:show, :edit, :update, :destroy]&#xA;&#xA;  def index&#xA;    @uploads = Upload.all&#xA;  end&#xA;&#xA;  def paudioaddress&#xA;    "https:" &#x2B; @upload.audio.url&#xA;  end&#xA;&#xA;  def pimageaddress&#xA;    "https:" &#x2B; @upload.image.url&#xA;  end&#xA;&#xA;   def show&#xA;    require "video_creating_processor"&#xA;    newvideo = VideoCreatingProcessor.convert_to_video(paudioaddress, pimageaddress)&#xA;   end&#xA;&#xA;   # ....&#xA;end&#xA;

    &#xA;

  • ffmpeg download mp3 in chunks slower than whole file

    6 août 2021, par loretoparisi

    I'm programmatically downloading in Python mp3 file's as wav chunks, seeking at position with ss and t with ffmpeg resulting in a sequence of ffmpeg commands

    &#xA;

    ffmpeg -i https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_5MG.mp3 -acodec pcm_s16le -ac 1 -ar 44100 -ss 0:08:55.780000 -t 0:01:00.000000 -sn -vn -y -f wav pipe:1&#xA;ffmpeg -i https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_5MG.mp3 -acodec pcm_s16le -ac 1 -ar 44100 -ss -ss 0:09:55.780000 -t 0:01:00.000000 -sn -vn -y -f wav pipe:1&#xA;ffmpeg -i https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_5MG.mp3 -acodec pcm_s16le -ac 1 -ar 44100 -ss -ss -ss 0:10:55.780000 -t 0:01:00.000000 -sn -vn -y -f wav pipe:1&#xA;...&#xA;

    &#xA;

    executed via concurrent.futures.ThreadPoolExecutor in this way :

    &#xA;

    with concurrent.futures.ThreadPoolExecutor(max_workers=NTHREADS) as executor:&#xA;        for i,cmd in enumerate(process_list):&#xA;            futures.append(executor.submit(downloader.chunk_download,(cmd,i)))&#xA;&#xA;        for future in concurrent.futures.as_completed(futures):&#xA;            try:&#xA;                completed.append(future.result())&#xA;            except Exception as e:print(e)&#xA;    completed.sort() &#xA;    for k,c in enumerate(completed):&#xA;        if not k:&#xA;            waveform = c[1]&#xA;        else:&#xA;            waveform = np.append(waveform,c[1])&#xA;

    &#xA;

    where chunk_download is concat the chunks into the whole waveform

    &#xA;

    def chunk_download(self,args):&#xA;        cmd=args[0]&#xA;        i=args[1]&#xA;        print(&#x27;Downloading chunk n&#xB0; %i&#x27; % i)&#xA;&#xA;        print( &#x27; &#x27;.join(cmd))&#xA;        process = subprocess.run(cmd,&#xA;                            stdout=subprocess.PIPE,&#xA;                            stderr=subprocess.PIPE,&#xA;                            bufsize=10**8)&#xA;        #buffer, stderr = process.communicate()&#xA;        buffer = process.stdout&#xA;        stderr = process.stderr&#xA;        print(&#x27;chunk n&#xB0; %i DOWNLOADED&#x27; % i)&#xA;        # convert to signal&#xA;        chunk_waveform = np.frombuffer(buffer=buffer, dtype=np.uint16, offset=8*44)&#xA;        chunk_waveform = chunk_waveform.astype(self.dtype)  &#xA;        print(len(chunk_waveform)/44100) &#xA;&#xA;        return i,chunk_waveform&#xA;

    &#xA;

    this works ok, but if I download the whole mp3, executing the command in cmd like :

    &#xA;

    ffmpeg -i https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_5MG.mp3 -acodec pcm_s16le -ac 1 -ar 44100 -sn -vn -y -f wav pipe:1&#xA;

    &#xA;

    It will take less time than the concurrent chunks download for the same file length, while I would expect the opposite. Could be this related to ffmpeg threading option (param --thread ?). If not, why the concurrent chunks download operation is slower ?

    &#xA;