Recherche avancée

Médias (91)

Autres articles (67)

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

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

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

  • MP4 to DASH (bash script)

    18 mars 2019, par Francesco Galgani

    I have a web site in which users can upload video files. I want to stream all of them using DASH to obtain an adaptive bitrate streaming. So I wrote a bash script (to run by cron) that converts all mp4 files to DASH, but it doesn’t work properly : what is wrong ?

    For example, using the following script, I obtained :
    https://www.informatica-libera.net/dash_faq/stream.mpd

    It validates, but it doesn’t play. I tested it on :
    http://dash-mse-test.appspot.com/dash-player.html?url=https%3A%2F%2Fwww.informatica-libera.net%2Fdash_faq%2Fstream.mpd&autoplay=on&adapt=auto&flavor=

    Thank you for any help.
    The code :

    #!/bin/bash

    # THIS SCRIPT CONVERTS EVERY MP4 (IN THE CURRENT FOLDER AND SUBFOLDER)
    # TO A MULTI-BITRATE VIDEO IN MP4-DASH
    # For each file "videoname.mp4" it creates a folder "dash_videoname"
    # containing a dash manifest file "stream.mpd" and subfolders containing
    # video segments.

    # mp4dash documentation and download: https://www.bento4.com/developers/dash/

    MYDIR=$(dirname $(readlink -f ${BASH_SOURCE[0]}))
    SAVEDIR=$(pwd)

    # Check programs
    if [ -z "$(which ffmpeg)" ]; then
       echo "Error: ffmpeg is not installed"
       exit 1
    fi

    if [ -z "$(which mp4dash)" ]; then
       echo "Error: mp4dash is not installed"
       exit 1
    fi

    cd "$MYDIR"

    TARGET_FILES=$(find ./ -type f -name "*.mp4")
    for f in $TARGET_FILES
    do
     f=$(basename "$f") # fullname of the file
     f="${f%.*}" # name without extension

     if [ ! -d "dash_${f}" ]; then
       echo "Converting \"$f\" to multi-bitrate video in MPEG-DASH"

       ffmpeg -y -i "${f}.mp4" -c:a libfdk_aac -ac 2 -ab 128k -c:v libx264 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -b:v 1500k -vf "scale=-2:720" -f mp4 -pass 1 -y /dev/null
       ffmpeg -y -i "${f}.mp4" -c:a libfdk_aac -ac 2 -ab 128k -c:v libx264 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -b:v 1500k -vf "scale=-2:720" -f mp4 -pass 2 "${f}_1500.mp4"

       ffmpeg -y -i "${f}.mp4" -c:a libfdk_aac -ac 2 -ab 128k -c:v libx264 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -b:v 800k -vf "scale=-2:540" -f mp4 -pass 1 -y /dev/null
       ffmpeg -y -i "${f}.mp4" -c:a libfdk_aac -ac 2 -ab 128k -c:v libx264 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -b:v 800k -vf "scale=-2:540" -f mp4 -pass 2 "${f}_800.mp4"

       ffmpeg -y -i "${f}.mp4" -c:a libfdk_aac -ac 2 -ab 128k -c:v libx264 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -b:v 400k -vf "scale=-2:360" -f mp4 -pass 1 -y /dev/null
       ffmpeg -y -i "${f}.mp4" -c:a libfdk_aac -ac 2 -ab 128k -c:v libx264 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -b:v 400k -vf "scale=-2:360" -f mp4 -pass 2 "${f}_400.mp4"

       ffmpeg -y -i "${f}.mp4" -c:a libfdk_aac -ac 2 -ab 128k -c:v libx264 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -b:v 200k -vf "scale=-2:180" -f mp4 -pass 1 -y /dev/null
       ffmpeg -y -i "${f}.mp4" -c:a libfdk_aac -ac 2 -ab 128k -c:v libx264 -x264opts 'keyint=24:min-keyint=24:no-scenecut' -b:v 200k -vf "scale=-2:180" -f mp4 -pass 2 "${f}_200.mp4"

       rm -f ffmpeg*log*

       mp4fragment "${f}_1500.mp4" "${f}_1500_fragmented.mp4"
       mp4fragment "${f}_800.mp4" "${f}_800_fragmented.mp4"
       mp4fragment "${f}_400.mp4" "${f}_400_fragmented.mp4"
       mp4fragment "${f}_200.mp4" "${f}_200_fragmented.mp4"

       rm -f "${f}_1500.mp4" "${f}_800.mp4" "${f}_400.mp4" "${f}_200.mp4"

       mp4dash -v -o "dash_${f}" "${f}_1500_fragmented.mp4" "${f}_800_fragmented.mp4" "${f}_400_fragmented.mp4" "${f}_200_fragmented.mp4"

       rm -f "${f}_1500_fragmented.mp4" "${f}_800_fragmented.mp4" "${f}_400_fragmented.mp4" "${f}_200_fragmented.mp4"

       fi

    done

    cd "$SAVEDIR"
  • C script and ffmpeg can't find files

    14 décembre 2019, par Edoardo Colella

    I tryed to use ffmpeg concat with popen command in c but i get "No such file o directory". If i use linux terminal with the same command it works.

    ffmpeg -i "concat: audio/1.mp3|audio/2.mp3" -acodec copy output.mp3

    What could be the problem ?

  • Convert Windows batch file to a Linux shell script [closed]

    31 août 2023, par UNOIT

    I have been using this Windows batch file to check for video errors :

    


    c:\ffmpeg\bin\ffmpeg -v error -i "%~dpnx1" -f null - >"%~dpnx1.error.txt" 2>&1
pause


    


    I just drag and drop a file or folder onto the .bat file and it creates an error.txt file for each video.

    


    Can someone convert this to a Linux shell script ?

    


    I tried the information provided at linuxconfig.org, but I couldn't figure out how to write to an error.txt file for each video.

    


    this is what I tried

    


    for mediafile in *.mp4 ;
do ffmpeg -v error -i $mediafile -f null - >"$mediafile.txt" 2>&1
done

    


    It only works if the filename doesn't have any space - how would I fix that

    


    OK - I fixed it by adding quotes : "$mediafile"