Recherche avancée

Médias (91)

Autres articles (75)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

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

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

Sur d’autres sites (10323)

  • pyInstaller : Pack binary executable inside project's executable to run

    18 décembre 2023, par zur

    TLDR ;

    


    I would like to pack the ffmpeg executable inside my own executable. Currently I am getting

    


    FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'
Skipping ./testFile202312061352.mp4 due to FileNotFoundError: [Errno 2] No such file or directory: 'ffmpeg'


    


    Details :

    


    I am creating executable file using following command :

    


    pyinstaller cli.py \&#xA;  --onefile \&#xA;  --add-binary /Users/<machineuser>/anaconda3/envs/my_env/bin/ffmpeg:bin&#xA;</machineuser>

    &#xA;

    The code that uses ffmpeg is not authored by me. And I would like to keep that part the same.

    &#xA;

    When I run from command line while conda environment is active I can successfully run it as python (or perhaps anaconda) knows where the binaries are. I have a pretty empty cli.py. That seems to be the entry point and I hope if it is possible I can set the bin directory's path there ...

    &#xA;

    I am able to successfully run the application like following :

    &#xA;

    (my_env) machineUser folder % "dist/cli_mac_001202312051431" ./testFile202312061352.mp4&#xA;

    &#xA;

    I would like to run like following :

    &#xA;

    (base) machineUser folder % "dist/cli_mac_001202312051431" ./testFile202312061352.mp4&#xA;

    &#xA;

    I would like to keep the world out side my executable's tmp folder the same. I would not want to change something that will be "left behind" after the exec is terminated.

    &#xA;

    Question :

    &#xA;

    Can some one please mention how to modify the pyinstaller command or what to change in cli.py to achieve it successfully ?

    &#xA;

  • How to write a text in a frame using ffmpeg

    21 février 2024, par Jorge Augusto Wilchen

    I need to write a text in every frame before write in the video file, this text will be passed as a argument (std::string or char, whatever you want to best solution). For example, write "Hello World" 24px, color yellow, position 30x30.

    &#xA;

    How can i do this ?

    &#xA;

    This is my function that read frames to a AVPacket and write in the video file :

    &#xA;

    bool VideoRecorder::record_video()&#xA;{&#xA;    if (recording) {&#xA;        AVPacket packet;&#xA;&#xA;        while (recording &amp;&amp; av_read_frame(inputFormatContext, &amp;packet) >= 0) {&#xA;            AVStream* in_stream = inputFormatContext->streams[packet.stream_index];&#xA;            AVStream* out_stream = outputFormatContext->streams[0];&#xA;&#xA;            // Adjustment of DTS and PTS to ensure increasing monoticity&#xA;            if (packet.pts != AV_NOPTS_VALUE) {&#xA;                packet.pts = av_rescale_q_rnd(packet.pts, in_stream->time_base, out_stream->time_base, AVRounding(AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX));&#xA;            }&#xA;&#xA;            if (packet.dts != AV_NOPTS_VALUE) {&#xA;                packet.dts = av_rescale_q_rnd(packet.dts, in_stream->time_base, out_stream->time_base, AVRounding(AV_ROUND_NEAR_INF | AV_ROUND_PASS_MINMAX));&#xA;            }&#xA;&#xA;            packet.duration = av_rescale_q(packet.duration, in_stream->time_base, out_stream->time_base);&#xA;&#xA;            packet.stream_index = 0;&#xA;&#xA;            av_interleaved_write_frame(outputFormatContext, &amp;packet);&#xA;&#xA;            av_packet_unref(&amp;packet);&#xA;        }&#xA;&#xA;&#xA;        return true;&#xA;    }&#xA;&#xA;    std::cerr &lt;&lt; "Error recording video. Recording not started or already stopped." &lt;&lt; std::endl;&#xA;    return false;&#xA;}&#xA;

    &#xA;

  • How can I get start time of rtsp-sesson via ffmpeg (C++) ? start_time_realtime always equal -9223372036854775808

    5 août 2019, par chuchuchu

    I’m trying to get a frame by rtsp and calculate its real-world timestamp. I previously used Live555 for this (presentationTime).

    As far as I understand, ffmpeg does not provide such functionality, but provides the ability to read the relative time of each frame and the start time of the stream. In my case, the frame timestamps (pts) works correctly, but the stream start time (start_time_realtime) is always -9223372036854775808.

    I’m trying to use simple example from this Q : https://stackoverflow.com/a/11054652/5355846

    Value does not change. regardless of the position in the code

    int main(int argc, char** argv) {
       // Open the initial context variables that are needed
       SwsContext *img_convert_ctx;
       AVFormatContext* format_ctx = avformat_alloc_context();
       AVCodecContext* codec_ctx = NULL;
       int video_stream_index;

       // Register everything
       av_register_all();
       avformat_network_init();

       //open RTSP
       if (avformat_open_input(&amp;format_ctx, "path_to_rtsp_stream",
                               NULL, NULL) != 0) {
           return EXIT_FAILURE;
       }
       ...
    }
    while (av_read_frame(format_ctx, &amp;packet) >= 0 &amp;&amp; cnt &lt; 1000) { //read ~ 1000 frames

           //// here!
           std::cout&lt;&lt; " ***** "
           &lt;&lt; std::to_string(format_ctx->start_time_realtime)
           &lt;&lt; " | "&lt;start_time
           &lt;&lt; " | "&lt;best_effort_timestamp;

    ...
    }

    ***** -9223372036854775808 | 0 | 4120 | 40801 Frame : 103

    What am I doing wrong ?