Recherche avancée

Médias (91)

Autres articles (22)

  • 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

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • Les thèmes de MediaSpip

    4 juin 2013

    3 thèmes sont proposés à l’origine par MédiaSPIP. L’utilisateur MédiaSPIP peut rajouter des thèmes selon ses besoins.
    Thèmes MediaSPIP
    3 thèmes ont été développés au départ pour MediaSPIP : * SPIPeo : thème par défaut de MédiaSPIP. Il met en avant la présentation du site et les documents média les plus récents ( le type de tri peut être modifié - titre, popularité, date) . * Arscenic : il s’agit du thème utilisé sur le site officiel du projet, constitué notamment d’un bandeau rouge en début de page. La structure (...)

Sur d’autres sites (4495)

  • Can I know which byte range to read from a remote mp4 file for FFMpeg to decode a keyframe ?

    12 octobre 2023, par db9117

    I need to decode a of keyframe of a video file (mp4, h264 encoded). I know the timestamp of the keyframe I want to extract/decode. I want to minimize amount of data being read in memory. For this, I need to know beforehand exactly the minimal byte range I would require that encompasses this keyframe. How do I know what is the minimal byte range in the whole mp4 byte stream I need to read in order to be able to decode the keyframe ?

    


    I currently find the appropriate keyframe in the index_entries contained in the header. I get its byte position (pos attribute) and timestamp (timestamp attribute). I calculate the range as follows :

    


    startBytes : minimum of :

    


      

    1. the pos of the keyframe
    2. 


    3. the pos of the nearest index entry in the audio stream happening at or before the keyframe's timestamp.
    4. 


    


    This way when it's decoding the frame, if it also needs the audio content for demuxing, it would have it.

    


    endBytes : maximum of :

    


      

    1. the pos of the next frame in the video stream's index, after the keyframe
    2. 


    3. the pos of the next frame in the audio stream's index after the timestamp of the wished keyframe.
    4. 


    


    This way I know that I have everything up until the next frame in the index, which theoretically should be enough to decode the keyframe only.

    


    I then read the appropriate byte range.

    


    When I try to decode the frame, I run in a loop until I succeed :

    


      

    • avcodec_read_frame
    • 


    • avcodec_send_packet
    • 


    • avcodec_receive_frame
    • 


    


    I ignore AVERROR(EAGAIN) errors.

    


    avcodec_receive_frame fails multiple times with error AVERROR(EAGAIN) which I ignore, until it fails saying that the memory it wants to read isn't available (wants to read after endBytes). I explicitly tell it to fail if it wants to read more than it has already read.

    


    Note : for other keyframes at other positions in other videos, it sometimes succeeds (probably because the range is big enough by chance), but it fails more often than not.

    


    My question is : Why is the end of the range not enough to be able to decode only the one keyframe ? Is there any way to more precisely calculate the exact range in bytes I would need in order to decode a particular keyframe ?

    


  • How to force "full range" flag on export

    28 janvier 2019, par Emanuele Vissani

    I have an ffmpeg command to remap audio tracks to descrete channels in a ProRes 4444 quicktime file. Even if the input video is copied to the output, the exported file is interpreted by a professional video player software as video range (16-234 values) instead of the original full range (0-255 values), making it look more contrasted.
    The content is actually correct, changing manually the range setting in the player software gives back the right light range, so I think the output file just lose some kind of range flag.

    I already tried the following options without results :

    -colorspace bt709 -movflags +write_colr

    -dst_range 1 -color_range 2

    -vf scale=out_range=full

    -vf scale=in_range=full:out_range=full

    Original command is :

    ffmpeg -i F:\_IMPORT\TST_ProRes4444_4k.mov -map 0:0 -c copy -map 0:1 -c copy -map_channel 0.2.0:0.2 -c:a pcm_s24le F:\_EXPORT\TEST\test.mov

    Thank you for your help.

  • VBV-CBR and ABR in X264

    11 décembre 2013, par xkfz007

    In x264 VBV-CBR RC mode is based on ABR and vbv-maxrate and vbv-bufsize are set. On the basis of frame QP decided by ABR, the MB row QP is decided by VBV-CBR for each row. I test these two modes and the command lines are listed :
    ABR : -o BasketballDrill_832x480_50_20131210102507.264 BasketballDrill_832x480_50.yuv 832x480 —fps 50 —frames 300 —bitrate 1120 —profile baseline —threads -1 -I 50 -v —psnr
    VBV-CBR : -o BasketballDrill_832x480_50_20131210102507_mb.264 BasketballDrill_832x480_50.yuv 832x480 —fps 50 —frames 300 —bitrate 1120 —vbv-maxrate 1120 —vbv-bufsize 1680 —profile baseline —threads 1 -I 50 -v —psnr

    The final results are :
    ABR : Y-PSNR 31.530dB, bitrate 1146.93kbps
    VBV-CBR : Y-PSNR 31.728dB, bitrate 1230.25kbps
    Compared to ABR, VBV-CBR achieved 4.9% bitrate promotion and 0.198dB PSNR promotion. But the PSNR promotion is lower than bitrate (1% bitrate=0.05dB).

    Having talked so much, I just want to ask what is the advantage of VBV-CBR compared ABR ? If ABR can get the reasonable results, why the VBV-cBR is needed ?
    In my opinion, VBV-CBR maybe can promote the subjective quality owing to deciding the QP for each MB row. But the bitrate also rises. Also I have compared some frames of the two modes, they are almost the same.
    Maybe there are some situations that are fit for VBV-CBR and I don't know. So guys, give me, the new to x264, some professional explanation.