Recherche avancée

Médias (5)

Mot : - Tags -/open film making

Autres articles (73)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

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

  • Unhandled stream error in pipe : write EPIPE in Node.js

    28 novembre 2013, par Michael Romanenko

    The idea is to serve screenshots of RTSP video stream with Express.js server. There is a continuously running spawned openRTSP process in flowing mode (it's stdout is consumed by another ffmpeg process) :

    function spawnProcesses (camera) {
     var openRTSP = spawn('openRTSP', ['-c', '-v', '-t', camera.rtsp_url]),
         encoder = spawn('ffmpeg', ['-i', 'pipe:', '-an', '-vcodec', 'libvpx', '-r', 10, '-f', 'webm', 'pipe:1']);

     openRTSP.stdout.pipe(encoder.stdin);

     openRTSP.on('close', function (code) {
       if (code !== 0) {
         console.log('Encoder process exited with code ' + code);
       }
     });

     encoder.on('close', function (code) {
       if (code !== 0) {
         console.log('Encoder process exited with code ' + code);
       }
     });

     return { rtsp: openRTSP, encoder: encoder };
    }

    ...

    camera.proc = spawnProcesses(camera);

    There is an Express server with single route :

    app.get('/cameras/:id.jpg', function(req, res){
     var camera = _.find(cameras, {id: parseInt(req.params.id, 10)});
     if (camera) {
       res.set({'Content-Type': 'image/jpeg'});
       var ffmpeg = spawn('ffmpeg', ['-i', 'pipe:', '-an', '-vframes', '1', '-s', '800x600', '-f', 'image2', 'pipe:1']);
       camera.proc.rtsp.stdout.pipe(ffmpeg.stdin);
       ffmpeg.stdout.pipe(res);
     } else {
       res.status(404).send('Not found');
     }
    });

    app.listen(3333);

    When i request http://localhost:3333/cameras/1.jpg i get desired image, but from time to time app breaks with error :

    stream.js:94
     throw er; // Unhandled stream error in pipe.
           ^
    Error: write EPIPE
       at errnoException (net.js:901:11)
       at Object.afterWrite (net.js:718:19)

    Strange thing is that sometimes it successfully streams image to res stream and closes child process without any error, but, sometimes, streams image and falls down.

    I tried to create on('error', ...) event handlers on every possible stream, tried to change pipe(...) calls to on('data',...) constructions, but could not succeed.

    My environment : node v0.10.22, OSX Mavericks 10.9.

    UPDATE :

    I wrapped spawn('ffmpeg',... block with try-catch :

    app.get('/cameras/:id.jpg', function(req, res){
    ....
       try {
         var ffmpeg = spawn('ffmpeg', ['-i', 'pipe:', '-an', '-vframes', '1', '-s', '800x600', '-f', 'image2', 'pipe:1']);
         camera.proc.rtsp.stdout.pipe(ffmpeg.stdin);
         ffmpeg.stdout.pipe(res);
       } catch (e) {
         console.log("Gotcha!", e);
       }
    ....
    });

    ... and this error disappeared, but log is silent, it doesn't catch any errors. What's wrong ?

  • iOS FFmpeg : Requested output format 'flv' is not a suitable output format

    14 novembre 2013, par user2992563

    I just upgraded my iOS compiled FFmpeg library to 1.2.1 and now I'm getting the following error message :
    Requested output format 'flv' is not a suitable output format.

    I tried changing format to 'avi' and 'mov' aswell, but it seems that no matter the format_name I pass I get the same error message.

    This is how I set up the format_name :

    avformat_alloc_output_context2(&file, NULL, "flv", cname)

    And this is how I write the stream packets :

    // Appends a data packet to the rtmp stream
    -(bool) writePacket: (Demuxer *) source
    {
    int code = 0;

    AVCodecContext
    *videoCodec = [source videoCodec],
    *audioCodec = [source audioCodec];

    // Write headers
    if(useHeaders)
    {
       AVStream
       *video = av_new_stream(file, VIDEO_STREAM),
       *audio = av_new_stream(file, AUDIO_STREAM);

       if (!video || !audio)
           @throw [NSException exceptionWithName: @"StreamingError" reason: @"Could not allocate streams" userInfo: nil];

       // Clone input codecs and extra data
       memcpy(video->codec, videoCodec, sizeof(AVCodecContext));
       memcpy(audio->codec, audioCodec, sizeof(AVCodecContext));

       video->codec->extradata = av_malloc(video->codec->extradata_size);
       audio->codec->extradata = av_malloc(audio->codec->extradata_size);

       memcpy(video->codec->extradata, videoCodec->extradata, video->codec->extradata_size);
       memcpy(audio->codec->extradata, audioCodec->extradata, audio->codec->extradata_size);

       // Use FLV codec tags
       video->codec->codec_tag = FLV_TAG_TYPE_VIDEO;
       audio->codec->codec_tag = FLV_TAG_TYPE_AUDIO;
       video->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
       video->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
       audio->codec->sample_rate = INPUT_AUDIO_SAMPLING_RATE;

       // Update time base
       video->codec->time_base.num = 1;
       audio->codec->time_base.den = video->codec->time_base.den = FLV_TIMEBASE;

       // Signal bitwise stream copying
       //video->stream_copy = audio->stream_copy = 1;

       if((code = avformat_write_header(file, NULL)))
           @throw [NSException exceptionWithName: @"StreamingError" reason: @"Could not write stream headers" userInfo: nil];
       useHeaders = NO;
    }
    bool isVideo;
    AVPacket *packet = [source readPacket: &isVideo];

    if(!packet)
       return NO;

    if(isVideo)
    {
       packet->stream_index = VIDEO_STREAM;
       packet->dts = packet->pts = videoPosition;
       videoPosition += packet->duration = FLV_TIMEBASE * packet->duration * videoCodec->ticks_per_frame * videoCodec->time_base.num / videoCodec->time_base.den;
    }
    else
    {
       packet->stream_index = AUDIO_STREAM;
       packet->dts = packet->pts = audioPosition;
       audioPosition += packet->duration = FLV_TIMEBASE * packet->duration / INPUT_AUDIO_SAMPLING_RATE;
    }

    packet->pos = -1;
    packet->convergence_duration = AV_NOPTS_VALUE;

    // This sometimes fails without being a critical error, so no exception is raised
    if((code = av_interleaved_write_frame(file, packet)))
       NSLog(@"Streamer::Couldn't write frame");

    av_free_packet(packet);
    return YES;
    }

    In the code above I had to comment out this line as stream_copy has been removed from the newest version of FFmpeg :

    video->stream_copy = audio->stream_copy = 1;

    Any help would be greatly appreciated !

  • Mac Terminal (Bash) batch program to get multimedia file info using ffmpeg

    7 décembre 2013, par julesverne

    I have a Mac computer. Usually all my batch programming is done on my PC. So I tried to create what I assumed would be a simple equivalent using a Mac shell. Obviously as you all know that was foolish of me to think that. After 2 days of scowering the web I found the closest thing I could to what I was looking for. But no, this doesn't work either.

    All I'd like to do is throw a multimedia file onto the script, and have the terminal give me the ffmpeg info output. In my searching I did find this "$@" which as far as I can tell is the windows bat equivalent of %*. Meaning you can throw files on the script and the script refers to those files as variables which can be processed. So I believe what I want to do is possible.

    Again the code at the bottom is just to look through the current directory of all .mov files and run ffmpeg. It doesn't work. But.. if no one can help me figure out the actual thing I'd like to do then I'd settle with something like below that does actually work.

    #!/bin/bash
    FFMPEG=/Applications/ffmpeg
    FIND=/usr/bin/find
    FILES=$(${FIND} . -type f  -iname "*.mov")
    if [ "$FILES" == "" ]
    then
    echo "There are no *.mov file in $(pwd) directory"
    exit 1
    fi

    for f in *.mov
    do

    $FFMPEG -i "$f"

    done

    If someone can please help me figure this out I'd really appreciate it. Thank you in advance ! Jules

    I just found this solution from the "similar questions" sidebar, which is similar to the script above, so again, not completely what I wanted but.. didn't matter, didn't work for me. How to batch convert mp4 files to ogg with ffmpeg using a bash command or Ruby