Recherche avancée

Médias (91)

Autres articles (50)

  • Participer à sa documentation

    10 avril 2011

    La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
    Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
    Pour ce faire, vous pouvez vous inscrire sur (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (5683)

  • Can't fix timestamp of WebM video with dynamic resolution using FFmpeg

    11 février 2019, par Yurii Kit

    I’m developing the platform for 1-1 video calls with recording. For my purposes, I work with the following stack : WebRTC, Kurento Media Server, FFmpeg.

    1. It works perfectly in an ideal environment, but if my users have a poor connection, after the recording I see a lot of problems with the out of sync audio and video tracks.

      As I understand, the problem appears due to the incorrect timestamp, so I’m doing a bit post-processing where I generate a new timestamp and it helps !

      Here is the command example :

      ffmpeg -fflags +genpts -acodec libopus -vcodec libvpx \
         -i in.webm \
         -filter_complex "fps=30, setpts=PTS-STARTPTS" \
         -acodec libvorbis -vcodec libvpx \
         -vsync 1 -async 1 -r 30 -threads 4 out.webm
    2. After that, I’ve faced one more problem. If the user has a poor connection, WebRTC can dynamically change the video resolution. After the post-processing for such type of videos (with the different resolutions during the video) I see the frozen image until the end of the video and it started from the moment, where the resolution was dynamically changed. There are no error in the FFmpeg logs, just information about changing the resolution :

      [libvpx @ 0x559335713440] dimension change! 480x270 -> 320x180
      -async is forwarded to lavfi similarly to -af aresample=async=1:min_hard_comp=0.100000.

      After analyzing the logs, I realized that the problem was due to the STARTPTS parameter, which, after automatically changing the extension, became very large (equal to the number of frames that were before it). I tried to remove STARTPTS and leave only PTS.

      After that, the video started to work well, but only until the video resolution are dynamically changed, then again the audio and video tracks are out of sync.

      I’ve tried to scale videos to a static resolution before fixing timestamp and it helps. But it’s a little bit extra work. Command example :

      ffmpeg -acodec libopus -vcodec libvpx \
         -i in.webm \
         -vf scale=640:480 \
         -acodec libvorbis -vcodec libvpx \
         -threads 4 out.webm

      Also I’ve tried to combine both commands using filter_complex, but it didn’t work.

      I’ve worked with FFmpeg not so many time so far, so, maybe I’m doing something wrong ? Maybe there are some easier ways to do that ?

      Since Kurento uses GStreamer for the video recording, so maybe it would be a better option to reconfigure Kurento to fix timestamp during the video recording ?

    I can provide any videos and commands which I use.

    I’m using :
    Kurento Media Server 6.9.0,
    FFmpeg 4.1

  • avcodec/h261enc : Fix ac_vlc_length tables

    15 juin 2024, par Andreas Rheinhardt
    avcodec/h261enc : Fix ac_vlc_length tables
    

    These tables are supposed to contain the number of bits needed
    to encode a given (run, level) pair. Yet the number of bits
    for pairs needing the escape code was wrong (it only contained
    the escape code and not the bits needed for run and level).

    Furthermore, H.261 (a format with explicit end-of-block codes)
    does not work well together with the RLTable API from rl.c :
    The EOB code is the first one in ff_h261_rl_tcoeff's VLC table
    and has a run value of zero. Therefore the result of get_rl_index()
    is off by one for run == 0 and level values with explicit
    (run, level) pair.

    Fixing this necessitated changing the ref files of the
    vsynth*-h261-trellis tests. Both filesizes as well as PSNR
    decreased. If one used a qscale value of 11 for this test,
    one would have received files with about the same size as
    before this patch (with qscale 12), but with better PSNR.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/h261enc.c
    • [DH] tests/ref/vsynth/vsynth1-h261-trellis
    • [DH] tests/ref/vsynth/vsynth2-h261-trellis
    • [DH] tests/ref/vsynth/vsynth_lena-h261-trellis
  • ffmpeg custom compile options with hardware/software support

    14 mars 2023, par Capitalmind

    My last compile enabled nvidia/cuda but even though I included —enable-nonfree in the configure, I had issues encoding videos, with outputs like :

    &#xA;

    ffmpeg -hwaccel cuvid -c:v h264_cuvid -resize 1920x1080 -i Input.mkv -c:a copy -c:v h264_nvenc -preset slow -rc vbr_hq -cq 18 Output.mkv

    &#xA;

    Giving errors like :

    &#xA;

    ffmpeg -hwaccel cuvid -c:v h264_cuvid -resize 1920x1080 -i /media/zuultux/Video/Movies/Lawrence.of.Arabia.1962.UHD.BluRay.2160p.TrueHD.Atmos.7.1.HEVC.mkv -c:a copy -c:v h264_nvenc -preset slow -rc vbr_hq -cq 18 /media/zuultux/Video/Lawrence.of.Arabia.1962.UHD.BluRay.1080p.TrueHD.Atmos.7.1.HEVC.mkv&#xA;

    &#xA;

    [hevc_cuvid @ 0x5624718179c0] Codec hevc_cuvid is not supported.&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (hevc (hevc_cuvid) -> h264 (h264_nvenc))&#xA;  Stream #0:1 -> #0:1 (copy)&#xA;

    &#xA;

    My actual configure reads :

    &#xA;

    ./configure --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64&#xA;

    &#xA;

    There a heaps of options on Githhub. Can anyone suggest how to include parameters that specifically :

    &#xA;

      &#xA;
    • Toggle enable AMD64/Nvidia or non-hardware processing
    • &#xA;

    • All free and non-free codecs, but particularly VC9, H264/265
    • &#xA;

    • Or basically enable as many features as possible !
    • &#xA;

    &#xA;

    Note I already have ubuntu-restricted-extras installed.

    &#xA;

    Configuration used compiled correctly but gave errors when using. Several media files selected to test. nvidia-smi command responds NVIDIA-SMI 470.161.03 Driver Version : 470.161.03 CUDA Version : 11.4

    &#xA;


    &#xA;

    Edit

    &#xA;

    After fixing the problem I thought to share my results on Github. https://github.com/Capitalmind/makeffmpeg

    &#xA;