Recherche avancée

Médias (1)

Mot : - Tags -/pirate bay

Autres articles (51)

  • 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.

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (8300)

  • ffmpeg muxing time getting an error

    5 février 2017, par Asif Shariar

    i am getting error when i muxing a file ,i try to mux a file i use muxing example , but i always geting an error in ret does not meet ffmpeg ptr value ,

    is use this code

    OutputStream video_st = { 0 }, audio_st = { 0 };
    const char *filename;
    AVOutputFormat *fmt;
    AVFormatContext *oc;
    AVCodec *audio_codec = nullptr, *video_codec = nullptr;
    int ret;
    int have_video = 0, have_audio = 0;
    int encode_video = 0, encode_audio = 0;
    AVDictionary *opt = NULL;
    int i;

    /* Initialize libavcodec, and register all codecs and formats. */
    av_register_all();



    filename = "C:/Users/Admin/Desktop/Videotest/_test.mp4";

    /* allocate the output media context */
    avformat_alloc_output_context2(&oc, NULL, NULL, filename);
    if (!oc) {
       printf("Could not deduce output format from file extension: using MPEG.\n");
       avformat_alloc_output_context2(&oc, NULL, "mpeg", filename);
    }
    if (!oc) {
       exit;
    }


    fmt = oc->oformat;

    /* Add the audio and video streams using the default format codecs
    * and initialize the codecs. */
    if (fmt->video_codec != AV_CODEC_ID_NONE) {
       add_stream(&video_st, oc, &video_codec, fmt->video_codec);
       have_video = 1;
       encode_video = 1;
    }
    if (fmt->audio_codec != AV_CODEC_ID_NONE) {
       add_stream(&audio_st, oc, &audio_codec, fmt->audio_codec);
       have_audio = 1;
       encode_audio = 1;
    }

    /* Now that all the parameters are set, we can open the audio and
    * video codecs and allocate the necessary encode buffers. */
    if (have_video)
       open_video(oc, video_codec, &video_st, opt);

    if (have_audio)
       open_audio(oc, audio_codec, &audio_st, opt);

    av_dump_format(oc, 0, filename, 1);

    /* open the output file, if needed */
    if (!(fmt->flags & AVFMT_NOFILE)) {
       ret = avio_open(&oc->pb, filename, AVIO_FLAG_WRITE);
       if (ret < 0) {
           exit;
       }
    }

    /* Write the stream header, if any. */
    ret = avformat_write_header(oc, &opt);
    if (ret < 0) {
       exit;
    }

    while (encode_video || encode_audio) {
       /* select the stream to encode */
       if (encode_video &&
           (!encode_audio || av_compare_ts(video_st.next_pts, video_st.enc->time_base,
               audio_st.next_pts, audio_st.enc->time_base) <= 0)) {
           encode_video = !write_video_frame(oc, &video_st);
       }
       else {
           encode_audio = !write_audio_frame(oc, &audio_st);
       }
    }

    /* Write the trailer, if any. The trailer must be written before you
    * close the CodecContexts open when you wrote the header; otherwise
    * av_write_trailer() may try to use memory that was freed on
    * av_codec_close(). */
    av_write_trailer(oc);

    /* Close each codec. */
    if (have_video)
       close_stream(oc, &video_st);
    if (have_audio)
       close_stream(oc, &audio_st);

    if (!(fmt->flags & AVFMT_NOFILE))
       /* Close the output file. */
       avio_closep(&oc->pb);

    /* free the stream */
    avformat_free_context(oc);

    error logs

    av_log(s, AV_LOG_ERROR, "muxer does not support non seekable output\n");

    error getting here

    /* Write the stream header, if any. */
    ret = avformat_write_header(oc, &opt);

    how can i fix this error

  • FFMPEG : av_interleaved_write_frame() : Connection reset by peer

    9 mars 2017, par mrcatmann

    I try to broadcast a video from one of my servers to a RTMP server based on NGINX-RTMP. But sometimes there are reconnects because of bad network on RTMP server, and then ffmpeg gives me errors like

    av_interleaved_write_frame(): Connection reset by peer
    [flv @ 0x30351a0] Failed to update header with correct duration.
    [flv @ 0x30351a0] Failed to update header with correct filesize.
    Error writing trailer of (address): Connection reset by peer"

    Tried to use "reconnect" command, but it didn’t help me. The full FFMPEG command is :

    ffmpeg -reconnect 1 -reconnect_at_eof 1 -reconnect_streamed 1 -reconnect_delay_max 4274 -re -i "(file)" -s 640x360 -aspect 16:9  -c copy -f flv "(stream address)"

    Is there a way to bypass this ? I can’t play the same video from the beginning in this situation, it needs to be continued from the same point.

  • ffmpeg video stream output multiply when I modify viedo in OpenCV

    30 mars 2017, par trojek

    I try to implement a proof of concept program which : (1)get video from webcam, (2)do some operations on it, (3)stream modified video on a web page.

    I do it as follows :

    1) In open CV : open webcam stream and output frames as a rawvideo, capture.py looks :

     import cv2
     import sys

     cap = cv2.VideoCapture(0)
     while(cap.isOpened()):
       ret, frame = cap.read()
       if(ret):
         sys.stdout.write(frame.tostring())
       else:
         break

    2) Run ffmpeg server by execute : python2 capture.py | ffmpeg -framerate 30 -f rawvideo -pixel_format bgr24 -video_size 640x480 -i - -f mpegts -codec:v mpeg1video -s 640x480 -b:v 2500k -bf 0 http://localhost:8081/supersecret

    3) Run Websocket relay and http-server according to the instruction on page : https://github.com/phoboslab/jsmpeg, in order to stream video in a browser.

    I get the stream in browser, but when I apply any change(e.g. frame = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)) on the frame inside capture.py file I get 9 small stream instead of one.enter image description here

    The same situation occurs when I change video resolution while starting ffmpeg server. When I stream directly from /dev/video0 insted of pipe I get the proper stream.

    How can I do some operations on the video and get the single image stream ?