
Recherche avancée
Médias (91)
-
Spitfire Parade - Crisis
15 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Wired NextMusic
14 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
-
Sintel MP4 Surround 5.1 Full
13 mai 2011, par
Mis à jour : Février 2012
Langue : English
Type : Video
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (100)
-
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...) -
MediaSPIP Init et Diogène : types de publications de MediaSPIP
11 novembre 2010, parÀ l’installation d’un site MediaSPIP, le plugin MediaSPIP Init réalise certaines opérations dont la principale consiste à créer quatre rubriques principales dans le site et de créer cinq templates de formulaire pour Diogène.
Ces quatre rubriques principales (aussi appelées secteurs) sont : Medias ; Sites ; Editos ; Actualités ;
Pour chacune de ces rubriques est créé un template de formulaire spécifique éponyme. Pour la rubrique "Medias" un second template "catégorie" est créé permettant d’ajouter (...) -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
Sur d’autres sites (8100)
-
ffmpeg - escaping single quotes doesn't work [duplicate]
18 septembre 2022, par XorOrNorI've written a small python script for mass converting audio files. It uses ffmpeg. The problem is it doesn't work for files with single quotes in their filenames.


script :



import os
import subprocess
import sys
from multiprocessing.pool import ThreadPool as Pool

source_dir="/home/kris/Music/test"
output_dir="/home/kris/Music/test_opus"

def worker(file):

 try: 
 dirname=os.path.dirname(file)
 file=file.replace("'","\\\\'")
 filename=file.split('.flac')[0]
 
 input_file=f"'{source_dir}/{file}'"
 output_file=f"'{output_dir}/{filename}.opus'"
 cmd="ffmpeg -n -i "+input_file+" -c:a libopus -b:a 320k "+output_file
 print(cmd)
 result = subprocess.call(cmd,stdout=subprocess.PIPE,shell=True)
 except:
 print('item error')
 

def start(): 
 threads=os.cpu_count() 
 pool = Pool(threads)
 files=os.listdir(source_dir)
 for item in files:
 pool.apply_async(worker, (item,))

 pool.close()
 pool.join()
 
start()




Testing :


- 

-
Filename :
I'm a file.flac


-
When escaping single quote
'
with double backslashes\\
-file=file.replace("'","\\\\'")
the cmd for ffmpeg is :







ffmpeg -n -i '/home/kris/Music/test/I\\'m a file.flac' -c:a libopus -b:a 320k '/home/kris/Music/test_opus/I\\'m a file.opus'



ffmpeg returns an error :
/home/kris/Music/test/I\\m: No such file or directory


- 

- When escaping single quote
'
with a single backslash\
-file=file.replace("'","\\'")
the cmd for ffmpeg is :




ffmpeg -n -i '/home/kris/Music/test/I\'m a file.flac' -c:a libopus -b:a 320k '/home/kris/Music/test_opus/I\'m a file.opus'



I got an error :


/bin/sh: 1: Syntax error: Unterminated quoted string



According to ffmpeg docs : https://ffmpeg.org/ffmpeg-utils.html#toc-Examples escaping with single backslash should work.


-
-
ffmpeg won't stop encoding, even with -shortest command
3 mai 2017, par smartzerI am having an issue with ffmpeg stopping the encoding process, and searching on the internet has gotten me no working solutions. I am calling ffmpeg in Linux through Python’s subprocess module, as so :
mergeFiles = subprocess.Popen("ffmpeg -i /home/pi/Video/video.mov -i /home/pi/Audio/test.wav -acodec copy -vcodec copy -map 0:v -map 1:a -shortest /home/pi/Final/output.mkv", shell=True)
The command prompt is waiting for me to manually end the encoding process with "ctrl-c", but I won’t have access to a keyboard to kill the encoding. I just want it to stop when it’s done. I have even attempted to use mergeFiles.kill() from Python after a couple seconds, and that doesn’t even work. Help !
EDIT : If I wasn’t clear, I meant that there is no error, ffmpeg simply won’t continue until I hit "ctrl-c". I just want it to stop encoding when it’s done. This is what my command prompt looks like :
It’s just waiting for me to press "ctrl-c"
-
streaming automatically (on boot) using init.d scripts
15 juillet 2014, par Aldo DanielI am using Hackberry A10 with a Linaro 3.0.101 distro.
I am trying to run ffserver and ffmpeg to stream audio and video at the same time. From terminal, these are possible. But now I want to make them run at the start of my device’s boot.The script contains :
case "$1" in
start)
cd /home/linaro/bin/
./ffserver -f /home/linaro/Desktop/mpeg.conf &
./ffmpeg [ code ] &
; ;
esac
exit 0
After that I type the following commands :
chmod 755 [scriptname]
update-rc.d [scriptname] defaults
After I reboot the device, nothing happens. The camera light does not turn on. But when I try to run ffserver with the same configuration, it does not allow me, nor does it tell me that there is an error.
Can anyone help me with this problem ? Thanks in advance !