Recherche avancée

Médias (91)

Autres articles (77)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (4709)

  • ffmpeg - preserve time base and pts of all frames during transcode

    18 mars 2021, par jdizzle

    Context :

    


    I have an application that produces mp4s with HEVC encoding. I want to convert them to AVC for use in browser-based displaying. A very crucial part of how I want to use this is to preserve exact PTS times, as this is how we correlate the frames to other data streams not included in the video.

    


    Question :

    


    How do I make ffmpeg preserve this information across the transcode ? All the obvious flags seem to have no effect and ffmpeg just does whatever it wants.

    


    $ ffprobe -show_streams original.mp4 2>/dev/null | grep time_base
codec_time_base=16666667/500000000
time_base=1/1000


    


    Here is my convert command :

    


    $ ffmpeg -i original.mp4 -copyts -copytb 0 test.mp4


    


    And its result :

    


    $ ffprobe -show_streams test.mp4 2>/dev/null | grep time_base
codec_time_base=1/60
time_base=1/15360


    


    I would expect the time_bases to match. The PTS of the frames also don't match when doing ffprobe -show_frames

    


    EDIT :
@Gyan suggested using -video_track_timescale, but that didn't get the exact behavior I was looking for :

    


    $ sdiff <(ffprobe -show_frames test.mp4  | grep pkt_pts_time) <(ffprobe -show_frames original.mp4 | grep pkt_pts_time)
pkt_pts_time=0.000000                           pkt_pts_time=0.000000
pkt_pts_time=0.033000                           pkt_pts_time=0.033000
pkt_pts_time=0.067000                         | pkt_pts_time=0.066000
pkt_pts_time=0.100000                           pkt_pts_time=0.100000
pkt_pts_time=0.133000                           pkt_pts_time=0.133000
pkt_pts_time=0.167000                         | pkt_pts_time=0.166000
pkt_pts_time=0.200000                           pkt_pts_time=0.200000
pkt_pts_time=0.233000                           pkt_pts_time=0.233000
pkt_pts_time=0.267000                         | pkt_pts_time=0.266000
pkt_pts_time=0.300000                           pkt_pts_time=0.300000
pkt_pts_time=0.333000                           pkt_pts_time=0.333000
pkt_pts_time=0.367000                         | pkt_pts_time=0.366000
pkt_pts_time=0.400000                           pkt_pts_time=0.400000
pkt_pts_time=0.433000                           pkt_pts_time=0.433000
pkt_pts_time=0.467000                           pkt_pts_time=0.467000
pkt_pts_time=0.500000                           pkt_pts_time=0.500000
pkt_pts_time=0.533000                         | pkt_pts_time=0.532000
pkt_pts_time=0.567000                         | pkt_pts_time=0.565000
pkt_pts_time=0.600000                         | pkt_pts_time=0.598000
pkt_pts_time=0.633000                         | pkt_pts_time=0.631000
pkt_pts_time=0.667000                         | pkt_pts_time=0.665000
pkt_pts_time=0.700000                         | pkt_pts_time=0.698000
...


    


  • gstreamer records

    13 octobre 2012, par Eric

    I use the following command to record audio and video from my webcam

    gst-launch-0.10 v4l2src ! video/x-raw-yuv,width=640,height=480,framerate=30/1 ! \
                tee name=t_vid ! queue ! videoflip method=horizontal-flip ! \
                xvimagesink sync=false t_vid. ! queue ! \
                videorate ! video/x-raw-yuv,framerate=30/1 ! queue ! mux. \
                autoaudiosrc ! audiorate ! audio/x-raw-int,rate=48000,channels=1,depth=16 ! queue ! \
                audioconvert ! queue ! mux. avimux name=mux ! \
                filesink location=video.avi

    And the result is correct in term of synchronicity between the flows. However the avi file is very big since that's uncompressed data...
    Could you advice me howto reduce the size of the records. Note that I after recording I split audio and video in separate files for processing. It is crucial to keep the synchronicity.

    * Edit *

    I tried to use ffmpeg to compress the avi files using this command :

    ffmpeg -i video.avi -vcodec msmpeg4v2 output.avi

    But it seems that bitrate is invalid (N/A since its raw data ?)
    Here is the output :

    Input #0, avi, from 'video.avi':
    Duration: 00:00:00.00, start: 0.000000, bitrate: -2147483 kb/s
     Stream #0.0: Video: rawvideo, yuv420p, 640x480, 30 tbr, 30 tbn, 30 tbc
     Stream #0.1: Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
    [buffer @ 0xef57e0] w:640 h:480 pixfmt:yuv420p
    Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
    [ac3 @ 0xedece0] channel_layout not specified
    [ac3 @ 0xedece0] No channel layout specified. The encoder will guess the layout, but it     might be incorrect.
    [ac3 @ 0xedece0] invalid bit rate
    Output #0, avi, to 'output.avi':
     Stream #0.0: Video: msmpeg4v2, yuv420p, 640x480, q=2-31, 200 kb/s, 90k tbn, 30 tbc
     Stream #0.1: Audio: ac3, 48000 Hz, mono, flt, 200 kb/s
    Stream mapping:
     Stream #0.0 -> #0.0
     Stream #0.1 -> #0.1
    Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height

    Thanks for helping.

  • ffmpeg does not draw text

    4 septembre 2016, par Michael Heuberger

    hope one of you can tell me why this ffmpeg command of mine does not draw the desired text. the produced video doesn’t have it. here you go :

    ffmpeg -f image2 -thread_queue_size 64 -framerate 15.1 -i /home/michael-heuberger/binarykitchen/code/videomail.io/var/local/tmp/clients/videomail.io/11e6-723f-d0aa0bd0-aa9b-f7da27da678f/frames/%d.webp -y -an -vcodec libvpx -filter:v drawtext=fontfile=/home/michael-heuberger/binarykitchen/code/videomail.io/src/assets/fonts/Varela-Regular.ttf:text=www.videomail.io:fontsize=180:fontcolor=white:x=150:y=150:shadowcolor=black:shadowx=2:shadowy=2 -vf scale=trunc(iw/2)*2:trunc(ih/2)*2 -crf 12 -deadline realtime -cpu-used 4 -pix_fmt yuv420p -loglevel warning -movflags +faststart /home/michael-heuberger/binarykitchen/code/videomail.io/var/local/tmp/clients/videomail.io/11e6-723f-d0aa0bd0-aa9b-f7da27da678f/videomail_preview.webm

    the crucial part is this video filter :

    -filter:v drawtext=fontfile=/home/michael-heuberger/binarykitchen/code/videomail.io/src/assets/fonts/Varela-Regular.ttf:text=www.videomail.io:fontsize=180:fontcolor=white:x=150:y=150:shadowcolor=black:shadowx=2:shadowy=2

    does it seem correct to you ? if so, then why am i not seeing any text in the videomail_preview.webm video file ?

    using ffmpeg v2.8.6 here with —enable-libfreetype, —enable-libfontconfig and —enable-libfribidi enabled.

    furthermore, the above command has been produced with fluent-ffmpeg.

    so, any ideas ?