Recherche avancée

Médias (91)

Autres articles (59)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (9379)

  • How convert webm to mp4 ?

    4 février 2016, par Ravi Shankar

    I am unable to convert a webm file created through webcam recording to mp4.

    I am using below command.

    ffmpeg -fflags +genpts -i  uploads/2586913190845018.webm -r 24 uploads/abc.mp4 2>&1

    The output of above command is

    Array
    (
       [0] => FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
       [1] =>   built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
       [2] =>   configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
       [3] =>   libavutil     50.15. 1 / 50.15. 1
       [4] =>   libavcodec    52.72. 2 / 52.72. 2
       [5] =>   libavformat   52.64. 2 / 52.64. 2
       [6] =>   libavdevice   52. 2. 0 / 52. 2. 0
       [7] =>   libavfilter    1.19. 0 /  1.19. 0
       [8] =>   libswscale     0.11. 0 /  0.11. 0
       [9] =>   libpostproc   51. 2. 0 / 51. 2. 0
       [10] => [matroska @ 0x14ce690]max_analyze_duration reached
       [11] => [matroska @ 0x14ce690]Estimating duration from bitrate, this may be inaccurate
       [12] => Input #0, matroska, from 'uploads/2586913190845018.webm':
       [13] =>   Metadata:
       [14] =>     doctype         : webm
       [15] =>   Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
       [16] =>     Stream #0.0(eng): Video: 0x0000, 640x480, PAR 1:1 DAR 4:3, 30 fps, 30 tbr, 1k tbn, 30 tbc
       [17] =>     Stream #0.1(eng): Audio: vorbis, 48000 Hz, mono, s16
       [18] => swScaler: Unknown format is not supported as input pixel format
       [19] => Cannot get resampling context
    )

    Above command works if I upload webm file download from youtube or any other online source, it works.

  • ffmpeg user agent not working

    19 janvier 2017, par mattauckland

    I’ve installed ffmpeg on CentOS and it has been happily encoding files audio files for the last year, no problem.

    However, I would like to use it to access an audio stream now, to replace a clunky bit of php code I currently use, but I would like to apply a custom User Agent so my clients recognise the incoming connection.

    I’ve tried -user-agent, -user_agent, and -headers but all three are returning "Unrecognized option".

    The code I’m using, excluding the user agent, is :

    ffmpeg -t 3600 -i http://my.radio.com:8000/1 -vn -ar 44100 -ac 2 -ab 128k -f mp3 /var/www/vhosts/mywebsite.com/httpdocs/test.mp3

    And that works no problem, but when I try to add either -user_agent, -user-agent, or -headers it fails with the above error.

    If it helps, the version info is :

    FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
     built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
     configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
     libavutil     50.15. 1 / 50.15. 1
     libavcodec    52.72. 2 / 52.72. 2
     libavformat   52.64. 2 / 52.64. 2
     libavdevice   52. 2. 0 / 52. 2. 0
     libavfilter    1.19. 0 /  1.19. 0
     libswscale     0.11. 0 /  0.11. 0
     libpostproc   51. 2. 0 / 51. 2. 0
    FFmpeg 0.6.5
    libavutil     50.15. 1 / 50.15. 1
    libavcodec    52.72. 2 / 52.72. 2
    libavformat   52.64. 2 / 52.64. 2
    libavdevice   52. 2. 0 / 52. 2. 0
    libavfilter    1.19. 0 /  1.19. 0
    libswscale     0.11. 0 /  0.11. 0
    libpostproc   51. 2. 0 / 51. 2. 0

    Thanks in advance !

  • Bash script having custom functions not running under systemd service

    13 août, par nightcrawler

    I 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 of ffmpeg nor rknn Binaries

    


    Case2] I removed & from both lines then only ffmpeg runs but rknn is nowhere in htop

    


    Case3] Only this case works

    


    run_ffmpeg &
run_rknn_yolov5_demo


    


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