Recherche avancée

Médias (1)

Mot : - Tags -/embed

Autres articles (84)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

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

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

Sur d’autres sites (9649)

  • Use ffmpeg to edit metadata titles for multiple files

    19 mars 2017, par Nicholas Wireman

    I’d like to be able to add/edit video metadata titles to multiple files at once or with a single command, but I don’t know how to tell ffmpeg to do this.

    I read a similar post on the Ubuntu Forums, but I have never used string manipulation in Linux before, so the commands I’m seeing in the post are way out of my comprehension at the moment, and much of the discussion goes over my head.

    I’ve got all of my video files in a filename format that includes the show name, the episode number, and episode title. For example :

    show_name - episode_number - episode_title.extension

    Bleach - 001 - A Shinigami Is Born !.avi

    Is there a simple way to read the title and episode number from the filename and put it into a metadata tag without having to go through each and every file manually ?

    EDIT 1 : So I found out that I can iterate through files in a directory, and echo the filename, and I was told by a friend to try bash to parse the strings and return values from that to use in the ffmpeg command line. The problem is, I have absolutely no idea how to do this. The string manipulation in bash is very confusing on first look, and I can’t seem to get it to output what I want into my variables. My test bash :

    for file in "Bleach - 206 - The Past Chapter Begins! The Truth from 110 Years Ago.mkv"; do   extension=${file##*.} showName=${file%% *} episode=${file:9:3}; echo Extension: $extension Show: $showName Episode: $episode;    done

    That outputs

    Extension : mkv Show : Bleach Episode : 206

    Which are all the variables I’m going to need, I just don’t know how to move those to be run in ffmpeg now.

    EDIT 2 : I believe I was able, through much trial and error, to find a bash command that would do exactly what I wanted.

    for file in *; do   newname=${file:0:-4}_2 ext=${file##*.} filename=${file} showname=${file%% *} episode=${file:9:3} nameext=${file##*- } title=${nameext%.*};     ffmpeg -i "$filename" -metadata title="$title" -metadata track=$episode -metadata album=$showname -c copy "$newname.$ext";    mv -f "$newname.$ext" "$filename";    done

    This lets me parse the information from the filename, copy it to some variables, and then run ffmpeg using those variables. It outputs to a second file, then moves that file to the original location, overwriting the original. One could remove that section out if you’re not sure about how it’s going to parse your files, but I’m glad I was able to get a solution that works for me.

  • PHP serving two different video files

    6 septembre 2016, par inan

    I’m currently serving with PHP .ts segments while FFmpeg is running.
    My idea was to show during the stream my own advert. So I decided to add between the .ts segments my own video file.

    The problem is, if the advertising file is not existing everything is working fine until the file for my advert exists. The script continues but is not showing the advert.

    I tried to serve just only the advert file and it’s working. So I can assume, everything with the file is alright.

    Is there a limitation, to serve just only one file extension or container etc ?

    I’m watching the streams with VLC and Enigma2

    A part of my code :

    while(streamIsRunning()){
    // Serving .ts segments
    while (!feof($file_handler) && ClientConnected($clientpid)) {
       $response = stream_get_line($file_handler, 4096);
       echo $response;
       flush();
    }

    // Serve Advert if exists
    if (file_exists($myAdvert)) {
       $file_handler = fopen($myAdvert, "rb") or exit ("Stream Not Working");
       while (!feof($file_handler) && ClientConnected($clientpid)) {
           $response = stream_get_line($file_handler, 4096);
           echo $response;
           flush();
      }
    }
    }
  • bach scripts run by crontab as root

    5 mai 2017, par Mettavihari

    I run a crontab script to check if ffmpeg is running.
    I want the scripts to inform me if ffmpeg is not running.
    When I run the scripts as root on the command line all is OK
    But when they run called from crontab they never show the error.
    They always show that ffmpeg is running inspite of the fact that sometimes ffmpeg has crashed.

    I have given my crontab file and the scripts below.

    SHELL=/bin/sh
    57 4 * * * pkill -f /usr/bin/python2.7
    57 4 * * * pkill -f /bin/ffmpeg
    2 5 * * * /opt/dls/cron.sh (restarting the process above.)
    */5 * * * * /root/test-ffmpeg.sh  testing if ffmpeg is running
    */5 * * * * /root/test.sh         testing if ffmpeg is running
    */5 * * * * /root/test2.sh        testing if ffmpeg is running

    scripts : test.sh

    #!/bin/bash
    #check if ffmpeg is running
    if pgrep ffmpeg >/dev/null 2>&1
    if ps cax | rev | cut -f1 -d' ' | rev |grep ffmpeg >/dev/null 2>&1
    then
    echo "My Process is running."
    else
    echo "Hello" | mutt -s "fffmpeg is not working" abc@gmail.com
    fi

    script test-ffmpeg.sh

    #!/bin/bash
    #check if ffmpeg is running
    if pgrep ffmpeg >/dev/null 2>&1
    then
    echo "Process is running."
    else
    echo "Hello" | mutt -s "ffmpeg is not working" abc@gmail.com
    fi

    script : test2.sh

    line=$(ps aux | grep ffmpeg)
    if [ -z "$line" ]
    then
    echo "Hello" | mutt -s "fffmpeg is not working" abc@gmail.com    
    else
    echo $line > /dev/null
    echo "Running"
    fi