Recherche avancée

Médias (1)

Mot : - Tags -/Rennes

Autres articles (90)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (10298)

  • nodejs ffmpeg play video at specific time and stream it to client

    12 mars 2020, par bluejayke

    I’m trying to make a basic online video editor with nodeJS and ffmpeg.

    To do this I need 2 steps :

    1. set the in-and-out times of the videos from the client, which requires the client to view the video at specific times, and switch the position of the video. Meaning, if a single video is used as an input, and split it into smaller parts, it needs to replay from the starting time of the next edited segment, if that makes sense.

    2. send the input-output data to nodejs and export it with ffmpeg as a finished vide.

    At first I wanted to do 1. purely on the client, then upload the source video(s) to nodeJS, and generate the same result with ffmpeg, and send back the result.

    But there are may problems with video processing on the client side in HTML at the moment, so now I have a change of plans : to do all of the processing on the nodeJS server, including the video playing.

    This is the part I am stuck at now. I’m aware that ffmpeg can be used in many different ways from nodeJS, but I have not found a way to play a .mp4 webm video in realtime with ffmpeg, at a specific timestamp, and send the streaming video (again, at a certain timestamp) to the client.

    I’ve seen the pipe:1 attribute from ffmpeg, but I couldn’t find any tutorials to get it working with an mp4 webm video, and to parse the stdout data somehow with nodejs and send it to the client. And even if I could get that part to work, I still have no idea to play the video, in realtime, at a certain timestamp.

    I’ve also seen ffplay, but that’s only for testing as far as I know ; I haven’t seen any way of getting the video data from it in realtime with nodejs.

    So :

    how can I play a video, in nodeJS, at a specific time (preferably with ffmpeg), and send it back to the client in realtime ?

    What I have already seen :

    Best approach to real time http streaming to HTML5 video client

    Live streaming using FFMPEG to web audio api

    Ffmpeg - How to force MJPEG output of whole frames ?

    ffmpeg : Render webm from stdin using NodeJS

    No data written to stdin or stderr from ffmpeg

    node.js live streaming ffmpeg stdout to res

    Realtime video conversion using nodejs and ffmpeg

    Pipe output of ffmpeg using nodejs stdout

    can’t re-stream using FFMPEG to MP4 HTML5 video

    FFmpeg live streaming webm video to multiple http clients over Nodejs

    http://www.mobiuso.com/blog/2018/04/18/video-processing-with-node-ffmpeg-and-gearman/

    stream mp4 video with node fluent-ffmpeg

    How to get specific start & end time in ffmpeg by Node JS ?

    Live streaming : node-media-server + Dash.js configured for real-time low latency

    Low Latency (50ms) Video Streaming with NODE.JS and html5

    Server node.js for livestreaming

    HLS Streaming using node JS

    Stream part of the video to the client

    Video streaming with HTML 5 via node.js

    Streaming a video file to an html5 video player with Node.js so that the video controls continue to work ?

    How to (pseudo) stream H.264 video - in a cross browser and html5 way ?

    Pseudo Streaming an MP4 file

    How to stream video data to a video element ?

    How do I convert an h.264 stream to MP4 using ffmpeg and pipe the result to the client ?

    https://medium.com/@brianshaler/on-the-fly-video-rendering-with-node-js-and-ffmpeg-165590314f2

    node.js live streaming ffmpeg stdout to res

    Can Node.js edit video files ?

  • can write frames to rtsp server, but can't display them in the ffplay or live555 client

    11 octobre 2016, par tankyx

    I am working on a zero latency streaming server, using ffmpeg libraries and I am facing a problem.
    My server is working when using nvenc, I can streaming successfully to my client, which is another computer on LAN. But if I change my encoder to use the libx264 (in order to reduce the latency), the server still write the frames, but the client is facing problems with the sdp header, and more specifically, the media subsession does not seem to be initialized. Therefore, the client crashes.

    The thing is, when I dump the sdp header when using nvenc and libx264, it is actually the same in both case.

    Here is the code I have done to initialize my encoder :

    /*
       Init the codec that is used to encode the video.
       Init the output format context (aka RTSP uri).
    */
    FfmpegEncoder::FfmpegEncoder(char *url)
    {
       AVRational      tmp_time_base;
       AVDictionary*   options = NULL;

       this->pCodec = avcodec_find_encoder_by_name("libx264");
       if (this->pCodec == NULL)
           throw myExceptions("Error: Can't initialize the encoder. FfmpegEncoder.cpp l:9\n");

       this->pCodecCtx = avcodec_alloc_context3(this->pCodec);

       //Alloc output context
       if (avformat_alloc_output_context2(&outFormatCtx, NULL, "rtsp", url) < 0)
           throw myExceptions("Error: Can't alloc stream output. FfmpegEncoder.cpp l:17\n");

       this->st = avformat_new_stream(this->outFormatCtx, this->pCodec);
       this->st->id = this->outFormatCtx->nb_streams - 1;

       if (this->st == NULL)
           throw myExceptions("Error: Can't create stream . FfmpegEncoder.cpp l:22\n");

       //Define the framerate of the output. The numerator should stay 1. Denumerator is the framerate we are aiming for.

       tmp_time_base.num = 1;
       tmp_time_base.den = 60;

       //TODO : parse these values
       this->pCodecCtx->bit_rate = 5000000;
       this->pCodecCtx->width = 1280;
       this->pCodecCtx->height = 720;
       //This set the fps. 60fps at this point.
       this->pCodecCtx->time_base = tmp_time_base;
       this->st->time_base = tmp_time_base;
       //Add a intra frame every 12 frames
       this->pCodecCtx->gop_size = 10;
       this->pCodecCtx->pix_fmt = AV_PIX_FMT_YUV420P;

       av_opt_set(this->pCodecCtx, "tune", "zerolatency", 0);
       av_opt_set(this->pCodecCtx, "vprofile", "main", 0);
       av_opt_set(this->pCodecCtx, "preset", "faster", 0);

       //Open Codec, using the context + x264 options
       if (avcodec_open2(this->pCodecCtx, this->pCodec, &options) < 0)
           throw myExceptions("Error: Can't open the codec. FfmpegEncoder.cpp l:43\n");

       if (avcodec_copy_context(this->st->codec, this->pCodecCtx) != 0) {
           throw myExceptions("Error : Can't copy codec context. FfmpegEncoder.cpp : l.46");
       }
       av_dump_format(this->outFormatCtx, 0, url, 1);

       //write the header needed to start the stream.
       if (avformat_write_header(this->outFormatCtx, NULL) != 0)
           throw myExceptions("Error: failed to connect to RTSP server. FfmpegEncoder.cpp l:48\n");
    }
  • can write frames to rtsp server, but can't display them in the ffplay or live555 client

    11 octobre 2016, par tankyx

    I am working on a zero latency streaming server, using ffmpeg libraries and I am facing a problem.
    My server is working when using nvenc, I can streaming successfully to my client, which is another computer on LAN. But if I change my encoder to use the libx264 (in order to reduce the latency), the server still write the frames, but the client is facing problems with the sdp header, and more specifically, the media subsession does not seem to be initialized. Therefore, the client crashes.

    The thing is, when I dump the sdp header when using nvenc and libx264, it is actually the same in both case.

    Here is the code I have done to initialize my encoder :

    /*
       Init the codec that is used to encode the video.
       Init the output format context (aka RTSP uri).
    */
    FfmpegEncoder::FfmpegEncoder(char *url)
    {
       AVRational      tmp_time_base;
       AVDictionary*   options = NULL;

       this->pCodec = avcodec_find_encoder_by_name("libx264");
       if (this->pCodec == NULL)
           throw myExceptions("Error: Can't initialize the encoder. FfmpegEncoder.cpp l:9\n");

       this->pCodecCtx = avcodec_alloc_context3(this->pCodec);

       //Alloc output context
       if (avformat_alloc_output_context2(&outFormatCtx, NULL, "rtsp", url) < 0)
           throw myExceptions("Error: Can't alloc stream output. FfmpegEncoder.cpp l:17\n");

       this->st = avformat_new_stream(this->outFormatCtx, this->pCodec);
       this->st->id = this->outFormatCtx->nb_streams - 1;

       if (this->st == NULL)
           throw myExceptions("Error: Can't create stream . FfmpegEncoder.cpp l:22\n");

       //Define the framerate of the output. The numerator should stay 1. Denumerator is the framerate we are aiming for.

       tmp_time_base.num = 1;
       tmp_time_base.den = 60;

       //TODO : parse these values
       this->pCodecCtx->bit_rate = 5000000;
       this->pCodecCtx->width = 1280;
       this->pCodecCtx->height = 720;
       //This set the fps. 60fps at this point.
       this->pCodecCtx->time_base = tmp_time_base;
       this->st->time_base = tmp_time_base;
       //Add a intra frame every 12 frames
       this->pCodecCtx->gop_size = 10;
       this->pCodecCtx->pix_fmt = AV_PIX_FMT_YUV420P;

       av_opt_set(this->pCodecCtx, "tune", "zerolatency", 0);
       av_opt_set(this->pCodecCtx, "vprofile", "main", 0);
       av_opt_set(this->pCodecCtx, "preset", "faster", 0);

       //Open Codec, using the context + x264 options
       if (avcodec_open2(this->pCodecCtx, this->pCodec, &options) < 0)
           throw myExceptions("Error: Can't open the codec. FfmpegEncoder.cpp l:43\n");

       if (avcodec_copy_context(this->st->codec, this->pCodecCtx) != 0) {
           throw myExceptions("Error : Can't copy codec context. FfmpegEncoder.cpp : l.46");
       }
       av_dump_format(this->outFormatCtx, 0, url, 1);

       //write the header needed to start the stream.
       if (avformat_write_header(this->outFormatCtx, NULL) != 0)
           throw myExceptions("Error: failed to connect to RTSP server. FfmpegEncoder.cpp l:48\n");
    }