Advanced search

Medias (1)

Tag: - Tags -/artwork

Other articles (111)

  • Le profil des utilisateurs

    12 April 2011, by

    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 November 2010, by

    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 (...)

  • XMP PHP

    13 May 2011, by

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

On other websites (14577)

  • getting black and white image after encoding

    16 May 2012, by user1310596

    I am trying to encode image using ffmpeg library and objective c. I am using following code but I am getting black and white image as the result. Is there something to do with pixel format(PIX_FMT)? Please help me so that I can get colored image.

    av_register_all();
    avcodec_init();
    avcodec_register_all();
    avformat_alloc_context();

    AVCodec *codec;
    AVCodecContext *ctx= NULL;
    int out_size, size, outbuf_size;
    AVFrame *picture;
    uint8_t *outbuf;
    unsigned char *flvdata = malloc(sizeof(unsigned char) * 30);


    outbuf_size = 200000;
    outbuf = malloc(outbuf_size);


    printf("Video encoding\n");

    codec = avcodec_find_encoder(CODEC_ID_FLV1);
    if (!codec) {
           fprintf(stderr, "codec not found\n");
           exit(1);
    }

    ctx= avcodec_alloc_context();
    picture= avcodec_alloc_frame();


    ctx->width = 320;
    ctx->height = 240;
    ctx -> sample_rate = 11025;
    ctx -> time_base.den = 1000;
    ctx -> time_base.num = 23976;
    ctx -> codec_id = CODEC_ID_FLV1;
    ctx -> codec_type = CODEC_TYPE_VIDEO;
    ctx->pix_fmt = PIX_FMT_YUV420P;

    if (avcodec_open(ctx, codec) < 0) {
           fprintf(stderr, "could not open codec\n");
           exit(1);
    }

    outbuf_size = 100000;
    outbuf = malloc(outbuf_size);
    size = ctx->width * ctx->height;

    AVFrame* outpic = avcodec_alloc_frame();
    int nbytes = avpicture_get_size(PIX_FMT_YUV420P, ctx->width, ctx->height);

    uint8_t* outbuffer = (uint8_t*)av_malloc(nbytes);

    fflush(stdout);

    int numBytes = avpicture_get_size(PIX_FMT_YUV420P, ctx->width, ctx->height);

    UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"0.jpg"]];
    CGImageRef newCgImage = [image CGImage];

    CGDataProviderRef dataProvider = CGImageGetDataProvider(newCgImage);
    CFDataRef bitmapData = CGDataProviderCopyData(dataProvider);
    long dataLength = CFDataGetLength(bitmapData);

    uint8_t *buffer = (uint8_t *)av_malloc(dataLength);
    buffer = (uint8_t *)CFDataGetBytePtr(bitmapData);

    for(int i = 0; i < dataLength; i++)
    {
           if((i + 1) % 16 == 1 && i != 1)
                   printf("\n");
           printf("%X\t",buffer[i]); // getting something different than the     actual hex value of the image
    }



    outpic -> pts = 0;        

    avpicture_fill((AVPicture*)picture, buffer, PIX_FMT_RGB8, ctx->width, ctx->height);

    avpicture_fill((AVPicture*)outpic, outbuffer, PIX_FMT_YUV420P, ctx->width, ctx->height);

    struct SwsContext* fooContext = sws_getContext(ctx->width, ctx->height,
                                                          PIX_FMT_RGB8,
                                                          ctx->width, ctx->height,
                                                          PIX_FMT_YUV420P,
                                                          SWS_FAST_BILINEAR, NULL, NULL, NULL);

    sws_scale(fooContext, picture->data, picture->linesize, 0, ctx->height, outpic->data, outpic->linesize);

    printf("abcdefghijklmnop");
    out_size = avcodec_encode_video(ctx, outbuf, outbuf_size, outpic);
    printf("\n\n out_size %d   outbuf_size %d",out_size,outbuf_size);

    Thanks in advance

  • FFmpeg: How to convert horizontal video 16:9 to vertical video 9:16, with Black background on top and bottom sides

    28 March 2019, by IbrahimCetin

    I wanted convert 16:9 video to 9:16 and find this:
    "FFmpeg: How to convert horizontal video 16:9 to vertical video 9:16, with blurred background on top and bottom sides"

    But I want video top and bottom sides black but I couldn’t. How can I do this?

    Thanks for your help

  • ffmpeg streaming from local drive to RTSP gives black video in some streaming services :(

    27 April 2022, by John R

    This question if about ffmpeg flags or options.....

    


    example, this ffmpeg command work perfectly well in mux.com but NOT in livepeer.com

    


        ffmpeg -re -i 1.webm -threads 4 
-c:v libx264 -movflags +dash -preset fast 
-tune zerolatency -pix_fmt yuv420p -c:a aac 
-b:a 192k -ac 2 -profile:v high -b:v 1369k 
-r 30 -g 60 -bufsize 969k 
-f flv "rtmp://rtmp.livepeer.com/live/streamkey"


    


    enter image description here

    


    QUESTION : I'm I missing something ???

    


    I try -f mpegts => I get black video in the stream dasboard

    


    I'm stuck...