Recherche avancée

Médias (91)

Autres articles (72)

  • MediaSPIP Core : La Configuration

    9 novembre 2010, par

    MediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
    Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...)

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

Sur d’autres sites (7233)

  • Streaming videos from a Java backend

    11 mai 2014, par IAmYourFaja

    I was wondering how most multimedia Java shops handle video streaming. Say I want to build a website that has a page that uses the HTML5 video player like so :

       
           ...
       
       
           ... content up here

           <video width="500" height="500" controls="controls" src="path/to/video.mp4"></video>

           ... more content down here

    Say the URL for this page is http://myapp.example.org/video. When HTTP requests for the /video path reach the myappp.example.org servers, I guess I have a few options :

    • Route the request to a web app server (Tomcat/Jetty), and try to figure out how to stream the video.mp4 video directly off that server using pure Java ; or
    • Route the request to a media server, and somehow stream video.mp4 from that media server directly back to the client ; or
      • On this end I’ve heard of servers like Red5 or Wowza
    • Route the request to a media server (again, Red5/Wowza), and somehow stream video.mp4 through the web app server acting as a middleman

    There may be other options that I’m aware of (in which case, what are they ???). My questtion :

    How is A/V streaming typically handled from behind a Java backend ?

  • Error : ENOENT : no such file or directory ( AWS Lambda function)

    29 janvier 2019, par Arun

    I am trying to convert the video file to audio using FFMPEG. But I keep getting this error while converting video to audio in AWS Lambda function. I searched a lot of googles but I can’t figure out a suitable solution.
    If anyone knows the answer please share your solution. I referred this video to audio convertion method from this post.

    Error :

    { Error: ENOENT: no such file or directory, lstat '/var/task/tmp/c82f117b7841f1c2a4c9cd86cd93aad9.mp3'
    at Error (native)
    at Object.fs.lstatSync (fs.js:994:11)
    at Object.byteLength (/var/task/node_modules/aws-sdk/lib/util.js:175:30)
    at Request.SET_CONTENT_LENGTH (/var/task/node_modules/aws-sdk/lib/event_listeners.js:161:40)
    at Request.callListeners (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/var/task/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/var/task/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/var/task/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /var/task/node_modules/aws-sdk/lib/state_machine.js:26:10

    message: 'ENOENT: no such file or directory, lstat
    \'/var/task/tmp/c82f117b7841f1c2a4c9cd86cd93aad9.mp3\'',
    errno: -2,
    code: 'ENOENT',
    syscall: 'lstat',
    path: '/var/task/tmp/c82f117b7841f1c2a4c9cd86cd932332.mp3'}

    Code

    const child_process = require('child_process');
    const fs = require('fs');
    const path = require('path');

    const AWS = require('aws-sdk');
    const request = require('request');
    const tempy = require('tempy');

    const s3 = new AWS.S3();


    exports.handler = (event, context, callback) => {
     // We're going to do the transcoding asynchronously, so we callback immediately.
     callback();

     // Extract the event parameters.
     const { mp3Key, url } = event;

     const filename = event.filename || path.basename(mp3Key);
     const logKey = event.logKey || `${mp3Key}.log`;
     const s3Bucket = event.s3Bucket || 'bucket-name;

     // Create temporary input/output filenames that we can clean up afterwards.
     const inputFilename = tempy.file();
     const mp3Filename = tempy.file({ extension: 'mp3' });

     // Download the source file.
     Promise.resolve().then(() => new Promise((resolve, revoke) => {
       const writeStream = fs.createWriteStream(inputFilename);
       writeStream.on('finish', resolve);
       writeStream.on('error', revoke);
       request(url).pipe(writeStream);
     }))
     // Perform the actual transcoding.
     .then(() => {
       // Use the Exodus ffmpeg bundled executable.
       const ffmpeg = path.resolve(__dirname, 'exodus', 'bin', 'ffmpeg');

       // Convert the FLV file to an MP3 file using FFmpeg.
       const ffmpegArgs = [
         '-i', inputFilename,
         '-vn', // Disable the video stream in the output.
         '-acodec', 'libmp3lame', // Use Lame for the mp3 encoding.
         '-ac', '2', // Set 2 audio channels.
         '-q:a', '6', // Set the quality to be roughly 128 kb/s.
         mp3Filename,
       ];
       const process = child_process.spawnSync(ffmpeg, ffmpegArgs);
       console.log("process ", process.stdout);
       // return process;
     // return process.stdout.toString() + process.stderr.toString();
     })
     // Upload the generated MP3 to S3.
     .then(logContent => new Promise((resolve, revoke) => {
       console.log("inside s3 upload", mp3Filename)
       s3.putObject({
         Body: fs.createReadStream(mp3Filename),
         Bucket: s3Bucket,
         Key: mp3Key,
         ContentDisposition: `attachment; filename="${filename.replace('"', '\'')}"`,
         ContentType: 'audio/mpeg',
       }, (error) => {
         if (error) {
           revoke(error);
         } else {
           // Update a log of the FFmpeg output.
           const logFilename = path.basename(logKey);
           console.log("log file upload")
           s3.putObject({
             Body: logContent,
             Bucket: s3Bucket,
             ContentType: 'text/plain',
             ContentDisposition: `inline; filename="${logFilename.replace('"', '\'')}"`,
             Key: logKey,
           }, resolve);
         }
       })
     }))
     .catch(console.error)
     // Delete the temporary files.
     .then(() => {
       [inputFilename, mp3Filename].forEach((filename) => {
         if (fs.existsSync(filename)) {
           fs.unlinkSync(filename);
         }
       });
     });
    };
  • Why can't curl download the ffmpeg-2.7.tar.bz2 ?

    12 juin 2015, par Jerikc XIONG

    I’m working on OS X Yosemite 10.10.2. I want to use curl command to download the ffmpeg-2.7.tar.bz2 as following :

    curl -O http://ffmpeg.org/releases/ffmpeg-2.7.tar.bz2

    It can’t work.

    However it works fine with other url.

    The message as following when add the —verbose option :

    $ curl --verbose -O http://ffmpeg.org/releases/ffmpeg-2.7.tar.bz2
    * Hostname was NOT found in DNS cache
     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
     0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 192.190.173.55...
     0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to ffmpeg.org (192.190.173.55) port 80 (#0)
    > GET /releases/ffmpeg-2.7.tar.bz2 HTTP/1.1
    > User-Agent: curl/7.37.1
    > Host: ffmpeg.org
    > Accept: */*
    >
    * HTTP 1.0, assume close after body
    &lt; HTTP/1.0 302 Found
    &lt; Location: http://211.167.105.70:80/1Q2W3E4R5T6Y7U8I9O0P1Z2X3C4V5B/ffmpeg.org/releases/ffmpeg-2.7.tar.bz2
    &lt; Connection: Close
    &lt;
    { [data not shown]
     0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
    * Closing connection 0

    Where did I go wrong ?

    PS :

    $ curl --version
    curl 7.37.1 (x86_64-apple-darwin14.0) libcurl/7.37.1 SecureTransport zlib/1.2.5
    Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
    Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz