Recherche avancée

Médias (91)

Autres articles (82)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

Sur d’autres sites (6237)

  • Anomalie #4682 (En cours) : Mettre à jour la lib svg-sanitizer (en 0.14) pour les corrections conc...

    10 mars 2021

    Suite à la mise à jour, j’ai des problemes sur SPIP 3.3- dev sur PHP 7.2

    impossible d’ajouter un SVG, cela me leve l’erreur

    Fatal error : Uncaught Error : Class ’enshrined\svgSanitize\data\XPath’ not found in /home/fdhtqhyg/www/_fdh2021/plugins-dist/medias/lib/svg-sanitizer/src/Sanitizer.php:214 Stack trace : #0 /home/fdhtqhyg/www/_fdh2021/plugins-dist/medias/sanitizer/svg.php(65) : enshrined\svgSanitize\Sanitizer->sanitize(’#1 /home/fdhtqhyg/www/_fdh2021/plugins-dist/medias/inc/renseigner_document.php(176) : sanitizer_svg_dist(’../IMG/logo/pic...’) #2 /home/fdhtqhyg/www/_fdh2021/plugins-dist/medias/action/ajouter_documents.php(210) : sanitizer_document(’../IMG/logo/pic...’, ’svg’) #3 /home/fdhtqhyg/www/_fdh2021/plugins-dist/medias/action/ajouter_documents.php(54) : action_ajouter_un_document_dist(’new’, Array, ’selection’, ’15’, ’logoon’) #4 /home/fdhtqhyg/www/_fdh2021/ecrire/action/editer_logo.php(135) : action_ajouter_documents_dist(’new’, Array, ’selection’, ’15’, ’logoon’) #5 /home/fdhtqhyg/www/_fdh2021/prive/formulaires/editer_logo.php(224) : logo_modifier(’selection’, ’15’, ’on’, Array) #6 /home/fdhtqhyg/www/_fdh2021/ecrire/ in /home/fdhtqhyg/www/_fdh2021/plugins-dist/medias/lib/svg-sanitizer/src/Sanitizer.php on line 214

  • Customizing HomeKit (using HomeBridge plug-in or building custom app ?)

    5 mai 2019, par Fréderic Cox

    I am running HomeBridge on a RBPi3 and displaying my home accessories through an iPad hub running the Home app.

    I really like it but I’m missing some things like a big clock (The iPad is hanging on my kitchen wall with screen-on display most of the day), a summary of my Google Calendar and some other nice widgets. It is not possible to add those widgets to the Home app (typically so with Apple software .. :-)) but I’m looking for a solution to achieve this.

    I have two options (at least that’s what I think) :

    1) Build my own iPad using the HomeKit API where I can then customize the app appearance and add the widgets the way I want.

    2) Using HomeBridge FFMpeg camera plugin and creating a video stream containing a big clock and some calendar item titles.

    Option 1 is the most work but also provides the flexibility. Option 2 is easier but limited in functionality. Option 2 might also be a performance overkill to have a video stream ? The video stream would provide me with the advantage that the camera widget in HomeKit is pretty big and clearly visible from distance (the clock at least).

    What do you think is the best option and how would option 2 be achieved ? How can I set up a video stream from for example a SWF file created in Adobe Animate ? Or how to achieve this dynamic info inside a video stream ?

    Any tips are most welcome ! Thanks

  • Convert a bash script to Windows bat script [closed]

    17 mai 2024, par gyandoo

    I have a bash script, now I need to convert it to bat.

    


    What the script does is based on the shortcut the script checks the audio codec and video codec using ffprobe and then loops through all the files in the folder to convert the file(s) using the presets based on which one the shortcut calls.

    


    It also limits the processor usage before running ffmpeg.

    


    Here's the script :

    


    #!/bin/sh
FILES="/home/red/Downloads/to_convert/*"
to_convert="/home/red/Downloads/to_convert"
TYPE="$1"
#echo "$TYPE"
if [ -e '/tmp/convert.txt' ]; then
  echo "Ffmpeg is currently converting a file!"
  exit 0
else
if [ "$(ls -A $to_convert)" ];
then
    #Create a temp file so if the script is run hourly and there is an existing instance running the scripts exits
    echo >> '/tmp/convert.txt'
    #iterate through each file in the directory
    for f in $FILES
    do
    FILENAME1=$(basename "$f")
    FILENAME=${FILENAME1%.*}

    
    ##  Detect what audio codec is being used:
    audio=$(ffprobe "$f" 2>&1 | sed -n '/Audio:/s/.*: \([a-zA-Z0-9]*\).*/\1/p' | sed 1q)
    ##  Detect video codec:
    video=$(ffprobe "$f" 2>&1 | sed -n '/Video:/s/.*: \([a-zA-Z0-9]*\).*/\1/p' | sed 1q)
    ##  Set default audio settings (you may need to use a different encoder,
    ##  since libfdk_aac is not re-distributable)
    aopts="-c:a libfdk_aac -vbr 3"
    ##  Set default video settings:
    vopts="-c:v libx264 -crf 22 -preset veryfast"

    case "$audio" in
        aac|mp3 )
    #If the audio is one of the MP4-supported codecs,
    #copy the stream instead of transcoding
            aopts="-c:a copy"
            ;;
        "" )
    #If there is no audio stream, don't bother with audio
            aopts="-an"
            ;;
        * )
            ;;
    esac

    case "$video" in
    #If the video stream is one of the MP4-compatible formats,
    #copy the stream
        h264|mpeg4|mpeg2video|mpeg1video )
            vopts="-c:v copy"
            ;;
        "" )
    #If no video stream is detected, don't bother with video
            vopts="-vn"
            ;;
        * )
            ;;
    esac

    
    if [ "$TYPE" = "shrink" ]; then
    
      taskset -c 0,2 ffmpeg -i "$f" -vcodec libx265 -crf 28 -map_metadata -1 "/home/red/Downloads/done/""$FILENAME"".mp4" && success=0 || success=1

    elif [ "$TYPE" = "phone" ]; then

      taskset -c 0,2 ffmpeg -y -i "$f" -vf scale=640:-2 -map_metadata -1 "/home/red/Downloads/done/""$FILENAME"".mp4" && success=0 || success=1

    elif [ "$TYPE" = "pmv" ]; then

      taskset -c 0,2 ffmpeg -y -i "$f" -vf scale=360:-2 -map_metadata -1 "/home/red/Downloads/done/""$FILENAME"".mp4" && success=0 || success=1      

    elif [ "$TYPE" = "music" ]; then

      taskset -c 0,2 ffmpeg -i "$f" -acodec libmp3lame "/home/red/Downloads/done/""$FILENAME"".mp3" && success=0 || success=1  

    elif [ "$TYPE" = "audio-boost" ]; then

      taskset -c 0,2 ffmpeg -i "$f" -vcodec copy -af "volume=10dB" "/home/red/Downloads/done/""$FILENAME"".mp4" && success=0 || success=1

    elif [ "$TYPE" = "burn-first-sub" ]; then  

      taskset -c 0,2 ffmpeg -i "$f" -vf "subtitles=""$f"":si=0'" "/home/red/Downloads/done/""$FILENAME"".mp4" && success=0 || success=1

    elif [ "$TYPE" = "burn-srt" ]; then  

      taskset -c 0,2 ffmpeg -i "$f" -vf "subtitles=/home/red/Downloads/to_convert/""$FILENAME"".srt" "/home/huckleberry/Downloads/done/""$FILENAME"".mp4" && success=0 || success=1

    elif [ "$TYPE" = "audio-track2" ]; then  

      taskset -c 0,2 ffmpeg -y -i "$f" -map 0:v -map 0:a:1 $vopts $aopts -map_metadata -1 "/home/red/Downloads/done/""$FILENAME"".mp4" && success=0 || success=1

    elif [ "$TYPE" = "split" ]; then  

      taskset -c 0,2 MP4Box -splits 1996800 "$f" && success=0 || success=1

    elif [ "$TYPE" = "fix" ]; then  
      taskset -c 0,2 ffmpeg -y -i "$f" -map 0:v:0 -map 0:a:0 -vcodec libx264 -acodec aac -map_metadata -1 "/home/red/Downloads/done/""$FILENAME"".mp4" && success=0 || success=1

    else    

      taskset -c 0,2 ffmpeg -y -i "$f" -map 0:v -map 0:a:0 $vopts $aopts -map_metadata -1 "/home/red/Downloads/done/""$FILENAME"".mp4" && success=0 || success=1

      TYPE="converted"

    fi

    
    if [ $success -eq 0 ]; then
        swaks --header Subject:"${TYPE} - ${FILENAME}" --body "${FILENAME}" -S
        echo "Removing $f file..."
        rm "$f"
    else
        swaks --header Subject:"failed - ${FILENAME}" --body "${FILENAME}" -S
        echo "process failed"
    fi    
   
    done
    
    #remove the temp file created
    rm "/tmp/convert.txt"
    exit 0
else
    echo "to_convert folder is empty"
    exit 0
fi
exit 0
fi