Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (107)

  • L’utiliser, en parler, le critiquer

    10 avril 2011

    La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
    Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
    Une liste de discussion est disponible pour tout échange entre utilisateurs.

  • Mediabox : ouvrir les images dans l’espace maximal pour l’utilisateur

    8 février 2011, par

    La visualisation des images est restreinte par la largeur accordée par le design du site (dépendant du thème utilisé). Elles sont donc visibles sous un format réduit. Afin de profiter de l’ensemble de la place disponible sur l’écran de l’utilisateur, il est possible d’ajouter une fonctionnalité d’affichage de l’image dans une boite multimedia apparaissant au dessus du reste du contenu.
    Pour ce faire il est nécessaire d’installer le plugin "Mediabox".
    Configuration de la boite multimédia
    Dès (...)

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

Sur d’autres sites (13360)

  • Bash script : Cycle script until ffmpeg command restarts successfully

    13 août 2023, par Bellacoda

    I have a IP Camera and the recordings are saved with ffmpeg RTSP into a raspberry pi.

    


    Sometimes, when the electricity shuts off and comes back on, the raspberry boots faster than the IP Camera and the ffmpeg command (saved on a crontab to run every reboot) fails to execute because it can't reach the IP Camera (that is still turning on).

    


    I tried to put a sleep command before the command but that doesn't work either.

    


    It also happened that when the IP Camera reboots, the raspberry closes the command, but when the camera comes back online, I have to manually lauch the command.

    


    Is there a way to make a script that waits to run the ffmpeg command until the camera is fully online (I assume with the $ ? variable for command exit status), and to wait to restart the ffmpeg command when the camera reboots ?

    


    The setup I have now is a crontab :
SHELL=/bin/bash
@reboot sleep 120s ; sudo ffmpeg ...

    


  • FFMPEG - frame PTS and DTS increasing faster than it should

    20 juillet 2022, par hi im Bacon

    I am pulling footage from an RTSP camera, standardising it, and then segmenting the footage for processing. I am standardising by reducing the resolution and setting the frame rate to 12 fps.

    


    I am encoding in the PTS times the wall time of each frame as the camera is a live source and I'd like to be able to know exactly when a frame is occurring (I'm not fussed that it's not going to be perfectly on, if it's all out by a second or two because of latency that is fine by me)

    


    FFMPEG is run from python subprocessing using the following command :

    


    command = [
    "ffmpeg", "-y",
    "-rtsp_transport", "tcp", URL,
    "-pix_fmt", "yuvj422p",
    "-c:v", "libx264", # Change the video codec to the kinesis required codec
    "-an", # Remove any audio channels
    "-vf", "scale='min(1280,iw)':'min(720,ih)':force_original_aspect_ratio=decrease",
    "-r", "12",
    "-vsync", "cfr",
    "-x264opts", "keyint=12:min-keyint=12",,
    "-f", "segment",  # Set the output format as chuncked segments
    "-segment_format", segment_format,  # Set each segments format E.G. matroska, mp4
    "-segment_time", str(segment_length),  # Set the length of the segment in seconds
    "-initial_offset", str(initial_pts_offset),
    "-strftime", "1",  # Use the strformat notication in naming of the video segements
    "{}/%Y-%m-%dT%H%M%S.{}".format(directory, extension)  # Define the name and location of the segments,
    '-loglevel', 'error'
]


    


    The problem I am having is that the timestamps of the frames increase at a faster than real time rate. The initial offset is set to the time that FFMPEG is kicked off, the frames received should always be less than right now. I am using a segment length of 30 seconds and after only 5 minutes, finished segments will have a start timestamp greater than the present wall time.

    


    The rate of increase looks around 3-4 times faster than it should.

    


    Why is this the case ? how can I avoid this ? is my understand of -r right ?

    


    I believed that -r drops extra frames, evens out the frame times creating new frames where needed, but not actually changing the perceived speed of the footage. The final frame time should not be greater than the segment length away from the first frame time.

    


    I have tried using a system (filter) that sets the PTS time according to the consumer wall time setpts='time(0)/TB' but this has led to quite choppy footage as the frames can be received/processed at different rates based on the connection.

    


    The quality of the segments is great, all the data is there... just getting the times right is seeming impossible.

    


  • QT Video widget benchmarks

    7 juin 2018, par hagor

    I develop video wall for security cameras application/ multiple video stream application.
    To Decode video i use FFMPEG and make a QPixmap from decoded frame.
    What is the best way to show videos ? Is Qt opengl widget much faster then qtLabel ?
    Thanks !