Recherche avancée

Médias (0)

Mot : - Tags -/interaction

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

Autres articles (33)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (6473)

  • avformat/mov : fix seeking with HEVC open GOP files

    18 février 2022, par Clément Bœsch
    avformat/mov : fix seeking with HEVC open GOP files
    

    This was tested with medias recorded from an iPhone XR and an iPhone 13.

    Here is how a typical stream looks like in coding order :

    ┌────────┬─────┬─────┬──────────┐
    │ sample | PTS | DTS | keyframe |
    ├────────┼─────┼─────┼──────────┤
    ┊ ┊ ┊ ┊ ┊
    │ 53 │ 560 │ 510 │ No │
    │ 54 │ 540 │ 520 │ No │
    │ 55 │ 530 │ 530 │ No │
    │ 56 │ 550 │ 540 │ No │
    │ 57 │ 600 │ 550 │ Yes │
    │ * 58 │ 580 │ 560 │ No │
    │ * 59 │ 570 │ 570 │ No │
    │ * 60 │ 590 │ 580 │ No │
    │ 61 │ 640 │ 590 │ No │
    │ 62 │ 620 │ 600 │ No │
    ┊ ┊ ┊ ┊ ┊

    In composition/display order :

    ┌────────┬─────┬─────┬──────────┐
    │ sample | PTS | DTS | keyframe |
    ├────────┼─────┼─────┼──────────┤
    ┊ ┊ ┊ ┊ ┊
    │ 55 │ 530 │ 530 │ No │
    │ 54 │ 540 │ 520 │ No │
    │ 56 │ 550 │ 540 │ No │
    │ 53 │ 560 │ 510 │ No │
    │ * 59 │ 570 │ 570 │ No │
    │ * 58 │ 580 │ 560 │ No │
    │ * 60 │ 590 │ 580 │ No │
    │ 57 │ 600 │ 550 │ Yes │
    │ 63 │ 610 │ 610 │ No │
    │ 62 │ 620 │ 600 │ No │
    ┊ ┊ ┊ ┊ ┊

    Sample/frame 58, 59 and 60 are B-frames which actually depends on the
    key frame (57). Here the key frame is not an IDR but a "CRA" (Clean
    Random Access).

    Initially, I thought I could rely on the sdtp box (independent and
    disposable samples), but unfortunately :

    sdtp[54] is_leading:0 sample_depends_on:1 sample_is_depended_on:0 sample_has_redundancy:0
    sdtp[55] is_leading:0 sample_depends_on:1 sample_is_depended_on:2 sample_has_redundancy:0
    sdtp[56] is_leading:0 sample_depends_on:1 sample_is_depended_on:2 sample_has_redundancy:0
    sdtp[57] is_leading:0 sample_depends_on:2 sample_is_depended_on:0 sample_has_redundancy:0
    sdtp[58] is_leading:0 sample_depends_on:1 sample_is_depended_on:0 sample_has_redundancy:0
    sdtp[59] is_leading:0 sample_depends_on:1 sample_is_depended_on:2 sample_has_redundancy:0
    sdtp[60] is_leading:0 sample_depends_on:1 sample_is_depended_on:2 sample_has_redundancy:0
    sdtp[61] is_leading:0 sample_depends_on:1 sample_is_depended_on:0 sample_has_redundancy:0
    sdtp[62] is_leading:0 sample_depends_on:1 sample_is_depended_on:0 sample_has_redundancy:0

    The information that might have been useful here would have been
    is_leading, but all the samples are set to 0 so this was unusable.

    Instead, we need to rely on sgpd/sbgp tables. In my case the video track
    contained 3 sgpd tables with the following grouping types : tscl, sync
    and tsas. In the sync table we have the following 2 entries (only) :

    sgpd.sync[1] : sync nal_unit_type:0x14
    sgpd.sync[2] : sync nal_unit_type:0x15

    (The count starts at 1 because 0 carries the undefined semantic, we'll
    see that later in the reference table).

    The NAL unit types presented here correspond to :

    libavcodec/hevc.h : HEVC_NAL_IDR_N_LP = 20,
    libavcodec/hevc.h : HEVC_NAL_CRA_NUT = 21,

    In parallel, the sbgp sync table contains the following :

    ┌────┬───────┬─────┐
    │ id │ count │ gdi │
    ├────┼───────┼─────┤
    │ 0 │ 1 │ 1 │
    │ 1 │ 56 │ 0 │
    │ 2 │ 1 │ 2 │
    │ 3 │ 59 │ 0 │
    │ 4 │ 1 │ 2 │
    │ 5 │ 59 │ 0 │
    │ 6 │ 1 │ 2 │
    │ 7 │ 59 │ 0 │
    │ 8 │ 1 │ 2 │
    │ 9 │ 59 │ 0 │
    │ 10 │ 1 │ 2 │
    │ 11 │ 11 │ 0 │
    └────┴───────┴─────┘

    The gdi column (group description index) directly refers to the index in
    the sgpd.sync table. This means the first frame is an IDR, then we have
    batches of undefined frames interlaced with CRA frames. No IDR ever
    appears again (tried on a 30+ seconds sample).

    With that information, we can build an heuristic using the presentation
    order.

    A few things needed to be introduced in this commit :

    1. min_sample_duration is extracted from the stts : we need the minimal
    step between sample in order to PTS-step backward to a valid point
    2. In order to avoid a loop over the ctts table systematically during a
    seek, we build an expanded list of sample offsets which will be used
    to translate from DTS to PTS
    3. An open_key_samples index to keep track of all the non-IDR key
    frames ; for now it only supports HEVC CRA frames. We should probably
    add BLA frames as well, but I don't have any sample so I prefered to
    leave that for later

    It is entirely possible I missed something obvious in my approach, but I
    couldn't come up with a better solution. Also, as mentioned in the diff,
    we could optimize is_open_key_sample(), but the linear scaling overhead
    should be fine for now since it only happens in seek events.

    Fixing this issue prevents sending broken packets to the decoder. With
    FFmpeg hevc decoder the frames are skipped, with VideoToolbox the frames
    are glitching.

    • [DH] libavformat/isom.h
    • [DH] libavformat/mov.c
  • corrupted HEIC tile when converting to JPEG

    27 mars 2018, par Kim Bowles Sørhus

    I’m having trouble converting a .HEIC image to a jpeg. The .HEIC file an image taken with an iphone running the latest ios public beta. I’m using the library nokia provided to parse the file and extract the image tiles from the .HEIC file, convert them to jpeg and glue them together using ffmpeg/montage.

    There is a bit too much code to paste it all into this question so i put all of it in this github repo. Its pretty self explanatory and should be runnable with just a few dependencies. They are explained in the repo’s README. This has all been done on osx btw.

    The .HEIC files contains a 8x6 grid of images(tiles) and if you put them together you get the complete image. Simply put whatever image i input the 7th tile is corrupted as shown below and i really don’t understand why. I’ve filed an issue with nokia, but the repo seems pretty dead and i don’t really expect an answer there.

  • What are good settings for transcoding videos uploaded to my app ?

    14 mai 2020, par Dmitry Minkovsky

    I am working on an app that allows users to share videos. The problem is that many videos are very high bitrate. For example, A 4-minute H264 video from an old iPhone is encoded at 1080p and runs 17,000 kb/s ( 500 megabytes). Accepting and distributing such videos at this bitrate/resolution is not practical for a social application.

    



    I have been playing with ffmpeg to transcode videos to smaller sizes and higher compression, but have not achieved acceptable results. For example :

    



    ffmpeg \
    -i in.mov \
    -vf scale=w='if(gt(iw\,ih)\,780\,-2)':h='if(gt(iw\,ih)\,-2\,780)' \ 
    -c:v libx264 \
    -crf 28 \
    -preset medium \
    -pix_fmt yuv420p \
    -movflags +faststart \
    out.mp4


    



    This command transcodes the above-mentioned 500MB file down to 70MB. It scales the larger dimension of the video to 780 pixels and compresses the video quite a bit. The results are okay, but the file is still large.

    



    Taking the longer dimension down to 480 pixels, the file is reduced to 40MB. Still quite large, and now significantly degraded. Also, the transcoding still takes quite a long time : about 1-1.5x on my 4 year old i7 Macbook Pro with 16GB RAM.

    



    I'm not sure how to improve on this. H265 is not supported in browsers. I am wondering :

    



      

    • How can I reduce size further ?
    • 


    • How can I transcode faster than 1x without significantly reducing quality ? Even 2-3x doesn't seem great ?
    • 


    



    Is this as good as it gets ?