Recherche avancée

Médias (5)

Mot : - Tags -/open film making

Autres articles (97)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

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

  • Terminal output text into pandas dataframe without creating external file

    23 février 2018, par helmo

    I am using ffmpeg’s extract_mvs file to generate some text information. I would use a command like this in the terminal :

    /extract_mvs input.mp4 > output.txt

    I would like to use this command with Popen or other subprocess in python such that instead of output.txt, the data is passed straight to a pandas data frame without actually generating the text file.

    The idea is to automate this multiple times, so, I am trying to avoid many .txt files from being generated and thus having to open() them one by one.

    I thought of something like this :

    import subprocess
    cmd = ['./extract_mvs', 'input.mp4']
    a = subprocess.Popen(cmd, stdout=subprocess.PIPE)
    df = pd.read_csv(a.communicate()[0], sep=',')

    But then I get an error : OSError: Expected file path name or file-like object, got <class> type</class>

    Can it be fixed and extended so as to read straight from subprocess to pandas ?

  • libavcodec/h264_sei : Don't log random user data. This prevents terminal junk.

    5 mai 2017, par Kieran Kunhya
    libavcodec/h264_sei : Don't log random user data. This prevents terminal junk.
    
    • [DH] libavcodec/h264_sei.c
  • Minimal sample of muxing two streams with no reencoding (av_interleaved_write_frame fails)

    19 juillet 2022, par Alvein

    What I'm trying to do : having two files, one is video-only and the other is audio-only, with identical durations, I want to "join" them in a single container.

    &#xA;

    I previously made a routine which just copied all the streams inside a container to another one. No reencoding, etc. This works perfectly :

    &#xA;

    while(true) {&#xA;    pkIn=av_packet_alloc();&#xA;    if(NULL==pkIn) {&#xA;        fprintf(stderr,"av_packet_alloc() failed");&#xA;        break;&#xA;    }&#xA;    iError=av_read_frame(fcIn,pkIn);&#xA;    if(0>iError)&#xA;        if(AVERROR_EOF==iError)&#xA;            break;&#xA;        else {&#xA;            fprintf(stderr,"av_read_frame() failed");&#xA;            break;&#xA;        }&#xA;    stIn=fcIn->streams[pkIn->stream_index];&#xA;    stOut=fcOut->streams[pkIn->stream_index];&#xA;    log_packet(fcIn,pkIn,"in");&#xA;    av_packet_rescale_ts(pkIn,stIn->time_base,stOut->time_base);&#xA;    pkIn->pos=-1;&#xA;    log_packet(fcOut,pkIn,"out");&#xA;    iError=av_interleaved_write_frame(fcOut,pkIn);&#xA;    if(0>iError) {&#xA;        fprintf(stderr,"av_interleaved_write_frame() failed");&#xA;        break;&#xA;    }&#xA;    av_packet_free(&amp;pkIn);&#xA;}&#xA;

    &#xA;

    I just did the analogy and tried to do the same, but taking each stream from a distinct container, like this :

    &#xA;

    while(true) {&#xA;    if(!bVideoInEOF) {&#xA;        pkVideoIn=av_packet_alloc();&#xA;        if(NULL==pkVideoIn) {&#xA;            fprintf(stderr,"av_packet_alloc(video in) failed");&#xA;            break;&#xA;        }&#xA;        iError=av_read_frame(fcVideoIn,pkVideoIn);&#xA;        if(0>iError)&#xA;            if(AVERROR_EOF==iError)&#xA;                bVideoInEOF=true;&#xA;            else {&#xA;                fprintf(stderr,"av_read_frame(video in) failed");&#xA;                break;&#xA;            }&#xA;        if(!bVideoInEOF) {&#xA;            log_packet(fcVideoIn,pkVideoIn,"video in");&#xA;            av_packet_rescale_ts(pkVideoIn,stVideoIn->time_base,stVideoOut->time_base);&#xA;            pkVideoIn->pos=-1;&#xA;            pkVideoIn->stream_index=stVideoOut->index; // Edit (2022-07-19)&#xA;            log_packet(fcVideoIn,pkVideoIn,"video out");&#xA;            iError=av_interleaved_write_frame(fcOut,pkVideoIn);&#xA;            if(0>iError) {&#xA;                fprintf(stderr,"av_interleaved_write_frame(video out) failed");&#xA;                break;&#xA;            }&#xA;        }&#xA;        av_packet_free(&amp;pkVideoIn);&#xA;    }&#xA;    if(!bAudioInEOF) {&#xA;        pkAudioIn=av_packet_alloc();&#xA;        if(NULL==pkAudioIn) {&#xA;            fprintf(stderr,"av_packet_alloc(audio in) failed");&#xA;            break;&#xA;        }&#xA;        iError=av_read_frame(fcAudioIn,pkAudioIn);&#xA;        if(0>iError)&#xA;            if(AVERROR_EOF==iError)&#xA;                bAudioInEOF=true;&#xA;            else {&#xA;                fprintf(stderr,"av_read_frame(audio in) failed");&#xA;                break;&#xA;            }&#xA;        if(!bAudioInEOF) {&#xA;            log_packet(fcAudioIn,pkAudioIn,"audio in");&#xA;            av_packet_rescale_ts(pkAudioIn,stAudioIn->time_base,stAudioOut->time_base);&#xA;            pkAudioIn->pos=-1;&#xA;            pkAudioIn->stream_index=stAudioOut->index; // Edit (2022-07-19)&#xA;            log_packet(fcAudioIn,pkAudioIn,"audio out");&#xA;            iError=av_interleaved_write_frame(fcOut,pkAudioIn);&#xA;            if(0>iError) {&#xA;                fprintf(stderr,"av_interleaved_write_frame(audio out) failed");&#xA;                break;&#xA;            }&#xA;        }&#xA;        av_packet_free(&amp;pkAudioIn);&#xA;    }&#xA;    if(bVideoInEOF&amp;&amp;bAudioInEOF)&#xA;        break;&#xA;}&#xA;

    &#xA;

    I know the previous code looks like redundant but I wanted to leave both streams "processing" separated the way you understand my plans.

    &#xA;

    Anyway, that code ends quickly with "av_interleaved_write_frame(audio out) failed".

    &#xA;

    The error detail is "Invalid argument", and the debugger shows this :

    &#xA;

    &#xA;

    Application provided invalid, non monotonically increasing dts to&#xA;muxer in stream 0.

    &#xA;

    &#xA;

    If I disable any of the main blocks "if(!bVideoInEOF)" / "if(!bAudioInEOF)", the file is written successfully, with the obvious lack of the disabled stream.

    &#xA;

    I'm new into using this library so probably I'm doing something really stupid, or missing something obvious.

    &#xA;

    Suggestions ?

    &#xA;

    Edit (2022-07-19) :

    &#xA;

    By checking the logs, I noticed I was writing every frame to the stream #0. Hence, the horrible jumps in PTS/DTS.

    &#xA;

    Code edited by adding the corresponding "...->stream_index=" before each call to av_interleaved_write_frame().

    &#xA;

    ...

    &#xA;

    Though it works, I still think my code is far from perfect. Comments are welcome.

    &#xA;