Recherche avancée

Médias (1)

Mot : - Tags -/belgique

Autres articles (81)

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

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

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

  • FFmpeg get a crop without tying it to a specific time period

    30 avril 2021, par Дмитрий Варзанов
    crop = sub.check_output("ffmpeg -i "+file+" -ss 5 -t 30  -vf cropdetect -f null - 2>&1 | awk '/crop/ { print  $NF }' | tail -1", shell=True).decode().strip()


    


    In order not to bind to a time interval, it is possible to analyze the frames for the entire time period of the video file.

    


    It would be a solution if this process was performed quickly, instantly. But unfortunately, it can take hours, depending on the duration of the video

    


    Execute the command to get the duration of the video, and then calculate and set the time to get the crop. We'll have to build forests...

    


    I am looking for a solution in which there will be no need to set the time and at the same time the task will take the least amount of time.

    


    Perhaps someone has a solution ?

    


  • Crontab task scheduled every hour stops running from 11am to 12am

    11 août 2019, par technik

    I have a rather weird issue. My aim is to use ffmpeg to grab a screenshot from a home CCTV cameras rtsp stream every hour. I want to do this in order to make a timelapse. However everyday from 11am to 12am (the next day) there are no snapshots saved.

    On an always on Debian machine, this is the shell script I have that crontab calls :

    dt=$(date +"%d%m%2y%I%M%S")
    ffmpeg -rtsp_transport tcp -i "rtsp://IP:554/..." -frames 1 /user/snapshots/ch1/$dt.jpg

    Running it by itself works fine and saves a jpg snapshot successfully to the right folders.

    In crontab -e I have the following line :
    0 * * * * /bin/sh //user/snap.sh

    Thanks.

  • FFmpeg : crossfading audio with multiple files, but works with video only

    12 février 2024, par JayCravens

    I've found this script that cross-fade's all mp4's in the directory. If I try to add the audio with AUDIO="[0:a]afade=d=1[a0];", using the same iteration, it doesn't work.

    


    This works fine...

    


    #!/bin/bash

CMD="ffmpeg"
FILES=(*.mp4)
SIZE=${#FILES[@]}
VIDEO=""
OUT=""

i="0"
total_duration="0"
for file in "${FILES[@]}"; do
  echo "$file"
  CMD="$CMD -i '$file'"

  duration=$(ffprobe -v error -select_streams v:0 -show_entries stream=duration -of csv=p=0 "$file" | cut -d'.' -f1)

  if [[ "$i" == "0" ]]
  then
    VIDEO="[0:v]setpts=PTS-STARTPTS[v0];"
  else
    fade_start=$((total_duration))
    VIDEO="${VIDEO}[${i}:v]format=yuva420p,fade=in:st=0:d=1:alpha=1,setpts=PTS-STARTPTS+(${fade_start}/TB)[v${i}];"
    if (( i < SIZE-1 ))
    then
      if (( i == 1 ))
      then
        OUT="${OUT}[v0][v1]overlay[outv1];"
      else
        OUT="${OUT}[outv$((i-1))][v${i}]overlay[outv${i}];"
      fi
    else
      if (( SIZE == 2 ))
      then
        OUT="${OUT}[v0][v1]overlay,format=yuv420p[outv]"
      else
        OUT="${OUT}[outv$((i-1))][v${i}]overlay,format=yuv420p[outv]"
      fi
    fi
  fi

  total_duration=$((total_duration+duration))

  i=$((i+1))
done

CMD="$CMD -filter_complex \"${VIDEO}${OUT}\" -c:v libx264 -preset ultrafast -map [outv] crossfade.mp4"

echo "$CMD"

bash -c "$CMD"


    


    I read acrossfade requires 32bit little endian, so I went to afade.
    It didn't change anything.

    


    I've got this working via fade in/out, for any number of files, with working audio. I still have to preprocess the audio sections which require fading.

    


    #!/bin/bash

if [ -e *.mkv ]; then
  file_type=".mkv"
else
  file_type=".mp4"
fi

mkdir ./temp
for file in *$file_type; do mv "$file" "in_$file"; done

# Function to fade in video
function fade_in() {
file_list1=(in_*)
  echo "Executing fade_in"
  for file in "${file_list1[@]}"; do
    ffmpeg -i "$file" -y -vf fade=in:0:30 -hide_banner -preset ultrafast "out_$file"
  done
mv in_* ./temp
}
export -f fade_in

# Function to fade out video
function fade_out() {
  file_list2=(out_*)
  echo "Executing fade_out"
  for file in "${file_list2[@]}"; do
    frame_count=$(ffmpeg -i $file -map 0:v:0 -c copy -f null -y /dev/null 2>&1 | grep -Eo 'frame= *[0-9]+ *' | grep -Eo '[0-9]+' | tail -1)
      frame_start=$((frame_count - 30))
      ffmpeg -i "$file" -y -vf fade=out:"$frame_start":30 -hide_banner -preset ultrafast "to_mux_$file"
  done
  mv out_* ./temp
}

export -f fade_out

bash -c "fade_in"
bash -c "fade_out"

ls --quoting-style=shell-always -1v *$file_type > tmp.txt
sed 's/^/file /' tmp.txt > list.txt && rm tmp.txt

ffmpeg -f concat -safe 0 -i list.txt -c copy -shortest -movflags +faststart fade_muxed$file_type

mv to_mux_* ./temp
rm list.txt
#rm -rf ./temp

exit 0


    


    Number the file name's sequentially (i.e. 01_file.mkv 02_file.mkv etc.), to ensure order, or it will be up to the directory sort. Using ls --quoting-style=shell-always -v1 has proved very reliable. It should handle 99% of naming conventions.

    It's not a cross fade, but the two second transition is very close. With working and synchronized audio.
If you have a good multi-file concatenation method that includes audio cross-fading, I'm still looking.

    


    Ed Morton, I completely agree, sir. One-hundred percent. I didn't write the first script. I would NEVER use capitals. They're horrible. I "like_full_words" with _'s. Never for any reason other than visual though, so that was a great read, I recommend it.