Recherche avancée

Médias (0)

Mot : - Tags -/protocoles

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (64)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration 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 (...)

Sur d’autres sites (5252)

  • split the video into five chunks using ffmpeg and batch script

    21 janvier 2019, par RJFF

    I want to split videos into five chunks using ffmpeg

    the first chunk represents 20% of the whole video
    the second chunk represents 40% of the whole video
    the third chunk represents 60% of the whole video
    the fourth chunk represents 80% of the whole video

    the fifth chunk represents 100% of the whole video

    I write the algorithm but I do not know how to write the batch code :
    1. find the duration of the video
    2. store the duration in variable
    3. divided the duration by 5
    4. split the video

    I want a batch script that takes the duration of the video then store the value of duration in the variable

    this is how I can take the duration of the video

    ffmpeg -i C:\video-splitter-master\1.avi 2>&1 | grep "Duration"| cut -d ' ' -f 4 | sed s/,// | sed 's@\..*@@g' | awk '{ split($1, A, ":"); split(A[3], B, "."); print 3600*A[1] + 60*A[2] + B[1] }'

    but how I can store the duration value in the variable ?

    can you please help me ?

  • Creating forks of `ffmpeg` in loop inside a shell script "loses" some iterations

    19 octobre 2015, par sschaef

    I have a shell script that takes a directory as input, reads all mp4 files in it and convert them to a mp3 with ffmpeg :

    #!/bin/bash

    dir=$1

    while read -rd "" file
    do
     base=$(basename "$file")
     filename=${base%(*}".mp3"
     ffmpeg -i "$file" -vn -ar 44100 -ac 2 -ab 192000 -f mp3 "$filename" &
    done < <(find $dir -maxdepth 1 -iname "*.mp4" -print0)

    wait

    exit 0

    Currently all these calls to ffmpeg are forked because when I leave out the & at the end only the first file in converted and the others are ignored.

    But this is problematic because somethings this fails on some files error messages like the following :

    path/to/file/file name - with spaces(info)(temp_information).mp4 : No such file or directory

    All file names normally contain spaces, maybe that is the reason why it fails for some files.

    Thus, I have the following questions :

    1. When I don’t fork the ffmpeg calls why is only the first file executed ? I expected that the loop waits until the process is finished and then continues with the next iteration.
    2. Why is the script unable to find some files (maybe it is a problem of ffmpeg) ?
    3. How to solve all these problems and make the script to work ?
  • FFMPEG - Merge two videos with timecode sync

    25 mai 2022, par Olivier Rivard

    We are recording 2 videos from 2 cameras. There is a Timecode metadata attached two the 2 videos. But the starting and stopping of the 2 recodings could have a small difference in time. Less than a second, mostly couple of frames.

    


    One of the video has also the audio recording.
We used ffprobe to extract timecode to analyze the difference.

    


    The difference in timecode won't always be the same.

    


    Ex :
video1.mov timecode : 20:41:11:21
video2.mov timecode : 20:41:11:52

    


    This is the current command that we use to combine the 2 videos side by side to have a look similar to a Zoom call. The only issue is that our videos are out of sync.

    


    ./ffmpeg -i video1.mov -i video2.mov -filter_complex "[0:v]pad=iw*2:ih[int]; [int][1:v]overlay=W/2:0[vid]; [0:a][1:a]amix=inputs=2:duration=longest[aud]" -r 30 -map [vid]" -map "[aud]" output.mp4


    


    We want to make sure that the 2 videos are sync by the timecode.

    


    Example of a combine video :
enter image description here