
Recherche avancée
Médias (91)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
-
Les Miserables
4 juin 2012, par
Mis à jour : Février 2013
Langue : English
Type : Texte
-
Ne pas afficher certaines informations : page d’accueil
23 novembre 2011, par
Mis à jour : Novembre 2011
Langue : français
Type : Image
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Richard Stallman et la révolution du logiciel libre - Une biographie autorisée (version epub)
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (57)
-
MediaSPIP en mode privé (Intranet)
17 septembre 2013, parÀ partir de la version 0.3, un canal de MediaSPIP peut devenir privé, bloqué à toute personne non identifiée grâce au plugin "Intranet/extranet".
Le plugin Intranet/extranet, lorsqu’il est activé, permet de bloquer l’accès au canal à tout visiteur non identifié, l’empêchant d’accéder au contenu en le redirigeant systématiquement vers le formulaire d’identification.
Ce système peut être particulièrement utile pour certaines utilisations comme : Atelier de travail avec des enfants dont le contenu ne doit pas (...) -
Formulaire personnalisable
21 juin 2013, parCette page présente les champs disponibles dans le formulaire de publication d’un média et il indique les différents champs qu’on peut ajouter. Formulaire de création d’un Media
Dans le cas d’un document de type média, les champs proposés par défaut sont : Texte Activer/Désactiver le forum ( on peut désactiver l’invite au commentaire pour chaque article ) Licence Ajout/suppression d’auteurs Tags
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire. (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (4885)
-
Revision 30796 : On passe en version 0.6 avec tout le code revu et plus ou moins corrigé
10 août 2009, par kent1@… — LogOn passe en version 0.6 avec tout le code revu et plus ou moins corrigé
-
Revision 37011 : Un petit test pour voir si ffmpeg2theora est dispo sur le serveur (pour ...
6 avril 2010, par kent1@… — LogUn petit test pour voir si ffmpeg2theora est dispo sur le serveur (pour l’utiliser au cas où plus tard)
-
Bash script to automate FFmpeg operations fails when calling the command, but copy-pasting the generated command into the terminal works [duplicate]
28 février, par GaboScharff99I wrote a bash script which automates a number of conversion operations on video files using FFmpeg. Oddly enough, the FFmpeg call itself now fails when running the script, with a very confusing error message, I might add, but when I copy the command generated by the script into the terminal and run it, it works flawlessly. I'm sorry to insert such a long code block here, but considering how strange this error is, it might be anywhere in the script, so here it is :


#!/bin/bash

audioTrack=1
subSource=1
subTrack=0
transcodeVideo=1
transcodeAudio=1
volumeMultiplier=1
degradeToStereo=0
subLanguage="Japanese"

while getopts "t:ns:vam:dl:h" opt; do
 case "$opt" in
 t) audioTrack=${OPTARG};;
 n) subSource=0;;
 s) subTrack=${OPTARG};;
 v) transcodeVideo=0;;
 a) transcodeAudio=0;;
 m) volumeMultiplier=${OPTARG};;
 d) degradeToStereo=1;;
 l) subLanguage=${OPTARG};;
 h)
 echo "Options:"
 echo "-t [integer]: Audio track number. Default: 1."
 echo "-n: If included, subtitles will be taken from internal source."
 echo "-s [integer]: Subtitles track number. Default: 0."
 echo "-v: If included, video source will be copied without transcoding."
 echo "-a: If included, audio source will be copied without transcoding."
 echo "-m [number]: Volume multiplier. If 1, volume is unaffected. Default: 1"
 echo "-d: If included, audio will be degraded to stereo."
 echo "-l [language]: Subtitles language. Only used for external subtitles source. Default: Japanese."
 exit 0
 ;;
 esac
done

echo "Audio track: $audioTrack."
echo "Subtitles track: $subTrack."
params="-map 0:0 -map 0:$audioTrack -map $subSource:$subTrack -c:v"

if [[ $transcodeVideo -eq 1 ]]; then
 echo "Video will be transcoded."
 params="$params hevc"
elif [[ $transcodeVideo -eq 0 ]]; then
 echo "Video will be copied without transcoding."
 params="$params copy"
fi

params="$params -c:a"

if [[ $transcodeAudio -eq 1 ]]; then
 echo "Audio will be transcoded."
 params="$params libopus"
elif [[ $transcodeAudio -eq 0 ]]; then
 echo "Audio will be copied without transcoding."
 params="$params copy"
fi

if [[ $volumeMultiplier -ne 1 ]]; then
 echo "Volume will be multiplied by a factor of $volumeMultiplier."
 params="$params -filter:a 'volume=$volumeMultiplier'"
else
 echo "Volume will be unaffected."
fi

if [[ $degradeToStereo -eq 1 ]]; then
 echo "Audio will be degraded to stereo."
 params="$params -ac 2"
elif [[ $degradeToStereo -eq 0 ]]; then
 echo "Audio will not be degraded to stereo."
fi

params="$params -c:s copy"

if [[ $subSource -eq 1 ]]; then
 echo "Subtitles source is external."
 echo "Subtitles language is $subLanguage."
 params="$params -metadata:s:s:0 title='' -metadata:s:s:0 language='$subLanguage'"
else
 echo "Subtitles source is internal."
fi

if [[ -f titles.txt ]]; then
 echo "A titles.txt file was found. Titles will be changed according to it."
 echo "Please check titles.txt to make sure the titles are correct."
 changeTitles=1
 counter=0
else
 echo "A titles.txt file was not found. Titles will not be changed."
 changeTitles=0
fi

read -p "Are these options correct? (y/n) " choice

case "$choice" in
 y|Y)
 echo "Initiating conversion sequence. This may take a while..."

 mkdir output
 currentParams=""

 shopt -s nullglob
 for i in *.mp4 *.mkv; do
 currentParams=$params
 fileNameNoExtension=$(echo $i | rev | cut -f 2- -d '.' | rev)

 if [[ $subSource -eq 1 ]]; then
 currentParams="-f srt -i $fileNameNoExtension.srt $currentParams"
 fi

 if [[ $changeTitles -eq 1 ]]; then
 ((counter++))
 currentParams="$currentParams -metadata title='$(awk "NR==$counter" titles.txt)'"
 fi

 ffmpeg -i "$i" $currentParams "output/$fileNameNoExtension.mkv"
 done

 echo "Conversion finished!"
 ;;
 n|N) echo "Operation canceled. Exiting.";;
 *) echo "Invalid input. Try again.";;
esac



The directory I'm running this in contains six video files :


- 

E1 - The Pirates of Orion.mkv
E2 - Bem.mkv
E3 - The Practical Joker.mkv
E4 - Albatross.mkv
E5 - How Sharper Than a Serpent's Tooth.mkv
E6 - The Counter-Clock Incident.mkv














Here's the
titles.txt
file, for completion's sake :

Star Trek: The Animated Series - Season 2, Episode 1 - The Pirates of Orion
Star Trek: The Animated Series - Season 2, Episode 2 - Bem
Star Trek: The Animated Series - Season 2, Episode 3 - The Practical Joker
Star Trek: The Animated Series - Season 2, Episode 4 - Albatross
Star Trek: The Animated Series - Season 2, Episode 5 - How Sharper Than a Serpent's Tooth
Star Trek: The Animated Series - Season 2, Episode 6 - The Counter-Clock Incident



And finally, here's the error message given by FFmpeg on the terminal for every video file when running the command :


Unable to find a suitable output format for 'Trek:'
Trek:: Invalid argument



Maybe there are better ways to handle all of this, but first and foremost, I would like to figure out why the command fails with such a confusing error message. The only place where the string 'Trek :' is found is in the title taken from
titles.txt
, but I don't understand why that's seemingly being passed to the name of the output file instead of the title, and apparently only when running the script.

Thanks a lot for your answers ! I know this is quite a bit of text, so I really appreciate you taking your time to read through this.