
Recherche avancée
Médias (29)
-
#7 Ambience
16 octobre 2011, par
Mis à jour : Juin 2015
Langue : English
Type : Audio
-
#6 Teaser Music
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#5 End Title
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
Autres articles (86)
-
Le profil des utilisateurs
12 avril 2011, parChaque 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 (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, 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 (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (7293)
-
XHR timeout disabled is required for file uploads.
1er juin 2015, par HerstXHR timeout disabled is required for file uploads.
A timeout (e.g. set globally to work around certain Google Chrome bugs) would otherwise break file uploads lasting longer than the set value.
-
ffmpeg - caching ahead piped input as insurance while maintaining low latency and real-time output
5 décembre 2020, par hedgehog90I'm piping a live transcoded stream into ffmpeg (simplified for brevity) :


mpv playlist --o=- | ffmpeg -re -i - -tune zerolatency -f flv rtmp://blah.com/live


The piped input usually runs above 1x encoding speed, but every now and then it can run a little slower than real-time (just a momentary 0.99x or 0.98x dip).
When this happens, the rtmp server (a popular streaming service with an audience) output will pause momentarily for a couple seconds usually.


To overcome this I want ffmpeg to cache a few seconds in advance, so mpv's output (which outputs at whatever speed it's read, so potentially very fast) can supply ffmpeg with a little extra, and whenever mpv goes a little under 1x speed, there's a little insurance that ffmpeg has cached away. This should be doable while maintaining the lowest possible latency.


Question is, how ?


-
Bash script having custom functions not running under systemd service
13 août, par nightcrawlerI have this script to get images from a webcam & process them via RKNN NPU


#!/bin/bash

# Define the temporary directory for images
TEMP_DIR="/media/32GB/pics"
# Define the resize/letterbox option
RESIZE_OPTION="letterbox" # or "letterbox" depending on your requirement
# Define the output image path pattern
OUTPUT_IMAGE_PATH="/media/32GB/processed_pics/%Y-%m-%d_%H-%M-%S_processed.jpg"
# Define the path to the rknn_yolov5_demo_Linux binar
BINARY_PATH="$HOME/ezrknn-toolkit2/rknpu2/examples/rknn_yolov5_demo/install/rknn_yolov5_demo_Linux"
# Define ntfy variables
NTFY_URL="https://ntfy.org/ho"
NTFY_USER="xxx"
NTFY_PASS="xxxx"

# Empty existing content
rm "$TEMP_DIR"/*
# Function to run ffmpeg and write images to temporary files
run_ffmpeg() {
 v380 -u xxxx -p xxxx -addr 192.168.1.xxx | ffmpeg -i - -f image2 -vf fps=3 -strftime 1 "$TEMP_DIR/%Y-%m-%d_%H-%M-%S_cap.jpg" -y
}

# Function to run rknn_yolov5_demo_Linux and process images from temporary files
run_rknn_yolov5_demo() {
 while true; do
 # Find the most recent image file in the temporary directory
 IMAGE_PATH=$(ls -t "$TEMP_DIR"/*.jpg | head -n 1)

 # Check if the image path is not empty
 if [ -n "$IMAGE_PATH" ]; then
 # Define the output image path
 OUTPUT_IMAGE=$(date +"$OUTPUT_IMAGE_PATH")

 # Change to the binary directory and set LD_LIBRARY_PATH
 DETECTION_OUTPUT=$(cd "$BINARY_PATH" && LD_LIBRARY_PATH=./lib ./rknn_yolov5_demo ./model/RK3566_RK3568/yolov5s-640-640.rknn "$IMAGE_PATH" "$RESIZE_OPTION" "$OUTPUT_IMAGE")

 # Check if the detection output contains the word "person"
 if echo "$DETECTION_OUTPUT" | grep -q "person"; then
 echo "Human detected. Saving processed image to $OUTPUT_IMAGE"
 rm "$IMAGE_PATH"
 # Upload the image using the imgur binary and capture the link
 UPLOAD_OUTPUT=$(imgur "$OUTPUT_IMAGE")
 UPLOAD_LINK=$(echo "$UPLOAD_OUTPUT" | grep -m 1 '^http')

 if [ -n "$UPLOAD_LINK" ]; then
 echo "Image uploaded successfully. Link: $UPLOAD_LINK"
 # Send ntfy notification with the image link
 curl -u $NTFY_USER:$NTFY_PASS -H "tags:rotating_light" -H "Attach:$UPLOAD_LINK" -d "Human detected" $NTFY_URL
 else
 echo "Failed to upload image."
 fi
 else
 rm "$OUTPUT_IMAGE"
 rm "$IMAGE_PATH"
 fi
 fi

 # Sleep for a short period to avoid high CPU usage
 sleep 1
 done
}


# Run ffmpeg and rknn_yolov5_demo_Linux in the background
run_ffmpeg &
run_rknn_yolov5_demo &



& the corresponding .service file


[Unit]
Description=Process Images with rknn_yolov5_demo
After=network.target
#StartLimitIntervalSec=60
#StartLimitBurst=5

[Service]
Type=simple
ExecStartPre=/bin/sleep 30
ExecStart=/home/xxx/process_images_rknn.sh
Restart=always
RestartSec=3
TimeoutStartSec=60

[Install]
WantedBy=default.target



Now last x2 lines of script are creating problems.


Case1] If I keep like this
htop
shows no initiation offfmpeg
norrknn
Binaries

Case2] I removed
&
from both lines then onlyffmpeg
runs butrknn
is nowhere inhtop


Case3] Only this case works


run_ffmpeg &
run_rknn_yolov5_demo



I am reloading systemctl daemon & restarting service after script modification in each case