Recherche avancée

Médias (0)

Mot : - Tags -/optimisation

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

Autres articles (111)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

Sur d’autres sites (4007)

  • How can I mux a MKV and MKA file and get it to play in a browser ?

    28 juin 2017, par Robert

    I’m using ffmpeg to merge .mkv and .mka files into .mp4 files. My current command looks like this :

    ffmpeg -i video.mkv -i audio.mka output_path.mp4

    The audio and video files are pre-signed urls from Amazon S3. Even on a server with sufficient resources, this process is going very slowly. I’ve researched situations where you can tell ffmpeg to skip re-encoding each frame, but I think that in my situation it actually does need to re-encode each frame.

    I’ve downloaded 2 sample files to my macbook pro and have installed ffmpeg locally via homebrew. When I run the command

    ffmpeg -i video.mkv -i audio.mka -c copy output.mp4

    I get the following output :

    ffmpeg version 3.3.2 Copyright (c) 2000-2017 the FFmpeg developers
     built with Apple LLVM version 8.1.0 (clang-802.0.42)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libavresample   3.  5.  0 /  3.  5.  0
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100
    Input #0, matroska,webm, from '319_audio_1498590673766.mka':
     Metadata:
       encoder         : GStreamer matroskamux version 1.8.1.1
       creation_time   : 2017-06-27T19:10:58.000000Z
     Duration: 00:00:03.53, start: 2.831000, bitrate: 50 kb/s
       Stream #0:0(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
       Metadata:
         title           : Audio
    Input #1, matroska,webm, from '319_video_1498590673766.mkv':
     Metadata:
       encoder         : GStreamer matroskamux version 1.8.1.1
       creation_time   : 2017-06-27T19:10:58.000000Z
     Duration: 00:00:03.97, start: 2.851000, bitrate: 224 kb/s
       Stream #1:0(eng): Video: vp8, yuv420p(progressive), 640x480, SAR 1:1 DAR 4:3, 30 tbr, 1k tbn, 1k tbc (default)
       Metadata:
         title           : Video
    [mp4 @ 0x7fa4f0806800] Could not find tag for codec vp8 in stream #0, codec not currently supported in container
    Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
    Stream mapping:
     Stream #1:0 -> #0:0 (copy)
     Stream #0:0 -> #0:1 (copy)
       Last message repeated 1 times

    So it appears that the specific encodings I’m working with are vp8 videos and opus audio files, which I believe are incompatible with the .mp4 output container. I would appreciate answers that cover ways of optimally merging vp8 and opus into .mp4 output or answers that point me in the direction of output media formats that are both compatible with vp8 & opus and are playable on web and mobile devices so that I can bypass the re-encoding step altogether.

    EDIT :

    Just wanted to provide a benchmark after following LordNeckbeard’s advice :

    4 min 41 second video transcoded locally on my mac

    LordNeckbeard’s approach : 15 mins 55 seconds (955 seconds)
    Current approach : 18 mins 49 seconds (1129 seconds)

    18% speed increase
  • Boto3 Video Upload 0 Bytes from Heroku

    14 juillet 2017, par genghiskhan

    I have a small Flask api that takes a video and an image, overlays the image on the video and uploads the result to Amazon S3. I am using ffmpeg to do the actual overlaying. Here is that code :

    command = "ffmpeg -i {0} -i {1} -filter_complex \"overlay=0:0\" {2}".format(background_name, overlay_name, output_name)
    subprocess.getoutput(command)

    Then I simply upload it via Boto3 :

    s3.upload_file(output_name, VIDEO_BUCKET_NAME, output_name)

    This code works fine when I run on localhost ; however, when I test in while deployed to Heroku, it always uploads a file with 0 bytes. I suspect that it may be a problem with Heroku’s transient filesystem, but the file is being used immediately after it is created.

  • Converting AWS Polly Audio Stream with fluent-ffmpeg

    27 juillet 2017, par Joel

    I am trying to convert an audio stream from Amazon AWS Polly in Node.js using fluent-ffmpeg. The documentation says that I can convert a stream, which is what the output of Polly provides, but I am getting an "Invalid input" error.

    polly.synthesizeSpeech(pollyParams, function (err, data) {
    if (err) {
       console.log(err)
    } else {
       console.log('Audio')
       console.log(data)
       ffmpeg().input(data.AudioStream).inputOptions(['-ac 2', '-codec:a libmp3lame', '-b:a 48k', '-ar 16000'])
    }  

    Results in :

    AudioStream : }
    2017-07-27T14:07:09.335Z dd75614c-72d4-11e7-b7cd-5d4425c782fc Error : Invalid input
    at FfmpegCommand.proto.mergeAdd.proto.addInput.proto.input (/var/task/node_modules/fluent-ffmpeg/lib/options/inputs.js:34:15)

    I know the output from Polly is a valid audio stream, because I am able to save it to an S3 bucket. I would prefer to convert the stream before saving to S3, rather than saving it, picking it up from S3, converting it, and then saving it again.

    Thanks for your help !