Recherche avancée

Médias (91)

Autres articles (46)

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

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

Sur d’autres sites (4752)

  • How to change macroblock's size in H.264 ?

    12 juin 2021, par Euphoria Yang

    I am using ffmpeg api to implement this paper(Passthrough+ : Real-time Stereoscopic View Synthesis for Mobile Mixed Reality). In this paper, they use 8x8 macroblock to calculate motion vectors. However, most of macroblocks are encoded in 16x16 pixels by ffmpeg. How to force macroblock size to be 8x8 using ffmpeg api(or can be done by modifying libavcodec/libx264.c) ?

    


  • How to change macroblock's size in H.264 ?

    12 juin 2021, par Euphoria Yang

    I am using ffmpeg api to implement this paper(Passthrough+ : Real-time Stereoscopic View Synthesis for Mobile Mixed Reality). In this paper, they use 8x8 macroblock to calculate motion vectors. However, most of macroblocks are encoded in 16x16 pixels by ffmpeg. How to force macroblock size to be 8x8 using ffmpeg api(or can be done by modifying libavcodec/libx264.c) ?

    


  • Increased File Size When Converting MP4 to WebM using FFmpeg

    23 décembre 2024, par kimgijeong

    I am using FFmpeg to convert MP4 to WebM with the following command :

    


    ffmpeg -y -hide_banner -nostats \
-f mov,mp4,m4a,3gp,3g2,mj2 -i "http://127.0.0.1:80/lotteon-low-bitrate.mp4" \
-threads auto -f webm -acodec libopus -b:a 96.059k -vcodec libsvtav1 -preset 11 -pix_fmt yuv420p \
-vf "scale='min(-1, iw)':'min(-1,ih)':force_original_aspect_ratio=decrease,crop=trunc(iw/2)*2:trunc(ih/2)*2" \
"/usr/local/m2/m2temp/xcdrtmp/2052_1.webm"


    


    However, the output webm file size is larger than the source MP4 file. For example :

    


      

    • Source MP4 : 4.6 MB (bit rate : 994,053 bps)

      


    • 


    • Output WebM : 16 MB (bit rate : 3,902,037 bps)

      


    • 


    


    I know SVT-AV1 encoder defaults to CRF mode. Due to not specifying the bitrate explicitly, the SVT-AV1 encoder automatically sets the bit_rate. It appears that the encoder is setting it to a much higher value (3,323,104 bps), causing the increase in file size compared to the source MP4 (994,053 bps). Here are the methods i tried to reduce the WebM file size compared to the source MP4 :

    


      

    1. -b:v 994k
    2. 


    


    I tried to match the target bitrate with the source MP4's bitrate to reduce the output size, but encountered the following error :

    


    Svt[error]: Instance 1: Force key frames is not supported for VBR mode Last message r
epeated 2 times [libsvtav1 @ 0x239dd100] Error setting encoder parameters: bad parameter (0x80001005)


    


    Looking at the official documentation, this mode change (from CRF to VBR when setting a target bitrate) appears to be expected behavior. However, the error is puzzling since I haven't set any force keyframe parameters in the FFmpeg command.

    


      

    1. svtav1-params "mbr=994k"
    2. 


    


    The second method i tried was using the svtav1-params "mbr=994k" option to set the maxrate while maintaining CRF mode This method showed some improvement, but the output file size was still larger than the source MP4.

    


      

    • Output WebM : 5MB (bit rate : 1,209,877 bps)
    • 


    


    The more critical reason why we can't adopt the second method (using svtav1-params "mbr=994k") is that even for the same MP4 source file, the output file size varies slightly with each encoding.

    


      

    1. -b:v 994k -svtav1-params “rc=2:pred-struct=1”(CBR, low delay)
    2. 


    


    The final method I tried was setting the target bitrate while using CBR (Constant Bit Rate) and low-delay mode The default value for pred-structure is 2(random access), but I had to use low-delay mode due to the following error :

    


    Svt[error]: CBR Rate control is currently not supported for SVT_AV1_PRED_RANDOM_ACCESS, use VBR mode


    


    This way was the only approach among those i tried that successfully reduced the output size.

    


      

    • Output WebM : 4.3MB (bit rate : 1,032,373 bps)
    • 


    


    In summary, I have three questions about this MP4 to WebM conversion issue :

    


      

    1. When setting the target bitrate with -b:v 994k, the switch to VBR mode is expected behavior. However, why does the force keyframe error occur when we haven't explicitly set any force keyframe parameters ?

      


    2. 


    3. Why does the output WebM file size fluctuate when setting maxrate either through -maxrate or svtav1-params "mbr=994k", even when using the same MP4 source file ?

      


    4. 


    5. Besides using -b:v 994k -svtav1-params "rc=2:pred-struct=1" (CBR with low delay), are there any other methods that can guarantee a WebM output size smaller than the source MP4 when converting from MP4 to WebM ?

      


    6. 


    


    I am using a recent version of the SVT-AV1 codec :

    


    Svt[info]: SVT [version]:       SVT-AV1 Encoder Lib 58146ca
Svt[info]: SVT [build]  :       GCC 11.5.0 20240719 (Red Hat 11.5.0-2)   64 bit
Svt[info]: LIB Build date: Oct 28 2024 07:40:59
ffmpeg video svt-av1