
Recherche avancée
Autres articles (74)
-
Organiser par catégorie
17 mai 2013, parDans 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 (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir
Sur d’autres sites (4398)
-
bash loop through list of file paths - characters get removed when sending to ffmpeg [duplicate]
9 octobre 2018, par Brad JohnsonThis question already has an answer here :
I have a text file that contains a list of paths to flac files I want to convert to wav. Here is a small section of it :
/mnt/nfs/Music/Rob D/1995 - Clubbed To Death/Rob D - 02 - Clubbed To Death _Kurayamino Variation_.flac
/mnt/nfs/Music/Blonde Redhead/2000 - Melody of Certain Damaged Lemons/11 - For the Damaged Coda.flac
/mnt/nfs/Music/I Monster/2001 - Daydream In Blue/01 - Daydream In Blue.flac
/mnt/nfs/Music/Moby/2002 - Extreme Ways/01 - Extreme Ways.flac
/mnt/nfs/Music/RJD2/2002 - Deadringer/01 - The Horror.flac
/mnt/nfs/Music/RJD2/2002 - Deadringer/03 - Smoke & Mirrors.flac
/mnt/nfs/Music/RJD2/2002 - Deadringer/06 - Ghostwriter.flac
/mnt/nfs/Music/RJD2/2002 - Deadringer/10 - Chicken-Bone Circuit.flac
/mnt/nfs/Music/FC Kahuna/2003 - Hayling/01 - Hayling _Original_.flac
/mnt/nfs/Music/Lamb/2003 - Between Darkness and Wonder/04 - Angelica.flacI’m trying to loop through it like so :
while read -r line; do
wavfile=$(basename "$line")
wavfile="${wavfile%.*}"
ffmpeg -i "$line" "$2/$wavfile.wav"
done <$1...where $1 is where I would pass the name of the text file and $2 is the destination directory.
Here is the output with the irrelevant ffmpeg junk pruned out :
Input #0, flac, from '/mnt/nfs/Music/Rob D/1995 - Clubbed To Death/Rob D - 02 - Clubbed To Death _Kurayamino Variation_.flac':
...
Output #0, wav, to '/mnt/gray/Clubbed To Death/Rob D - 02 - Clubbed To Death _Kurayamino Variation_.wav':
...
/nfs/Music/Blonde Redhead/2000 - Melody of Certain Damaged Lemons/11 - For the Damaged Coda.flac: No such file or directory
...
Input #0, flac, from '/mnt/nfs/Music/I Monster/2001 - Daydream In Blue/01 - Daydream In Blue.flac':
...
Output #0, wav, to '/mnt/gray/Clubbed To Death/01 - Daydream In Blue.wav':
...
nt/nfs/Music/Moby/2002 - Extreme Ways/01 - Extreme Ways.flac: No such file or directory
...
Input #0, flac, from '/mnt/nfs/Music/RJD2/2002 - Deadringer/01 - The Horror.flac':
...
Output #0, wav, to '/mnt/gray/Clubbed To Death/01 - The Horror.wav':
...
nt/nfs/Music/RJD2/2002 - Deadringer/03 - Smoke & Mirrors.flac: No such file or directory
...
Input #0, flac, from '/mnt/nfs/Music/RJD2/2002 - Deadringer/06 - Ghostwriter.flac':
...
Output #0, wav, to '/mnt/gray/Clubbed To Death/06 - Ghostwriter.wav':
...
nt/nfs/Music/RJD2/2002 - Deadringer/10 - Chicken-Bone Circuit.flac: No such file or directory
...
Input #0, flac, from '/mnt/nfs/Music/FC Kahuna/2003 - Hayling/01 - Hayling _Original_.flac':
...
Output #0, wav, to '/mnt/gray/Clubbed To Death/01 - Hayling _Original_.wav':
...
/nfs/Music/Lamb/2003 - Between Darkness and Wonder/04 - Angelica.flac: No such file or directoryIf you pay attention to the paths that ffmpeg reports don’t exist, you’ll see that a seemingly random number of characters has been removed from the beginning. This appears to happen on even numbered lines, but odd numbered lines work. I can only reproduce this behavior when using ffmpeg. If I replace the ffmpeg line with a simple echo statement, every file path is shown to be correct. How can this be ?
Other suggestions of accomplishing this are also welcome, however I do need the files processed in the order by which I have them listed in the file.
-
Python and FFmpeg Automation Giving Error
22 mars 2020, par TechI have a list of videos in a folder. I want to use ffmpeg for all of them at once. But my script is giving an error. I couldn’t find why.
My video list like these :
713 - The.Devils.Advocate.1997.1080p.BluRay.x264.mp4’
714 -The.Terminal.2004.1080p.BluRay.x264.mp4’
363-The.King’s.Speech.2010.1080p.BluRay.x264-.mp4"My code is here :
import os
path = './'
for filename in os.listdir(path):
if (filename.endswith(".mp4")): #or .avi, .mpeg, whatever.
folder_name = str(filename)[0:3]
try:
os.mkdir(folder_name)
os.system("ffmpeg -i " + filename + " -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls " + folder_name + "/HD.m3u8")
else:
continueAnd I’m getting this error :
File "hlsyarat.py", line 12
os.system("ffmpeg -i " + filename + " -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls " + folder_name + "/HD.m3u8")
^
SyntaxError: invalid syntax -
FFMpeg concatenation with large list of inputs — how to minimize command line length
27 août 2020, par huitlacocheI have a python tool that concatentates several mp4s together into a single movie file using FFMPEG run from a subprocess call. The issue is that an arbitrarily large number of inputs in the command string will hit the windows CLI character max.


ffmpeg -y -i a.mp4 -i b.mp4 -i c.mp4 -f lavfi -t 0.1 -i anullsrc -filter_complex '[0]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2: (oh- ih)/2,setsar=1[0:v];[1]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(owiw)/2:(oh-ih)/2,setsar=1[1:v];[2]scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow- iw)/2:(oh-ih)/2,setsar=1[2:v]; [0:v][3:a][1:v][3:a][2:v][3:a]concat=n=3:v=1:a=1[v][a]' -c:v libx264 -map [v] -map [a] output.mp4


Assuming 3 input movies that may or may have audio (hence the null audio source).
This works fine assuming there are no more than 30-50 input files. Often the input files have rather long filepaths and can get long very quickly.


After doing a bit of reading I tried a simple :


ffmpeg -f concat -i files.txt -c copy output.mp4


Which works if I can guarantee that all the files are the same codec/resolution/etc, but this cannot be guaranteed.
I'm not clear on how to translate my filter_complex to work with a text file of inputs. Finding a specific enough solution has proven elusive.


I'd be perfectly fine assigning the input paths to a temporary environment variable but in my use case this doesn't seem to work either. The subprocess call doesn't seem to translate wildcard %MYVAR% calls to environment variables.


I feel like there has to be an answer to this problem. If anyone can suggest a solution I would greatly appreciate it.


Thanks !