Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP

Autres articles (32)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Qu’est ce qu’un éditorial

    21 juin 2013, par

    Ecrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
    Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
    Vous pouvez personnaliser le formulaire de création d’un éditorial.
    Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)

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

  • Output video to both file and pipe : simultaneously using FFmpeg Libav

    27 mai 2022, par Hillel Rosensweig

    I have been trying to output video (from my webcam) simultaneously to both a file ('out.mkv') and pipe :
The file gets filtered frames, and the pipe : gets unfiltered rawvideo.
My frame rate is 30 fps. However, I am getting a far lower framerate in my file output.

    


    Attached is the while loop which reads packets and writes them to output :

    


    while (1) {
    av_read_frame(ifmt_ctx, packet);
    stream_index = packet->stream_index;
    StreamContext *stream = &file_stream_ctx[stream_index];
    av_packet_rescale_ts(packet,
                     ifmt_ctx->streams[stream_index]->time_base,
                     stream->dec_ctx->time_base);
    avcodec_send_packet(stream->dec_ctx, packet);

    while (ret >= 0) {
        avcodec_receive_frame(stream->dec_ctx, stream->dec_frame);
        stream->dec_frame->pts = stream->dec_frame->best_effort_timestamp;
        ret = filter_encode_write_frame(stream->dec_frame, stream_index,file_stream_ctx,file_filter_ctx, file_ofmt_ctx);
        ret = av_interleaved_write_frame(pipe_ofmt_ctx, packet);
    }
}


    


    'ifmt_ctx' is the AVFormatContext for the webcam.
'file_ofmt_ctx', is the AVFormatContext for the pipe for the output file, and pipe_ofmt_ctx is the AVFormatContext.
'file_stream_ctx' and 'file_filter_ctx' are the stream and filter contexts used for filtering and encoding the file output.

    


    My guess is that writing to the pipe is taking too long and not allowing the next packet to be read on time - causing a lower frame rate. Does that make sense ? If so - any suggestions on how to fix it ? (I tried using AVFMT_FLAG_NONBLOCK but it doesn't seem to help).

    


    Thanks
Hillel

    


  • Receiving multiple files from ffmpeg via subprocesses.PIPE

    11 avril 2022, par Per Plexi

    I am using ffmpeg to convert a video into images. These images are then processed by my Python program. Originally I used ffmpeg to first save the images to disk, then reading them one by one with Python.

    



    This works fine, but in an effort to speed up the program I am trying to skip the storage step and only work with the images in memory.

    



    I use the following ffmpeg and Python subproccesses command to pipe the output from ffmpeg to Python :

    



    command = "ffmpeg.exe -i ADD\\sg1-original.mp4 -r 1 -f image2pipe pipe:1"
pipe = subprocess.Popen(ffmpeg-command, stdout = subprocess.PIPE, stderr = subprocess.PIPE)
image = Image.new(pipe.communicate()[0])


    



    The image variable can then be used by my program. The problem is that if I send more than 1 image from ffmpeg all the data is stored in this variable. I need a way to separate the images. The only way I can think of is splitting on jpeg markers end of file (0xff, 0xd9). This works, but is unreliable.

    



    What have I missed regarding piping files with subproccesses. Is there a way to only read one file at a time from the pipeline ?

    


  • How to implement Seekbar for a video player playing FFmpeg pipe output in Flutter ?

    19 avril 2022, par Lins Louis

    I was about to create a video player that can play FFmpeg pipe output in flutter. Luckily i found a solution with Github project flutter-ffmpeg, Thanks @tanersener for this amazing project https://github.com/tanersener/flutter-ffmpeg

    


    Below I am mentioning the comment that helped me to achieve the feature i was looking for

    


    https://github.com/tanersener/flutter-ffmpeg/issues/92#issuecomment-606051974

    


    thanks, @reeckset also.

    


    BTW, my current issue is, that I didn't find any solution on how to seek my video player that plays a pipe output of ffmpeg. Is there anything I can do for implementing a Seekbar in my video player