Recherche avancée

Médias (0)

Mot : - Tags -/content

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

Autres articles (80)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

Sur d’autres sites (8690)

  • Interplay MVE : Implement frame format 0x10

    25 juin 2017, par Hein-Pieter van Braam
    Interplay MVE : Implement frame format 0x10
    

    This implements the 0x10 frame format for Interplay MVE movies. The
    format is a variation on the 0x06 format with some changes. In addition
    to the decoding map there's also a skip map. This skip map is used to
    determine what 8x8 blocks can change in a particular frame.

    This format expects to be able to copy an 8x8 block from before the last
    time it was changed. This can be an arbitrary time in the past. In order
    to implement this this decoder allocates two additional AVFrames where
    actual decoding happens. At the end of a frame decoding changed blocks
    are copied to a finished frame based on the skip map.

    The skip map's encoding is a little convulted, I'll refer to the code
    for details.

    Values in the decoding map are the same as in format 0x06.

    Signed-off-by : Hein-Pieter van Braam <hp@tmm.cx>

    • [DH] libavcodec/interplayvideo.c
    • [DH] libavformat/ipmovie.c
  • How can I reencode a video to match another's codec exactly ?

    24 janvier 2020, par Stephen Schrauger

    When I’m on vacation, I usually use our camcorder to record videos. Since they’re all the same format, I can use ffmpeg to concat them into one large, smooth video without re-encoding.

    However, sometimes I will use a phone or other camera to record a video (if the camcorder ran out of space/battery or was left at a hotel).

    I’d like to determine the codec, framerate, etc used by my camcorder and use those parameters to convert the phone vidoes into the same format. That way, I will be able to concatonate all the videos without re-encoding the camcorder videos.

    Using ffprobe, I found my camcorder has this encoding :

     Input #0, mpegts, from 'camcorderfile.MTS':
     Duration: 00:00:09.54, start: 1.936367, bitrate: 24761 kb/s
     Program 1
       Stream #0:0[0x1011]: Video: h264 (High) (HDPR / 0x52504448), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
       Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s
       Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090), 1920x1080

    The phone (iPhone 5s) encoding is :

     Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'mov.MOV':
     Metadata:
       major_brand     : qt  
       minor_version   : 0
       compatible_brands: qt  
       creation_time   : 2017-01-02T03:04:05.000000Z
       com.apple.quicktime.location.ISO6709: +12.3456-789.0123+456.789/
       com.apple.quicktime.make: Apple
       com.apple.quicktime.model: iPhone 5s
       com.apple.quicktime.software: 10.2.1
       com.apple.quicktime.creationdate: 2017-01-02T03:04:05-0700
     Duration: 00:00:14.38, start: 0.000000, bitrate: 11940 kb/s
       Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 11865 kb/s, 29.98 fps, 29.97 tbr, 600 tbn, 1200 tbc (default)
       Metadata:
         creation_time   : 2017-01-02T03:04:05.000000Z
         handler_name    : Core Media Data Handler
         encoder         : H.264
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 63 kb/s (default)
       Metadata:
         creation_time   : 2017-01-02T03:04:05.000000Z
         handler_name    : Core Media Data Handler
       Stream #0:2(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
       Metadata:
         creation_time   : 2017-01-02T03:04:05.000000Z
         handler_name    : Core Media Data Handler
       Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default)
       Metadata:
         creation_time   : 2017-01-02T03:04:05.000000Z
         handler_name    : Core Media Data Handler

    I’m presuming that ffmpeg will automatically take any acceptable video format, and that I only need to figure out the output settings. I think I need to use -s 1920x1080 and -pix_fmt yuv420p for the output, but what other flags do I need in order to make the phone video into the same encoding as the camcorder video ?

    Can I get some pointers as to how I can translate the ffprobe output into the flags I need to give to ffmpeg ?

    Edit : Added the entire Input #0 for both media files.

  • AV_PIX_FMT_YUVJ422P to jpeg conversion

    4 mars 2019, par user3743908

    i am able to convert image from AV_PIX_FMT_YUVJ422P to jpeg format (below Code) but the resultant image having green shade on complete bottom half plz suggest where i am doing wrong.
    Following step i have taken

    1. Initially i have AV_PIX_FMT_UYVY422 image from camera, i have convert it in AV_PIX_FMT_YUVJ422P format and able to see this image on http://rawpixels.net/ the parameters shown by website is size 2448X2050, Bpp1= 8,Bpp2 = 8 and Bpp3 = 8,alignment 1, SubSampling H =2, and SubSampling V = 1, format : YUV422P
      so input image is Correct AV_PIX_FMT_YUVJ422P format. & also able to see on "YUV image viewer Software" using YUV422 format.

    2. Now i am trying to convert it in jpeg format using below Code and attached is the resultant Image having green shade on complete bottom half.

         AVFormatContext*    pFormatCtx;
         AVOutputFormat*     fmt;
         AVStream*           video_st;
         AVCodecContext*     pCodecCtx;
         AVCodec*            pCodec;

         uint8_t*            picture_buf;
         AVFrame*            picture;
         AVPacket            pkt;
         int                 y_size;
         int                 size;
         int                 got_picture=0;  
         int                 ret=0;

      int main( int argc, char* argv[] )
      {

         FILE *in_file                       =   NULL;  
         unsigned int        in_width        =   2448;    
         unsigned int        in_height       =   2050;  
         const char* out_file                =   "encoded_pic.jpg";    


             in_file =   fopen("c:\\test_Planar.yuv","rb");
             if(in_file == NULL) { printf("\n\tFile Opening error...!!"); exit(1); }
             else printf("\n\tYUV File Open Sucessfully...!!\n\n");

             av_register_all();  // Loads the whole database of available codecs and formats.

             pFormatCtx          =   avformat_alloc_context();          
             fmt             =   NULL;
             fmt             =   av_guess_format("mjpeg",NULL,NULL);
             pFormatCtx->oformat     =   fmt;

      //------Output URL-------------------------
      if (avio_open(&amp;pFormatCtx->pb,out_file, AVIO_FLAG_READ_WRITE) &lt; 0)
      {
         printf("Couldn't open output file.");
         return -1;
      }

      video_st = avformat_new_stream(pFormatCtx, 0);    
      if (video_st==NULL)        return -1;


      pCodecCtx               =   video_st->codec;
      pCodecCtx->codec_id     =   fmt->video_codec;
      pCodecCtx->codec_type   =   AVMEDIA_TYPE_VIDEO;
      pCodecCtx->pix_fmt      =   AV_PIX_FMT_YUVJ422P;

      //--------------------------MY SOURCE PIXEL FORMAT--------------

      pCodecCtx->width        =   in_width;
      pCodecCtx->height       =   in_height;

      pCodecCtx->time_base.num = 1;
      pCodecCtx->time_base.den = 1;//25;

      //Output some information
      av_dump_format(pFormatCtx, 0, out_file, 1);

      // Determine if desired video encoder is installed
      pCodec = avcodec_find_encoder(pCodecCtx->codec_id);

      if (!pCodec)
      {
         printf("Codec not found.");
         return -1;
      }

      printf("\nCodec Identified done\n");

      if (avcodec_open2(pCodecCtx, pCodec,NULL) &lt; 0){
         printf("Could not open codec.\n");
         return -1;
      }
      picture     =   av_frame_alloc();
      size            =   avpicture_get_size(pCodecCtx->pix_fmt, pCodecCtx->width, pCodecCtx->height);
      picture_buf     =   (uint8_t *)av_malloc(size);
      if (!picture_buf)    return -1;

      avpicture_fill((AVPicture *)picture, picture_buf, pCodecCtx->pix_fmt, pCodecCtx->width, pCodecCtx->height);

      printf("\t\nWrite Header..");
      avformat_write_header(pFormatCtx,NULL);
      y_size = pCodecCtx->width * pCodecCtx->height;
      av_new_packet(&amp;pkt,y_size*3);


      //Read YUV
      if (fread(picture_buf, 1, y_size*3/2, in_file) &lt;=0)
      {
         printf("Could not read input file.");
         return -1;
      }
      //--------------------------------------------input image format UYVY
      picture->data[0] = picture_buf;             // Y
      picture->data[1] = picture_buf+ y_size;         // U
      picture->data[2] = picture_buf+ y_size*5/4;     // V
      //-----------------------------------------------

      printf("\t\n Encode the image..\n");
      ret = avcodec_encode_video2(pCodecCtx, &amp;pkt,picture, &amp;got_picture);
      if(ret &lt; 0)
      {
         printf("Encode Error.\n");
         return -1;
      }

      if (got_picture==1)
      {
         pkt.stream_index = video_st->index;
         ret = av_write_frame(pFormatCtx, &amp;pkt);
      }

      av_free_packet(&amp;pkt);
      //Write Trailer
      av_write_trailer(pFormatCtx);    
      printf("Encode Successful.\n");

      if (video_st)
      {
         avcodec_close(video_st->codec);
         av_free(picture);
         av_free(picture_buf);
      }

      avio_close(pFormatCtx->pb);
      avformat_free_context(pFormatCtx);    

         fclose(in_file);
         printf("\n\tYUV File Close Sucessfully...!!");    
      }

    Resultant output jpeg encoded image from yuvj422p image having green shade