Recherche avancée

Médias (29)

Mot : - Tags -/Musique

Autres articles (55)

  • Soumettre améliorations et plugins supplémentaires

    10 avril 2011

    Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
    Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (6338)

  • ffmpeg how to set max_num_reorder_frames H264

    14 mai, par Vasil Yordanov

    Anyone know how can I set max_num_reorder_frames to 0 when I am encoding H264 video ?
You can find in the docs as uint8_t H264RawVUI::bitstream_restriction_flag

    


    PS. Based on the discussion in the comments. What I actually want to accomplish is to have all the frames written in the order in which they were encoded. My use-case is - I have 1000 images for example. I encode each one of them using the codec, but then when I investigate a little bit and check the actual packets in the H264 container, I see that I have cases when one frame is written twice (for example ... 1,2,3,3,4,5,6,7,7 ...) what I want is once I decode the the H264 container I want to get the same images which I encoded. Is that possible and how ?

    


    P.P.S : I don't think the g=1 works - giving some more code for reference. This is what I currently have :

    


        import numpy as np
    import ffmpeg, subprocess, av
    
    width, height, encoding_profile, pixel_format = 1280, 800, 'main', 'yuv420p'
    
    # here I create 256 frames where each one has unique pixels all zeros, ones, twos and etc.
    np_images = []
    for i in range(256):
        np_image = i + np.zeros((height, width, 3), dtype=np.uint8)
        np_images.append(np_image)
    
    print(f'number of numpy images: {len(np_images)}')
    
    encoder = (ffmpeg
        .input('pipe:', format='rawvideo', pix_fmt='rgb24', s='{}x{}'.format(width, height))
        .output('pipe:', format='H264', pix_fmt=pixel_format, vcodec='libx264', profile='main', g=1)
        .run_async(pipe_stdin=True, pipe_stdout=True)
    )
    
    for timestamp, frame in enumerate(np_images):
        encoder.stdin.write(
            frame
            .astype(np.uint8)
            .tobytes()
        )
    
    encoder.stdin.close()
    output = encoder.stdout.read()
    encoder.stdout.close()
    
    # here I decode the encoded frames using PyAV
    frame_decoder = av.CodecContext.create("h264", "r")
    frame_decoder.thread_count = 0
    frame_decoder.thread_type = 'NONE'
    packets = frame_decoder.parse(output)
    decoded_frames = []
    
    for packet in packets:
        frame = frame_decoder.decode(packet)
        decoded_frames.extend(frame)
    
    decoded_frames.extend(frame_decoder.decode())
    print(f'number of decoded frames: {len(decoded_frames)}')
    print('keyframe boolean mask')
    print([e.key_frame for e in decoded_frames])
    
    decoded_np_images = []
    
    for frame in decoded_frames:
        decoded_np_images.append(np.array(frame.to_image()))
    
    print(f'number of decoded numpy images: {len(decoded_np_images)}')
    
    # here I check what the decoded frames contain (all zeros, ones, twos and etc.)
    print([e[0,0,0].item() for e in decoded_np_images])


    


    the particular problem which I am facing is that in the output you can observe this :

    


    


    number of decoded numpy images : 255

    


    [0, 1, 2, 3, 3, 4, 5, 6, 8, 9, 10,
10, 11, 12, 13, 15, 16, 17, 17, 18, 19, 20, 22, 23, 24, 24, 25, 26,
27, 29, 30, 31, 31, 32, 33, 34, 36, 37, 38, 39, 39, 40, 41, 43, 44,
45, 46, 46, 47, 48, 50, 51, 52, 53, 53, 54, 55, 57, 58, 59, 60, 60,
61, 62, 64, 65, 66, 67, 67, 68, 69, 71, 72, 73, 74, 74, 75, 76, 78,
79, 80, 81, 81, 82, 83, 85, 86, 87, 88, 88, 89, 90, 91, 93, 94, 95,
95, 96, 97, 98, 100, 101, 102, 102, 103, 104, 105, 107, 108, 109, 109,
110, 111, 112, 114, 115, 116, 116, 117, 118, 119, 121, 122, 123, 123,
124, 125, 126, 128, 129, 130, 131, 131, 132, 133, 135, 136, 137, 138,
138, 139, 140, 142, 143, 144, 145, 145, 146, 147, 149, 150, 151, 152,
152, 153, 154, 156, 157, 158, 159, 159, 160, 161, 163, 164, 165, 166,
166, 167, 168, 170, 171, 172, 173, 173, 174, 175, 176, 178, 179, 180,
180, 181, 182, 183, 185, 186, 187, 187, 188, 189, 190, 192, 193, 194,
194, 195, 196, 197, 199, 200, 201, 201, 202, 203, 204, 206, 207, 208,
208, 209, 210, 211, 213, 214, 215, 216, 216, 217, 218, 220, 221, 222,
223, 223, 224, 225, 227, 228, 229, 230, 230, 231, 232, 234, 235, 236,
237, 237, 238, 239, 241, 242, 243, 244, 244, 245, 246, 248, 249, 250,
251, 251, 252, 253]

    


    


    I still have frames which are appearing twice (and respectively some are missing)

    


  • Merge remote-tracking branch ’rbultje/vp9-profile1-wip’

    1er mai 2015, par Michael Niedermayer
    Merge remote-tracking branch ’rbultje/vp9-profile1-wip’
    

    * rbultje/vp9-profile1-wip :
    vp9 : add fate test for 422.
    vp9 : copy bug in libvpx for 4:2:2 chroma bs=8x4/4x4 prediction.
    vp9 : add yuv440 fate test.
    vp9 : fix mask_edges and filter_plane_rows/cols() for 440.
    vp9 : more specifically specify mask destination to mask_edges().
    vp9 : add fate test for profile 1 444.
    vp9 : don’t create special u/v filter masks for 444.
    vp9 : merge uv loopfilter code into generic filter_plane_rows/cols().
    vp9 : split out loopfilter luma rows/cols functions from loopfilter_sb().
    vp9 : invert order of two conditions.
    vp9 : use correct chroma subsampling for profile 1 inter block recon.
    vp9 : use correct chroma subsampling for profile 1 intra block recon.
    vp9 : take chroma subsampling into account when walking the block tree.
    vp9 : support non-420 chroma subsampling for profile 1 token decoding.
    vp9 : increase buffer sizes for non-420 chroma subsamplings.
    vp9 : profile 1 header decoding.

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

    • [DH] libavcodec/vp9.c
    • [DH] libavcodec/vp9_mc_template.c
    • [DH] tests/fate/vpx.mak
    • [DH] tests/ref/fate/vp9p1-04-yuv422
    • [DH] tests/ref/fate/vp9p1-04-yuv440
    • [DH] tests/ref/fate/vp9p1-04-yuv444
  • Merge commit ’23f741f79327e31be7b2a75ebb2e02111e06e52f’

    28 mai 2014, par Michael Niedermayer
    Merge commit ’23f741f79327e31be7b2a75ebb2e02111e06e52f’
    

    * commit ’23f741f79327e31be7b2a75ebb2e02111e06e52f’ :
    matroskadec : parse the channel layout mask for FLAC

    Conflicts :
    libavformat/oggparsevorbis.c

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

    • [DH] libavformat/Makefile
    • [DH] libavformat/flacdec.c
    • [DH] libavformat/matroskadec.c
    • [DH] libavformat/oggdec.h
    • [DH] libavformat/oggparsecelt.c
    • [DH] libavformat/oggparseflac.c
    • [DH] libavformat/oggparseogm.c
    • [DH] libavformat/oggparseopus.c
    • [DH] libavformat/oggparsespeex.c
    • [DH] libavformat/oggparsetheora.c
    • [DH] libavformat/oggparsevorbis.c
    • [DH] libavformat/oggparsevp8.c