Recherche avancée

Médias (91)

Autres articles (66)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

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

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

Sur d’autres sites (5548)

  • How to get time stamp of closest keyframe before a given timestamp with ffmpeg

    21 mai 2021, par loretoparisi

    To seek to position and get the closest frame I was using

    


    ffprobe -i /path/to.mp3 -show_frames -show_entries frame=pkt_pos -of default=noprint_wrappers=1:nokey=1 -hide_banner -loglevel panic -read_intervals $seconds%+#1


    


    where I specify the start position as :

    


    '-read_intervals', seconds + '%+#1', //Read only 1 packet after seeking to position 01:23


    


    With latest ffprobeversion

    


    $ ffprobe --version
ffprobe version 4.4 Copyright (c) 2007-2021 the FFmpeg developers


    


    it does not work anymore, and I get

    


    N/A


    


    hence the "first", while if I remove the $seconds%+#1 I get all

    


    ffprobe -i /path/to.mp3 -show_frames -show_entries frame=pkt_pos -of default=noprint_wrappers=1:nokey=1 -hide_banner -loglevel panic -read_intervals 20
N/A
1029888
1030306
1030724
1031142
1031560
1031978
1032396
1032814
1033232
1033650
1034068
1034486
1034904
...


    


    How to retrieve the closest frame then not using the read_intervals $seconds%+#1 but read_intervals $seconds only ?

    


  • FFMPEG overlay not shown in certain players [closed]

    4 février 2024, par Hamed

    I'm trying to add an overlay to my video using ffmpeg. Here is my command :

    


    ffmpeg -y -i {input_video} -i {overlay_video} -filter_complex "[1:v]trim=start_frame=1991:end_frame=2027,scale=300:1,setpts=PTS-STARTPTS[clip2];[0:v][clip2]overlay=25:25" -map 0:v -map 0:a? -c:v libx264 -crf 20  {output_video}


    


    Now the overlay is added alright, but some video players don't show the overlay video. It's almost as if it's not supported. When I convert the video once more (using any tool, doesn't matter) the overlay is added permanently. How does the process work here ? how can I so called "bake" the overlay onto my input ?

    


  • Continuous RTSP stream recording with ffmpeg. Can I optimize it to not damage the SD card ?

    10 juillet 2019, par Mona

    I have got an IP camera with RTSP stream. I decided to record the stream using ffmpeg (version 3.2.14-1 deb9u1) on the Odroid-N2 device with Armbian. I have created a .sh script which is launched by Croon every minute. It checks if the ffmpeg recording is active for selected camera and also deletes files older than 7 days :

    #!/bin/bash
    RecordPathAndFind='/home/mona/CameraRecordings/Camera1/'
    SegmentTime=900
    MinutesAfterDeleteOldFiles=10080
    DaysSecurityLimit=31

    tempoutput=$(ps aux | grep ffmpeg | grep $RecordPathAndFind)
    if [ ${#tempoutput} -ge 5 ];
    then
         echo "FFMPEG with record command is already running. Skipping.\n"
    else
         echo "FFMPEG with record command is not running. Starting now...\n"
         FFMPEGSTART=$(su - mona -c "cd /home/mona; /usr/bin/screen -dmS ffmpegcamera1 ffmpeg -rtsp_transport udp -i 'rtsp://admin:password@192.168.1.xxx:554/onvif1' -vcodec copy -c:a aac -map 0 -f segment -segment_time $(echo $SegmentTime) -segment_format mp4 -strftime 1 $(echo $RecordPathAndFind)%Y-%m-%d_%H-%M-%S.mp4")
    fi

    currenthourminutes=$(date +%M)
    if [ "$currenthourminutes" == "00" ]; then
       echo "Current Minute is 00. Checking for old files to delete.\n"
       FILESDELETECOMMAND=$(find $(echo $RecordPathAndFind) -maxdepth 1 -type f -mmin +$(echo $MinutesAfterDeleteOldFiles) -mtime -$(echo $DaysSecurityLimit) -name '*.mp4' -ls -exec rm {} \;)
    else
       echo "Current Minute is NOT 00. Skipping.\n"
    fi

    The script works fine, but I’m afraid of the life of the SD card in this device. I detected that ffmpeg is continuously writing the mp4 file (file size grows all the time). I think it would be better if ffmpeg waited for 1MiB before flushing it to disk.

    I tried different ffmpeg settings (adding "blocksize", "flush_packets", "reorder_queue_size" and few others I can’t recall now), unfortunately it didn’t change anything. The mp4 file size was increasing all the time (even by few KBs).

    The first question is : Should I be worried about the microSD card life when ffmpeg is all the time writing the file (current environment) ?

    The second question is : Are there any other ffmpeg optimization settings which I missed ?

    If my fears regarding the SD card life are correct, can you please recommend some other things which I could add to my script (or change in system) in order to increase the life of micro SD cards (or USB sticks) used for recording purposes ? I was thinking about using the ramdisk, and then manually move the files, however this could cause files loss in case of system reboot, hang, or power outage.