Recherche avancée

Médias (1)

Mot : - Tags -/net art

Autres articles (111)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • 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

Sur d’autres sites (9801)

  • avcodec/decode : Update decode_simple_internal() to get the side data correctly.

    14 juin 2017, par John Rummell
    avcodec/decode : Update decode_simple_internal() to get the side data correctly.
    

    Use avci->last_pkt_props to get the side data. Using |pkt| doesn't work
    when FF_API_MERGE_SD is set, as the compressed side data is expanded into
    |tmp|, leaving the original |pkt| unchanged.

    Signed-off-by : James Almer <jamrial@gmail.com>

    • [DH] libavcodec/decode.c
  • How to read file from"/data/user/0com.package.name/files/ffmpeg" ? in Android ?

    4 septembre 2021, par Thriller Mobiles

    How to read file from "/data/user/0com.package.name/files/ffmpeg" in Android ? I'm using FFMPEG lib version 2.4.2 with com.github.hiteshsondhi88 this reference.

    &#xA;

  • ffmpeg av_read_frame "Invalid data found"

    26 mai 2017, par DweebsUnited

    I am using ffmpeg to cut part of a file, following the remux example provided. However, I am having issues reading from files. I am given a file descriptor as input and an output filename, and can successfully set up the output file, read the stream info, copy all the streams, etc, etc. On the first call to av_read_frame though, I get an "Invalid data found when processing input" error. I have tried this with many different video files, and have not been able to get a single one to process correctly.

    Here is my code. I get no errors anywhere, except av_read_frame, which gives Invalid data found no matter what video file I give it.

    char path[512];
    sprintf(path, "pipe:%d", fileno(fp));


    AVOutputFormat *ofmt = NULL;
    AVFormatContext *ifmt_ctx = avformat_alloc_context(), *ofmt_ctx = NULL;
    AVPacket pkt;
    int ret, i;

    av_register_all();
    avcodec_register_all();

    if ((ret = avformat_open_input(&amp;ifmt_ctx, path, av_find_input_format("mp4"), NULL)) &lt; 0) {
       LOG("Could not open input file '%s'", path);
       goto end;
    }

    if ((ret = avformat_find_stream_info(ifmt_ctx, 0)) &lt; 0) {
       LOG("Failed to retrieve input stream information", "");
       goto end;
    }

    avformat_alloc_output_context2(&amp;ofmt_ctx, NULL, NULL, out_filename);
    if (!ofmt_ctx) {
       LOG("Could not create output context\n");
       ret = AVERROR_UNKNOWN;
       goto end;
    }

    ofmt = ofmt_ctx->oformat;

    for (i = 0; i &lt; ifmt_ctx->nb_streams; i++) {
       AVStream *in_stream = ifmt_ctx->streams[i];
       AVStream *out_stream = avformat_new_stream(ofmt_ctx, in_stream->codec->codec);

       if (!out_stream) {
           LOG("Failed allocating output stream\n");
           goto end;
       }

       ret = avcodec_parameters_copy(out_stream->codecpar, in_stream->codecpar);
       if (ret &lt; 0) {
           LOG("Failed to copy context from input to output stream codec context\n");
           goto end;
       }
       out_stream->codecpar->codec_tag = 0;
    }

    if (!(ofmt->flags &amp; AVFMT_NOFILE)) {
       ret = avio_open(&amp;ofmt_ctx->pb, out_filename, AVIO_FLAG_WRITE);
       if (ret &lt; 0) {
           LOG("Could not open output file '%s'", out_filename);
           goto end;
       }
    }

    ret = avformat_write_header(ofmt_ctx, NULL);
    if (ret &lt; 0) {
       LOG("Error occurred when opening output file\n");
       goto end;
    }

    //    int indexs[8] = {0};

    //    int64_t start_from = 8*AV_TIME_BASE;
    ret = av_seek_frame(ifmt_ctx, -1, from_seconds*AV_TIME_BASE, AVSEEK_FLAG_ANY);
    if (ret &lt; 0) {
       LOG("Error seek\n");
       goto end;
    }

    int64_t *dts_start_from;
    int64_t *pts_start_from;
    dts_start_from = (int64_t *) malloc(sizeof(int64_t) * ifmt_ctx->nb_streams);
    memset(dts_start_from, 0, sizeof(int64_t) * ifmt_ctx->nb_streams);
    pts_start_from = (int64_t *) malloc(sizeof(int64_t) * ifmt_ctx->nb_streams);
    memset(pts_start_from, 0, sizeof(int64_t) * ifmt_ctx->nb_streams);

    while (1) {
       AVStream *in_stream, *out_stream;

       ret = av_read_frame(ifmt_ctx, &amp;pkt);
       if (ret &lt; 0)
           break;

       in_stream = ifmt_ctx->streams[pkt.stream_index];
       out_stream = ofmt_ctx->streams[pkt.stream_index];

       if (av_q2d(in_stream->time_base) * pkt.pts > end_seconds) {
           av_packet_unref(&amp;pkt);
           break;
       }

       if (dts_start_from[pkt.stream_index] == 0)
           dts_start_from[pkt.stream_index] = pkt.dts;
       if (pts_start_from[pkt.stream_index] == 0)
           pts_start_from[pkt.stream_index] = pkt.pts;

       /* copy packet */
       pkt.pts = ::av_rescale_q_rnd(pkt.pts - pts_start_from[pkt.stream_index], in_stream->time_base, out_stream->time_base, (AVRounding) (AV_ROUND_NEAR_INF |
                                                                                                                                           AV_ROUND_PASS_MINMAX));
       pkt.dts = ::av_rescale_q_rnd(pkt.dts - dts_start_from[pkt.stream_index], in_stream->time_base, out_stream->time_base, (AVRounding) (AV_ROUND_NEAR_INF |
                                                                                                                                           AV_ROUND_PASS_MINMAX));
       if (pkt.pts &lt; 0) {
           pkt.pts = 0;
       }
       if (pkt.dts &lt; 0) {
           pkt.dts = 0;
       }
       pkt.duration = (int) av_rescale_q((int64_t) pkt.duration, in_stream->time_base, out_stream->time_base);
       pkt.pos = -1;

       ret = av_interleaved_write_frame(ofmt_ctx, &amp;pkt);
       if (ret &lt; 0) {
           LOG("Error muxing packet\n");
           break;
       }
       av_packet_unref(&amp;pkt);
    }
    free(dts_start_from);
    free(pts_start_from);

    av_write_trailer(ofmt_ctx);

    end:
    LOG("END");

    avformat_close_input(&amp;ifmt_ctx);

    /* close output */
    if (ofmt_ctx &amp;&amp; !(ofmt->flags &amp; AVFMT_NOFILE))
       avio_closep(&amp;ofmt_ctx->pb);
    avformat_free_context(ofmt_ctx);

    if (ret &lt; 0 &amp;&amp; ret != AVERROR_EOF) {
       LOG("-- Error occurred: %s\n", av_err2str(ret));
       return 1;
    }

    Thank you for any help, I’m still getting used to ffmpeg. Did I miss some setting on the input ? Am I not setting something up that I need to be ? This problem is really stumping me.