Recherche avancée

Médias (0)

Mot : - Tags -/diogene

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (42)

Sur d’autres sites (7783)

  • Timing breaks concatenating two identical videos after one has ATEMP/SETPTS altered

    25 mai 2019, par user3144514

    Video (B)
    Copy pasted and then doubled speed with Setpts and Atempo as Video (A)

    Concatenating them results in a video with the (A) portion playing at the expected 2x speed, but the (B) portion playing back at 1/2 speed.

    I am simply trying to speed up sections of video that are repetative and merge them back in.

    I have tried doing another round of SETPTS/ATEMPO with 1.0 values, but it doesn’t alter the outcome.

    I have also tried forcibly re-encoding A and B to ensure they match in formats, still no change.

    Speed Change

    ffmpeg -i source.mp4 -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" A.mp4

    Concatenation

    ffmpeg -i A.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts x1.ts
    ffmpeg -i B.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts x2.ts
    ffmpeg -i "concat:x1.ts|x2.ts" -c copy -bsf:a aac_adtstoasc C.mp4

    Do I need to use some other method to alter the playback rate without changing some internal timing value ?

    Or is there some way to fix the rates after adjusting SETPTS and ATEMPO so that the timing is restored ?

  • FFMPEG av_read_frame() return an I/O error (-5) ?

    7 mars 2019, par vominhtien961476

    I’m using ffmpeg library to capture screen (desktop). Everything works fine when I run my app in debug/release mode. The I/O error comes when this app run in c# window service mode (win 10 OS). I googled but still don’t know why the error come. In the service mode there is no problem when connecting to some rtsp link (Camera) except desktop capture.

    AVInputFormat * pAVInputFormat = av_find_input_format("gdigrab");
    if (pAVInputFormat != NULL)
    {
      int err = avformat_open_input(&pFormatCtx, "desktop", pAVInputFormat, NULL);
      if(err== 0)
      {
         err = av_read_frame(&pFormatCtx, &packet);
         if (err < 0)
         {
             char errs[AV_ERROR_MAX_STRING_SIZE];
             av_make_error_string(errs, AV_ERROR_MAX_STRING_SIZE, err );
             String^ errStr = gcnew String(errs);
             WriteLog("Error in function av_read_frame() return = " + errStr);
             return -1;
        }
      }
    }

  • libavformat/mpegtsenc : allow to set service_type in sdt

    2 février 2015, par dhead666
    libavformat/mpegtsenc : allow to set service_type in sdt
    

    This adds an option to set the service type in mpegts as defined in ETSI 300 468.

    I added what I believe are the most useful service types as pre defined values,
    the others can be sent by using their hexdecimal form directly (e.g. -mpegts_service_type digital_radio, -mpegts_service_type 0x07).

    I’ve been using this patch in order to pipe internet radio stream (originally as HLS/m3u8) from ffmpeg to tvheadend,
    when the service type set right tvheadend recognize the mpegts stream as a radio channel.

    The patch in its original form was written by linuxstb from freenode’s hts channel which allowed me pushing it upstream.

    This close issue 4118.

    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] doc/muxers.texi
    • [DH] libavformat/mpegtsenc.c